I’m using a sonoff RF bridge to control my projector screen. I have the following RF codes that control the screen
up
rfraw AAB03C04081374027600DC13BA381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A192A19292A192A19292955
stop
rfraw AAB03C0408137E026C00DC13A6381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A1A1A19292A192A192A1955
down
rfraw AAB03C0408136A027600DC13C4381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A192929292929292A1A19292A19292A1A1955
What I want is two buttons in my UI: Projector down and Projector Up.
When the Projector down is pressed I would like to send the down code, sleep for X seconds, then send the stop code. The Projector up code just needs to send the up code.
Could someone point me in the right direction as I am struggling with this.
Yep I have mosquitto all up and running and the mqtt binding installed and configured. I can publish and subscribe to a test topic from an external machine.
When you get to the stage of sending RF commands to the tasmota from OH then we’ll go though the rule that you need for the delay that you mentioned in your first post
What happens when you send a command AAB03C04081374027600DC13BA381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A192A19292A192A19292955 to the topic?
Use an MQTT utility like MQTTfx, MQTTspy or even MQTT explorer (New kid on the block and brilliant)
rule "TV Screen UP"
when
Item TVScreen received command ON
then
TVScreenCommand.sendCommand(transform("MAP", "sonoffrf.map", "up"))
end
rule "TV Screen DOWN"
when
Item TVScreen received command OFF
then
TVScreenCommand.sendCommand(transform("MAP", "sonoffrf.map", "down"))
createTimer(now.plusSeconds(5), [ |
TVScreenCommand.sendCommand(transform("MAP", "sonoffrf.map", "stop"))
])
end