• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
invalid: operator "==" does not exist
#1
The latest commit in both development and rewrite throws an error when using == in a rule.

Code:
[Jan 18 16:09:38:505556] pilight-daemon: ERROR: rule #1 invalid: operator "==" does not exist
[Jan 18 16:09:38:505644] pilight-daemon: INFO: rule #1 was parsed until: ...  THEN switch DEVICE gen_switch.state TO off
[Jan 18 16:09:38:505679] pilight-daemon: INFO: rule #1 rule_1 was parsed in 0.000198 seconds

config.json

Code:
       "rules": {
               "rule_1": {
                       "rule": "IF 1 == 1 THEN switch DEVICE gen_switch.state TO off",
                       "active": 1
               }
       },
 
Reply
#2
Can you check if the equal lua operator is loaded?

I at least can't confirm.

Despite that issue, your rule is wrong anyway, because the DEVICE should be gen_switch
 
Reply
#3
Solved.

After recompiling a new commit using make, I usually run ./pilight-daemon -D from the build directory to make sure that everything still works. Only if everything still works, then I run make install.

However, in this case the lua event operator did not load without make install.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Solved] Crash on invalid config.json syntax pilino1234 10 5,123 04-01-2016, 05:40 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)