Page 1 of 1

[Solved] Easy Question MQTT vs. Event

Posted: 08 Aug 2017, 02:58
by scalg
Hi,

I'm trying to simply activation this event via MQTT but i cannot get around it ! Can anyone help me ?

Here's the event in question :

on spray do
gpio,15,1
timerSet 1,1
endon

on Rules#Timer=1 do
gpio,15,0
endon

The name of my EspEasy is SprayNode, the name of my device (GPIO) is Spray and the name of my event spray. I've tried many combinaison without success. SprayNode/cmd/spray, SprayNode/Spray/spray ....

Do i need a payload of 1 ?

Re: Easy Question MQTT vs. Event

Posted: 08 Aug 2017, 07:54
by papperone
for me it works like this (I send out cmd via MQTT using nodered):

1) topic = "/<modulename>/<devicename>/cmd"
2) payload = "event,<eventname>"

in your case if shoudl be: topic = "/SprayNode/Spray/cmd" and payload "event,spray"

hope it helps :)

Re: Easy Question MQTT vs. Event

Posted: 08 Aug 2017, 11:58
by scalg
Wow Thanks !! It's working !

really appreciated ! :D

Re: Easy Question MQTT vs. Event

Posted: 08 Aug 2017, 12:12
by grovkillen

Re: Easy Question MQTT vs. Event

Posted: 08 Aug 2017, 16:58
by scalg
Yes but the event syntax in the wiki is "event <event>" and in reality it's "event,<event>".

Re: Easy Question MQTT vs. Event

Posted: 08 Aug 2017, 17:04
by grovkillen
Ah, great. Will fix!