• 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
The switches working only in one special order
#1
Hi@all,

I have some big problems with my pilight v8.1.2.
It is working with a RPi2.

If everything is in the same room, I can switch my switches in any order.

But if I divide the switches then on other rooms, I can turn on all three switches only in a certain order (ON = Stecker01, Stecker02, Stecker03). And then turn it off in reverse order (OFF = Stecker03, Stecker02, Stecker01).

Here is my config:

Code:
{
    "devices": {
        "currentdatetime": {
            "protocol": [ "datetime" ],
            "id": [{
                "longitude": 12.2369759,
                "latitude": 49.7531168
            }],
            "year": 2018,
            "month": 10,
            "day": 13,
            "hour": 10,
            "minute": 26,
            "second": 37,
            "weekday": 7,
            "dst": 1
        },
        "sunrisesetdevice": {
            "protocol": [ "sunriseset" ],
            "id": [{
                "longitude": 12.2369759,
                "latitude": 49.7531168
            }],
            "sunrise": 7.29,
            "sunset": 18.27,
            "sun": "rise"
        },
        "stecker1": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 31,
                "unitcode": 15
            }],
            "state": "off"
        },
        "stecker2": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 15,
                "unitcode": 15
            }],
            "state": "off"
        },
        "stecker3": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 31,
                "unitcode": 14
            }],
            "state": "off"
        }
    },
    "rules": {
        "Keller-Sonnenuntergang": {
            "rule": "IF (sunrisesetdevice.sunset == DATE_FORMAT(DATE_ADD(currentdatetime, '+28 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M)) AND stecker1.state == off AND currentdatetime.second == 0 THEN switch DEVICE stecker1 TO on",
            "active": 1
        },
        "Keller-Aus-1Uhr": {
            "rule": "IF DATE_FORMAT(currentdatetime, %H%M%S) == 010000 AND stecker1.state == on THEN switch DEVICE stecker1 TO off",
            "active": 1
        },
        "Keller-AN-5Uhr": {
            "rule": "IF DATE_FORMAT(currentdatetime, %H%M%S) == 050020 AND stecker1.state == off THEN switch DEVICE stecker1 TO on",
            "active": 1
        },
        "Keller-AUS-7Uhr": {
            "rule": "IF DATE_FORMAT(currentdatetime, %H%M%S) == 070000 AND stecker1.state == on THEN switch DEVICE stecker1 TO off",
            "active": 1
        },
        "Treppe-Sonnenuntergang": {
            "rule": "IF (sunrisesetdevice.sunset == DATE_FORMAT(DATE_ADD(currentdatetime, '+29 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M)) AND stecker3.state == off AND currentdatetime.second == 0 THEN switch DEVICE stecker3 TO on",
            "active": 1
        },
        "Treppe-AUS-1Uhr": {
            "rule": "IF DATE_FORMAT(currentdatetime, %H%M%S) == 010010 AND stecker3.state == on THEN switch DEVICE stecker3 TO off",
            "active": 1
        },
        "Treppe-AN-5Uhr": {
            "rule": "IF DATE_FORMAT(currentdatetime, %H%M%S) == 050010 AND stecker3.state == off THEN switch DEVICE stecker3 TO on",
            "active": 1
        },
        "Treppe-AUS-7Uhr": {
            "rule": "IF DATE_FORMAT(currentdatetime, %H%M%S) == 070010 AND stecker3.state == on THEN switch DEVICE stecker3 TO off",
            "active": 1
        },
        "Regal-Sonnenuntergang": {
            "rule": "IF (sunrisesetdevice.sunset == DATE_FORMAT(DATE_ADD(currentdatetime, '+30 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M)) AND stecker2.state == off AND currentdatetime.second == 0 THEN switch DEVICE stecker2 TO on",
            "active": 1
        },
        "Regal-AUS-1Uhr": {
            "rule": "IF DATE_FORMAT(currentdatetime, %H%M%S) == 010020 AND stecker2.state == on THEN switch DEVICE stecker2 TO off",
            "active": 1
        },
        "Regal-AN-5Uhr": {
            "rule": "IF DATE_FORMAT(currentdatetime, %H%M%S) == 050000 AND stecker2.state == off THEN switch DEVICE stecker2 TO on",
            "active": 1
        },
        "Regal-AUS-7Uhr": {
            "rule": "IF DATE_FORMAT(currentdatetime, %H%M%S) == 070020 AND stecker2.state == on THEN switch DEVICE stecker2 TO off",
            "active": 1
        }
    },
    "gui": {
        "currentdatetime": {
            "name": "Datum & Uhrzeit",
            "group": [ "Treppenhaus" ],
            "media": [ "all" ],
            "format": "dddd, DD.MM.YYYY | HH:mm:ss"
        },
        "sunrisesetdevice": {
            "name": "Sonnenauf- und Untergang",
            "group": [ "Treppenhaus" ],
            "media": [ "all" ]
        },
        "stecker1": {
            "name": "Stecker 01",
            "group": [ "Treppenhaus" ],
            "media": [ "all" ]
        },
        "stecker2": {
            "name": "Stecker 02",
            "group": [ "Treppenhaus" ],
            "media": [ "all" ]
        },
        "stecker3": {
            "name": "Stecker 03",
            "group": [ "Treppenhaus" ],
            "media": [ "all" ]
        }
    },
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/webgui",
        "webserver-http-port": 5060,
        "webserver-https-port": 5065,
        "webserver-authentication": [ "Vertex", "fd099490f3b312905842b114651a20139440c02140b05d46db4dcaa4ec929123" ],
        "webserver-cache": 1,
        "whitelist": "*.*.*.*",
        "gpio-platform": "raspberrypi2"
    },
    "hardware": {
        "433gpio": {
            "sender": 0,
            "receiver": 1
        }
    },
    "registry": {
        "pilight": {
            "firmware": {
                "version": 39530,
                "lpf": 367960,
                "hpf": 427410
            },
            "version": {
                "current": "8.1.2"
            }
        },
        "webserver": {
            "ssl": {
                "certificate": {
                    "secure": 0,
                    "location": "/etc/pilight/pilight.pem"
                }
            }
        }
    }
}

