add a rule to turn the proxy item ON if temp <10 and to turn it OFF if temp >15
add another rule to set your new TH16-switch item accordingly to that proxy item
why?
presently you’re using “TempSensorCabin” for two purposes “Switch” and “Temperature” (and “HumiditySensorCabin” also) - this won’t work - you have to split the items for their purpose: Switch for ON/OFF, Number for Temperature or Humidity.
Thanks for the explanation, it sounds good but over my head, is there any documentation that to things like “proxy items”, or even better is there a tutorial for anything similar to what i want to do. Thanks Steve
A proxy item is an item without direct connection to hardware, just used to trigger a rule. This rule then sends the necessary commands to perform the operation to the hardware bound items.
There’s an explanation on all the stuff you can configure within openHAB - please read especially the part on items. In short:
Items represent capabilities that can be used by applications, either in user interfaces or in automation logic. Items have a State and they may receive commands.
So, that means, for every aspect (even if there are multiple ones in one device) you should address that aspect as an distinct item.
With that in mind, your TH16 has at least three items:
Switch on/off
temperature
humidity
There are plenty more, as you flashed Tasmota.
So, as you have a Sonoff device running Tasmota, have a look on the Tasmota Wiki:
There’s a whole lot of examples for understanding how Tasmota devices integrate with openHAB.
And now to your other question: a “Proxy item” is just a term for an item, which has no relation to a binding, but represents either some state or some action or whatever you like. It doesn’t “do” something directly, but you can use its state for telling others to do something.
So, please have a look - and if you need further help, we’re here to assist you.
What my rule does is look at the temperature reported by WUnderground and changed the heating set point of my thermostat. Hopefully this gives you a pointer at least.
I guess, that’s the RTRs (Room Temperature Controllers). This is half way to your use case.
The (non-OH2) heating logic will take the setpoint and do its magic.
What you need is to take the temp and turn your relay on and off accordingly. As I know how it is with Kids running around:
rule "Cabin getting cold"
when
Item TempSensorCabin changed
then
if (TempSensorCabin.state < 10) {
SwitchSensorCabin.sendCommand(ON)
}
if (TempSensorCabin.state > 15) {
SwitchSensorCabin.sendCommand(OFF)
}
end
If your use case doesn’t require to do anything, if the temperature oscilates between 10 and 15, then you can forget the proxy item. If you need some action for continuing degrees in between both, you could then play around with that proxy item a bit.
What happens now: if temp <10 the Sonoff will turn ON and if temp >15 it will turn OFF.
You seem to be familiar with the SONOFF and Tasmota, I dont suppose you know why the humidity is always 99.9% (not just in Openhab but in the devices control panel as well)
I’m sorry, unfortunately I don’t have a TH16! I was about to buy one - but it only had 10A as I needed one for my 2000W heating. That was a bit too risky for me, so I used a POW again - and placed a onewire sensor instead!
My guess is either you have to calibrate or configure something - or the humidity sensor is broken…
Fantastic example rule. Was just wondering if you could implement a variable Setpoint value into this rule? I.e if the set point value for the heating system in my house was 21. the rule would turn on and off a trv valve on my radiator in a specific room depending on the temp sensor in said room and if the set point was changed to say 25 the rule would also adapt alongside the Setpoint?