The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.14-1~deb10u1 (Linux)
File Line Function
/showthread.php 895 errorHandler->error



  • 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
Can't switch Relay device by rules: Error switch.lua:77
#1
Dear all,
after installing v8.1.2 I get trouble with switching devices via rules (see below Timer1, which have worked with v8.0.x, but if I use Timer2 (a different device), the rule will work).

I have already changed the new syntax, but I get following error message by using "pilight-daemon -D":
pilight-daemon: ERROR: /usr/local/lib/pilight/actions/switch.lua:77: device "gartenbewaesserung_relay1" can't be set to state "off"

Here  an extraction from my config:
-------------------
Code:
"devices": {
                "gartenbewaesserung_relay1": {
                        "uuid": "0000-b8-27-eb-decaf1",
                        "protocol": [ "relay" ],
                        "id": [{
                                "gpio": 26
                        }],
                        "state": "on"

                 },
               "Brennenstuhl_C": {
                        "protocol": [ "elro_800_switch" ],
                        "id": [{
                                "systemcode": 23,
                                "unitcode": 4
                        }],
                        "state": "off"
                },

"rules": {
                "Timer1“: {
                        "rule": "IF (gartenbewaesserung_relay1.state == on) THEN switch DEVICE gartenbewaesserung_relay1 TO off AFTER '15 MINUTE'",
                        "active": 1
                },
                "Timer2“: {
                        "rule": "IF (gartenbewaesserung_relay1.state == on) THEN switch DEVICE Brennenstuhl_C TO off AFTER '15 MINUTE'",
                        "active": 1
                },
     

"gui": { "gartenbewaesserung_relay1": {
                        "name": "Kirschlorbeeren 15min",
                        "group": [ "Bewässerung" ],
                        "media": [ "all" ],
                        "confirm": 0
                },
-------------------
Unfortunately I find no wrong setting.

In advance: thanks for support and great tool....

Added information/question:
The device with the error is on a second Raspberry, which a previous version of pilight.
Could this be the issue? Most all pilight instances have the some pilight version?
 
Reply
  


Messages In This Thread
Can't switch Relay device by rules: Error switch.lua:77 - by wobbi - 07-27-2018, 02:45 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  [Solved] On and Off for one device in one rule Oliver 3 866 10-28-2019, 06:55 PM
Last Post: Oliver
  Sunset state check parse error dennisvo 6 1,027 09-27-2019, 08:34 PM
Last Post: curlymo
  skipping overridden action switch do1eh 2 1,032 01-19-2019, 05:25 PM
Last Post: do1eh
  [8.1.2] variables in rules -> error terrar 1 897 09-14-2018, 05:28 PM
Last Post: curlymo
  Rules wont work bdb 2 1,223 08-12-2018, 06:25 PM
Last Post: bdb
  Rule with&without device. One working not the other... Tamadite 9 2,225 07-24-2018, 08:55 AM
Last Post: curlymo
  Strange behavior of rules currock 4 1,511 06-28-2018, 05:57 PM
Last Post: currock
  Error in Actions with 8.1.0 tomk 1 1,056 05-30-2018, 06:20 AM
Last Post: curlymo
  feature request: switching rules terrar 7 2,148 05-05-2018, 09:23 PM
Last Post: trader23
  Send on command when switch is already "on" joshovki 1 863 01-28-2018, 11:27 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)