Do the logic in openHAB. I have a cooker hood with 3 speeds and a light (uses same scheme as your Harbor Brezze) so I can't use the interlock to only have 1 output on at a time. In my case I've connected an AM2301 temperature and humidity sensor to the 4ch and it switches on the light and low speed fan (ch1). If the humidity doesn't reduce it moves to the next rule which first switches off the fan output and then switches on the next speed (ch2) and so on for the third speed. The fan momentarily hesitates but is actually no different to normal pushbutton mode. In the sitemap I use a setpoint so I can manually control the speed via the app.
If you wish I'll send you the relevant items, rules and sitemap
--
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
Me too I’ve come to the conclusion ButtonTopic is for devices with one buttonand allocating a command to it.
I think it is possible to, essentially, break the link between the pushbutton and relay by using gpio(pin_ and sensor but never had the courage to try it.
I can agree with your thoughts about manual control when openHAB down – I have a micro PC on a UPS using a ESP-01 as a watchdog which triggers if openHAB or Mosquitto goes down. If I was using the rf remote I would have top left button configured turn light on and bottom left turn light off and top right increase fan speed and bottom right decrease fan speed. The rules then become a bit simpler (you don’t need to interlock can use ones like mine) and the remote is a bit more elegant. Yes you have the issue of what happens when openHAB goes down but you sort of have that problem with a clean recovery when it comes back up.
Success! Fortunately, I only need to inter-lock three channels... for which there are just enough TASMOTA rule "slots" available. Each rule uses 241 characters of the available 511.
String ceiling_fan_speed
String ceiling_fan_setSpeed { mqtt=">[broker:cmnd/fan/event:command:*:default]" }
Frame label="" icon="none"
{
Selection item=ceiling_fan_speed
label="Fan Speed"
icon="fan_ceiling"
mappings=["OFF"="Off", "LOW"="Low", "MEDIUM"="Medium", "HIGH"="High"]
}
rule "Send Fan Speed"
when
Item ceiling_fan_speed received command
then
val String sFanState = receivedCommand.toString
if (sFanState == "OFF") { ceiling_fan_setSpeed.sendCommand("toggling1=1") }
if (sFanState == "LOW") { ceiling_fan_setSpeed.sendCommand("toggling1=0") }
if (sFanState == "MEDIUM") { ceiling_fan_setSpeed.sendCommand("toggling2=0") }
if (sFanState == "HIGH") { ceiling_fan_setSpeed.sendCommand("toggling3=0") }
end