Own idx, rules and domoticz

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Own idx, rules and domoticz

#51 Post by toffel969 » 03 Apr 2018, 08:54

I agree with cyberclwn, the spaces are the problem, not the rule itself. Two events seems easier for the use case, that's why I suggested it... it works because it also doesn't have spaces ;)
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

PieterS
Normal user
Posts: 87
Joined: 27 Mar 2018, 17:18
Location: NL

Re: Own idx, rules and domoticz

#52 Post by PieterS » 03 Apr 2018, 22:21

cyberclwn wrote: 02 Apr 2018, 23:19
PieterS wrote: 02 Apr 2018, 22:10 But that does not happen when done by sensor and modified script.

Image

Why?
I think this rule works, if you remove the spaces:

Code: Select all

on Gas#Switch do // Task Gas which reads GPIO-13 (D7) 
if [Gas#Switch]=1 // If status Switch = 1
gpio,14,1 // Statusled GPIO-14 (D5) aan
else
gpio,14,0 // Statusled GPIO-14 (D5) uit
endif
endon
On my own rules i noticed that espeasy is very picky on "useless" space in lines.
I known you solved it with other rules, but thought i try explain why what you tried is not working.
For future rules :)
Yes, you are right. It works if there are no spaces in the command. Thanks for your help. I appreciate that!

Strange that spaces are allowed when I tested in de commandline (Tools, Command) and not in the rule... I tested my thoughts over there.
I learned my lesson!

Post Reply

Who is online

Users browsing this forum: No registered users and 127 guests