I’m running into an issue.
I got some of those cheap 433 switches that have the remote. A set of 3 switches intended to go on and off with a remote. The remote has 6 switches and the switches take 1 code for on and one code for off for each of the 3 switches. Smart Electrician 3-pack special from Menards. Sonoff RF Bridge sees the codes and can send them, so I have 12 codes for 6 switches stored in my bridge for Christmas Lights.
I know now that I can fire these using the MQTT equiv of:
Backlog RfSync 9600; RfLow 290; RfHigh 890; RfCode #472086
but these 6 switches are the packed away in the attic Christmas ones so I don’t now the codes to write the backlog stuff. I set them up like this and they work now using stored commands:
SCRIPT:
#####################################################
# MQTT Plugs Set B #
#####################################################
#######
## 1 ##
#######
switchb1_on:
alias: Switch B1 On
sequence:
- service: mqtt.publish
data:
topic: RF_Bridge/cmnd/RfKey3
payload: 0
switchb1_off:
alias: Switch B1 Off
sequence:
- service: mqtt.publish
data:
topic: RF_Bridge/cmnd/RfKey4
payload: 0
…
Then I would just call up the script via an automation to turn them on/off. The problem is there is no switch entity, so turning it off from Google home speaker you have to say something like ‘hey google, turn on Switch B1 Off
’. This I have found has high number of negative WAF points, so trying to fix. WAF is not good because she had to turn something on to turn the lights off and that is apparently just wrong, so I am told…
Since the command topic(s) are for on:
RF_Bridge/cmnd/RfKey4 (with a blank payload)
and off the topic is:
RF_Bridge/cmnd/RfKey5 (with a blank payload)
I can’t set an MQTT switch, It needs 1 command string and can be 2 payloads.
Has anyone found a way to make an MQTT switch out of this situation?
If I am going to re-do a lot of coding here I will next Fall (when we get them back out of the attic) just make an MQTT Switch send the straight up backlog thing and skip the stored keys thing altogether. That would be 1 command and 2 payloads. If someone has a way to do a MQTT switch now I’l just change to that now when I can remember to do it.