I am new here and new to HA and MQTT, so please forgive my newbie question. I recently bought a number of Treatlife WiFi switches SS02. I wanted to connect them to my HA IOT integrate them into the rest of my smart home.
I configured it in Tasmota them per the Tasmota website’s template
{“NAME”:“TreatLife 3Way”,“GPIO”:[0,0,0,0,53,29,0,0,30,18,9,0,0],“FLAG”:0,“BASE”:18}
The per Digiblur’s 3-way tutorial I entered the following rules and set up
*backlog switchtopic 0 ; switchmode1 2 ; switchmode2 5 ; setoption32 7 ; setoption34 1 ; rule3 1*
rule1 on event#ON do power2 TOGGLE endon
rule2 on event#OFF do power2 TOGGLE endon
**(this is all one line below!)**
*rule3 on power1#boot do backlog ledpower1 %value% ; ledpower2 %value% endon on power1#state=1 do backlog rule1 0; rule2 1 ; ledpower1 %value% ; ledpower2 %value% endon on power1#state=0 do backlog rule1 1; rule2 0 ; ledpower1 %value% ; ledpower2 %value% endon on switch2#state=3 do publish stat/%topic%/switch long endon*
in my switch.yaml (included in my configuration.yaml file) which passes configuration check before restarting my server.
- platform: mqtt
unique_id: "MudRoom"
name: "MudRoom"
state_topic: "MudRoom/stat/POWER1"
command_topic: "MudRoom/cmnd/EVENT"
availability_topic: "MudRoom/tele/LWT"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
qos: 2
The funny thing is that I know the MQTT works. I have been able to go directly to the console for and turn the switch on and off. I can issue commands via publishing MQTT in Node-Red and it works.
The problem is the switch.mudroom does not work on my dashboard in HA. it is greyed out, and the status is ‘unavailable.’
What am I doing wrong?! I have tried a number of different configurations changing the topic and prefix order, etc.
any help would be very much appreciated.