I'm using a FS1000A transmitter. The same effect is also with 5V and 12V (powersupply for transmitter!).
And of course I'm using an antenna.

https://www.amazon.de/Delock-88877-Anten...lock+88877

I really need help to get it fixed. I'm tryuing by my own for then two months now. But nothing helped me to fix it.

Thanks a lot!!
 
Reply
#2
Add delays to the switching rule.

E.g.  switch
1: AFTER '500 MILLISECONDS'
2: AFTER '1000 MILLISECONDS'
3: AFTER '1500 MILLISECONDS'
 
Reply
#3
The switches are with delay.
And the problem is with manual switching by webgui.

With the rules I made an order from 1 to 3 by on and off. WORKING!

But when I try to switch only Stecker3 from off to on with the webgui, nothing happens.
I have to switch on STECKER1, STECKER2 and then STECKER3.
To switch off I have to switch STECKER3, STECKER2 and then STECKER1 (or the same order from 1 to 3 like by switching ON).

Thanks again.
 
Reply
#4
What happens if you temporarily disable all rules?
 
Reply
#5
Without rules the same problems.
I also deleted everything except the three switches.
Same problem.

I changed the RPi too. First try was on a Raspberry 3. Now I'm on Raspberry 2. Still the same effect.

First I thought I need an antenna. So I ordered this one from post one.
Same problem.
Then I read, that the modul can be powered with 12V. So I tried a power supply with 12V.
Same problem.

Now I ordered the modules from your shop.
I will give them a try.

But actually I have no more ideas what to do.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  After upgrading 7.0 to 8.1.5 my flamingo SF-501P switches stopped working. gerrit312 12 654 03-14-2020, 02:21 PM
Last Post: gerrit312
  pilight 8.1.5 not working on Raspberry pi after reboot beejayf 4 186 03-08-2020, 12:14 AM
Last Post: beejayf
  filter stopped working after update to pilight 8.1.5 zlin50 19 795 01-03-2020, 02:15 PM
Last Post: curlymo
  8.1.5 quietly stops working hepcat72 4 307 12-23-2019, 03:24 PM
Last Post: hepcat72
  [Fixed] RaspberryPi4 pilight 8.1.5 - Send isn't working DominikB1993 4 710 10-18-2019, 10:25 PM
Last Post: DominikB1993
  pilight-receive Filteroption not working Alex 2 890 07-14-2019, 08:35 AM
Last Post: Alex
  pilight-flash not working danny 9 993 04-27-2019, 09:02 PM
Last Post: curlymo
  pilight not working with fresh Openhab 2 image habitoti 2 647 01-24-2019, 08:44 PM
Last Post: habitoti
  pilight 8.1 and switch with date and time not working Pikeman 7 1,384 06-30-2018, 11:28 PM
Last Post: curlymo
  HopeEasy Byron Switches auditdata 0 383 05-06-2018, 02:09 PM
Last Post: auditdata

Forum Jump:


Browsing: 1 Guest(s)