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:35]
sgripon [The domoticz part]
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
 +local hum_stat = 0;
 if json_value.hum<​30 then hum_stat=2 end if json_value.hum<​30 then hum_stat=2 end
 if json_value.hum>​70 then hum_stat=3 end if json_value.hum>​70 then hum_stat=3 end
-if (json_value.hum>​40 and json_value.hum<​60) then hum_stat=1 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 commandArray['​UpdateDevice'​]=deviceIdx..'​|0|'​..json_value.temp..';'​..json_value.hum..';'​..hum_stat
add_temperature_and_humidity_sensor_dht11_in_domoticz.1478889339.txt.gz ยท Last modified: 2016/11/11 19:35 by sgripon