Closed hvanmegen closed 6 years ago
Wiki has all about what you need
https://github.com/arendst/Sonoff-Tasmota/wiki/Understanding-SwitchMode-and-SwitchTopic
Think about switchtopic and switchmode
Aaah!! I have it switch switch2 to MQTT only by changing the SwitchTopic and SwitchMode!
Perfect, thanks for the help!
@hvanmegen - beside oneself with joy don't forget to close issues if it it solved - you opened it, you close it :wink:
The wiki link is dead and I still do not get it. I changed the GPIO14 now to Switch2 but all messages in MQTT/console are still the same and power goes low after two seconds or so.
@ascillato - can this page -(https://github.com/arendst/Sonoff-Tasmota/wiki/Understanding-SwitchMode-and-SwitchTopic) be restored?
@danst0 - I believe that the page basically just links to this video.
@meingraham
Hi, the wiki page for buttons and switches has been renamed by @casper to https://github.com/arendst/Sonoff-Tasmota/wiki/Buttons-and-Switches
That is the new link to that page. It is in the sidebar of the wiki too. Now, I think it is better organized, so I agree with the change from @casper.
Hope this helps people reading the wiki ;)
I'm trying to figure out a way to have a simple Radar sensor (The RCWL-0516) that goes high (3.3v) on GPIO14 only send a message to my MQTT broker and NOT switch my relay (that powers some LED lighting).
I only want it to send a MQTT message stating these pin states (1 when it's triggered (high, 3.3v) and 0 when it's back low (low, 0v) again). I don't want anything to happen locally with the relay, schedule or anything else.
Having it set up as button 2, 3 or 4 doesn't send an MQTT message, and having it set up as a switch doesn't work either; this only switches my relay on and off whenever I move...
The reason that I don't want that sensor to do anything locally is because all relay switching logic is handled externally over MQTT; I only want to use the Sonof basic as a simple MQTT enabled relay AND a single GPIO pin MQTT message sender whenever the pin goes high and back low again.
I tried looking it up in the documentation, but I'm not entirely sure how to handle this.. isn't there a simple sensor like a PIR that pulls high when it detects motion and then drops back to low a second or so later after the trigger has been sent?
Which one should I use? I can't seem to find the correct one.