User Tools

Site Tools


add_temperature_and_humidity_sensor_dht11_in_domoticz

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
add_temperature_and_humidity_sensor_dht11_in_domoticz [2016/11/11 19:28]
sgripon [Next Step]
add_temperature_and_humidity_sensor_dht11_in_domoticz [2016/11/11 19:38] (current)
sgripon [The domoticz part]
Line 113: Line 113:
 -- 2=Dry -- 2=Dry
 -- 3=Wet -- 3=Wet
-commandArray['​UpdateDevice'​]=deviceIdx..'​|0|'​..json_value.temp..';'​..json_value.hum..';​0'+local hum_stat = 0; 
 +if json_value.hum<​30 then hum_stat=2 end 
 +if json_value.hum>​70 then hum_stat=3 end 
 +if (json_value.hum>​=45 and json_value.hum<​=50) then hum_stat=1 end 
 + 
 +commandArray['​UpdateDevice'​]=deviceIdx..'​|0|'​..json_value.temp..';'​..json_value.hum..';'​..hum_stat
  
 return commandArray return commandArray
add_temperature_and_humidity_sensor_dht11_in_domoticz.1478888881.txt.gz · Last modified: 2016/11/11 19:28 by sgripon