I’m still figuring out node red and how it works with Smartthings so apologies if this is a simple question.
That said I haven’t been able to figure out how to use the smartthings motion sensor effectively. From what I can tell I’m only getting a single msg event when motion is first detected.
I’m trying to create a motion activated light however I’m don't know how to do this effectively with only one event.
My Hue motion sensor on the other hand sends an additional msg after motion has stopped which allows me to turn the light off.
Any ideas on how to accomplish this with the Smartthings sensor?
I tried using that after seeing mention of it in another thread however the SmartThings node requires setting msg.topic to “switch” in order to change the state.
Looking at the Trigger node it doesn’t seem possible to alter anything outside of msg.payload so I wasn’t sure how to go about setting this value?