Very basic question on how to use rule

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
MajinJoko
New user
Posts: 7
Joined: 29 Dec 2019, 15:53

Very basic question on how to use rule

#1 Post by MajinJoko » 01 Jan 2020, 12:24

Dear all, I feel very stupid at the moment.
I wrote a very simple rule but nothing happens.
I am sure I am doing some stupid error at some point, but I can't understand what I am missing.

My goal is to send a gpio pin status everytime I change it via a command.

Code: Select all

on System#Boot do
 Monitor GPIO,13
endon

on MQTT#Connected do
 GPIO,13,1
 Publish %sysname%/output/gpio13,2
endon


on GPIO#13=0 do
 Publish %sysname%/output/gpio13,0
endon

on GPIO#13=1 do
 Publish %sysname%/output/gpio13,1
endon
Rules are enabled in "advanced" setttings.
Rule event name is: rule#1 (does it matter?)

In the console log I can't find any error or any trace that my rule is run.
The "on MQTT#Connected" has been added for debugging purpose but, again, nothing happens.

The command I try to send are:
- GPIO,13,1
- Pulse,13,1,500
through the proper MQTT topic. The pin change as intended (the controlled relay open/close).

Can you please help me?

MajinJoko
New user
Posts: 7
Joined: 29 Dec 2019, 15:53

Re: Very basic question on how to use rule

#2 Post by MajinJoko » 01 Jan 2020, 17:26

Ok, found the problem.
The eventname is the "trigger". So, I had to create three different rules.

Post Reply

Who is online

Users browsing this forum: No registered users and 69 guests