Как сделать термостат? How to make a thermostat?

Приведите пожалуйста пример как сделать термостат включения реле на 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:] >[OFF:POST:]"}
Number sensor1 {http="<[*))]"}
Number termostat

but in my case sensors and relays are on the diferent pairs arduino+ethernet sheild

you need a rule

rule “termostat”
Item sensor1 recieved update
sendCommand(relay1, OFF)

sendCommand(relay1, ON)

rule not tested but have to be something like that

Сделал так
to do so

// This rule file is autogenerated by HABmin.
// Any changes made manually to this file will be overwritten next time HABmin rules are saved.

// Imports
import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*

rule "myhome"
Item temper recieved update
if (temper.state != 30) {
sendCommand(led, ON)

но не работает
Подскажите как правильно?

but does not work
Prompt how correctly?