Page 1 of 1

trigger Rule via MQTT

Posted: 08 Sep 2018, 16:01
by henfri
Hello,

I am trying to trigger this rule

Code: Select all

on shpy#HintertuerZiel=1 do
  Publish %sysname%/setze15,1
  gpio,15,1
  delay 100
  gpio,15,0
  delay 500
  gpio,15,1
endon
Via the openhab-mqtt controller.
I use this command:

Code: Select all

mosquitto_pub -h 192.168.177.3 -m "1" -t Hintertuer/shpy/HintertuerZiel

Code: Select all

mosquitto_sub -t "#" -h 192.168.177.3 -v
Hintertuer/shpy/HintertuerZiel 1
Why does that not work?

Greetings,
Hendrik

Re: trigger Rule via MQTT

Posted: 08 Sep 2018, 16:06
by grovkillen
Have you studied the wiki regarding how to trigger commands using MQTT?

Re: trigger Rule via MQTT

Posted: 08 Sep 2018, 16:48
by henfri
I do not know, which wiki page you refer to.
I studied this one:
https://www.letscontrolit.com/wiki/inde ... rial_Rules
Here, only the opposite direction (espeasy sends) is mentioned.

Re: trigger Rule via MQTT

Posted: 08 Sep 2018, 21:35
by grovkillen
Go to the main page and look for the section "command reference".

Re: trigger Rule via MQTT

Posted: 09 Sep 2018, 12:34
by henfri
Hello,

thanks. I've been there as well.
On that page I see how to activate/deactivate rules.
But I do not see how to *trigger* a rule.

Do I need to trigger an event for that?

Greetings,
Hendrik

Re: trigger Rule via MQTT

Posted: 09 Sep 2018, 13:02
by grovkillen
Yes, use the event command and send it to the topic ending with "cmd".