Приведите пожалуйста пример как сделать термостат включения реле на arduino
То есть я выставляю нужную мне температуру в openhab
и включается реле на ардуино
а датчик 18b20 контролирует текущую температуру и выводит показания в opebhab
Please Bring an example of how to make the thermostat relay to arduino
That is, I put my desired temperature in openhab
and the relay on the Arduino
18b20 and the sensor monitors and displays the current temperature readings opebhab
Someone else may be able to provide more help than I can. I did a quick search for Arduino 18b20 and it seems to support OneWire so look to use the OneWire binding. All of this assumes you actually have the Arduino connected to the openHAB server somehow. I’veno experience with OneWire so I’ll be little help with that.
i use arduino + ethernet sheild and installed web interface on ardiuno all the code you need is on arduino example lib you have to modyfy e little bit.
conection to openhab is wiht HTTP binding
Swich relay1 {http=">[ON:POST:http://192.168.3.7/?L2] >[OFF:POST:http://192.168.3.7/?H2]"}
Number sensor1 {http="<[http://192.168.3.5:10000:REGEX((.*))]"}
Number termostat
but in my case sensors and relays are on the diferent pairs arduino+ethernet sheild
you need a rule
rule “termostat”
when
Item sensor1 recieved update
then
if(sensor1.state>=termostat)
sendCommand(relay1, OFF)
else
sendCommand(relay1, ON)
end
rule not tested but have to be something like that