• 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
[solved] sunset rule doesn't work
#1
hello together I really do not know
I try weeks are out as I manage the mirgration of pilight v7 on V8
to get the rules for the sunset to run...

am I just blind or I understand the syntax wrong?




here is my full config.json
I would be very happy about help

Code:
{
    "devices": {
        "dienst": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 1
            }],
            "state": "on"
        },
        "Bereitschaft": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 2
            }],
            "state": "off"
        },
        "wochenente": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 4
            }],
            "state": "off"
        },
        "WohnAUTO": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 5
            }],
            "state": "on"
        },
        "merkerwohnwand": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 6
            }],
            "state": "off"
        },
        "musikwechsler": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 7
            }],
            "state": "off"
        },
        "musikwechsler2": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 7
            }],
            "state": "off"
        },
        "lichtauto5": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 8
            }],
            "state": "off"
        },
        "kaffeeauto": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 10
            }],
            "state": "on"
        },
        "rebootswitch": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 12
            }],
            "state": "off"
        },
        "Light-status": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 15
            }],
            "state": "off"
        },
        "Musik-Bad": {
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 29
            }],
            "state": "off",
            "default-state": "on"
        },        
        "Musik-Balkon": {
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 11
            }],
            "state": "off",
            "default-state": "on"
        },
        "Musik-Kuche": {
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 6
            }],
            "state": "off",
            "default-state": "on"
        },
        "musik-w-K1": {
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 13
            }],
            "state": "off",
            "default-state": "off"
        },
        "musik-w-K2": {
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 10
            }],
            "state": "off",
            "default-state": "off"
        },
        "musik-gast": {
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 27
            }],
            "state": "off",
            "default-state": "on"
        },
        "musik-gast1": {
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 27
            }],
            "state": "off",
            "default-state": "on"
        },    
        "Kaffeemaschine": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 9,
                "unitcode": 1
            }],
            "state": "off"
        },
        "Gummibar": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 9,
                "unitcode": 4
            }],
            "state": "off"
        },
        "Stehlampegast": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 9,
                "unitcode": 8
            }],
            "state": "off"
        },
        "Firetv": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 18,
                "unitcode": 1
            }],
            "state": "off"
        },
        "AnetA8": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 18,
                "unitcode": 2
            }],
            "state": "off"
        },
        "CTCBizer": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 18,
                "unitcode": 4
            }],
            "state": "off"        
        },
        "Nachttischlampe": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 22,
                "unitcode": 1
            }],
            "state": "off"
        },
        "Vitrine2": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 22,
                "unitcode": 2
            }],
            "state": "off"
        },
        "LGanlage": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 22,
                "unitcode": 4
            }],
            "state": "on"
        },
        "Kuchenlicht": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 22,
                "unitcode": 8
            }],
            "state": "off"
        },
        "Vitrine": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 25,
                "unitcode": 1
            }],
            "state": "off"
        },
        "Kuchenunterbaulicht": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 25,
                "unitcode": 4
            }],
            "state": "off"
        },
        "Wohnwand": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 25,
                "unitcode": 8
            }],
            "state": "off"
        },
        "Saturn": {
            "protocol": [ "pollin" ],
            "id": [{
                "systemcode": 25,
                "unitcode": 2
            }],
            "state": "off"
        },
        "Avengers": {
            "protocol": [ "promax" ],
            "id": [{
                "systemcode": 1,
                "programcode": 1
            }],
            "state": "off"
        },
        "Anlage": {
            "protocol": [ "promax" ],
            "id": [{
                "systemcode": 1,
                "programcode": 2
            }],
            "state": "off"
        },
        "Bigben": {
            "protocol": [ "promax" ],
            "id": [{
                "systemcode": 2,
                "programcode": 3
            }],
            "state": "off"
        },
        "conradwallswitch": {
            "protocol": [ "promax" ],
            "id": [{
                "systemcode": 4,
                "programcode": 4
            }],
            "state": "off"
        },
        "Ledlight": {
            "protocol": [ "kaku_switch" ],
            "id": [{
                "id": 20,
                "unit": 0
            }],
            "state": "off"
        },        
        "dimm1": {
            "protocol": [ "kaku_dimmer" ],
            "id": [{
                "id": 30,
                "unit": 0
            }],
            "state": "off",
            "dimlevel": 6
        },
        "dimm2": {
            "protocol": [ "kaku_dimmer" ],
            "id": [{
                "id": 30,
                "unit": 4
            }],
            "state": "off",
            "dimlevel": 6
        },
        "ambilight": {
            "protocol": [ "kaku_switch" ],
            "id": [{
                "id": 100,
                "unit": 0
            }],
            "state": "off"
        },
        "Esstisch": {
            "protocol": [ "kaku_dimmer" ],
            "id": [{
                "id": 31,
                "unit": 6
            }],
            "state": "off",
            "dimlevel": 6
        },
        "smartphonefleisch": {
            "protocol": [ "ping" ],
            "id": [{
                "ip": "192.168.1.3"
            }],
            "state": "connected"
        },
        "rpi": {
            "protocol": [ "cpu_temp" ],
            "id": [{
                "id": 1
            }],
            "temperature": 38.470,
            "poll-interval": 10
        },
        "Version": {
           "protocol": [ "generic_label" ],
           "id": [{
               "id": 11
           }],
           "label": "21.10.2019",
           "color": "Blue"
       },
        "wohnwandLabel": {
           "protocol": [ "generic_label" ],
           "id": [{
               "id": 12
           }],
           "label": "sunrise",
           "color": "Gray"
       },
        "coffeeLabel": {
           "protocol": [ "generic_label" ],
           "id": [{
               "id": 13
           }],
           "label": "1h Automatik",
           "color": "Gray"
       },
        "outside": {
            "protocol": [ "sunriseset" ],
            "id": [{
                "longitude": 7.038100,
                "latitude": 51.475740
            }],
            "sunrise": 7.00,
            "sunset": 16.15,
            "sun": "set"
        },
        "time": {
            "protocol": [ "datetime" ],
            "id": [{
                "longitude": 7.038100,
                "latitude": 51.475740
            }],
            "year": 2018,
            "month": 2,
            "day": 11,
            "hour": 17,
            "minute": 50,
            "second": 40,
            "weekday": 1,
            "dst": 0
        },
        "saveconfig": {
            "protocol": [ "program" ],
            "id": [{
                "name": "saveconfig"
            }],
            "program": "/etc/pilight/save.sh",
            "arguments": "",
            "stop-command": "",
            "start-command": "/etc/pilight/save.sh",
            "state": "stopped",
            "pid": 0
        },
        "Reboot": {
            "protocol": [ "program" ],
            "id": [{
                "name": "Reboot"
            }],
            "program": "/etc/pilight/reboot.sh",
            "arguments": "",
            "stop-command": "",
            "start-command": "/etc/pilight/reboot.sh",
            "state": "stopped",
            "pid": 0
        }
    },
    "rules": {
        "010switchlg": {
            "rule": "IF musikwechsler.state == on THEN switch DEVICE musik-w-K1 AND musik-w-K2 TO on ELSE switch DEVICE musik-w-K1 AND musik-w-K2 TO off",
            "active": 1
        },
        "030fruhdienstON": {
            "rule": "IF dienst.state == on AND DATE_FORMAT(time, %H%M%S) == 045500 THEN switch DEVICE Vitrine2 AND Saturn AND Kaffeemaschine AND Kuchenunterbaulicht TO on",
            "active": 1
        },
        "040fruhdienstOFF": {
            "rule": "IF dienst.state == on AND DATE_FORMAT(time, %H%M%S) == 060500 THEN switch DEVICE Vitrine2 AND Saturn AND Kaffeemaschine AND Kuchenunterbaulicht TO off",
            "active": 1
        },
        "050Bereitschaft": {
            "rule": "IF Bereitschaft.state == on THEN switch DEVICE kaffeeauto TO off FOR '15 MINUTE' AND switch DEVICE Saturn AND Kaffeemaschine AND Kuchenunterbaulicht TO on FOR '14 MINUTE' AND switch DEVICE Bereitschaft TO off",
            "active": 1
        },
        "060autooff": {
            "rule": "IF lichtauto5.state == on AND Nachttischlampe.state OR Avengers.state == on THEN switch DEVICE Nachttischlampe AND Avengers AND lichtauto5 TO off AFTER '5 MINUTE'",
            "active": 1
        },
        "070flurON": {
            "rule": "IF (DATE_FORMAT(time, %H%M%S) == 190000 OR outside.sunrise == DATE_FORMAT(time, %H.%M)) AND time.second == 0 THEN switch DEVICE Vitrine AND Vitrine2 TO on",
            "active": 1
        },
        "080weekendON": {
            "rule": "IF WohnAUTO.state == on AND DATE_FORMAT(time, %w%H%M%S) == 5221000 THEN switch DEVICE dienst TO off AND switch DEVICE wochenente TO on",
            "active": 1
        },
        "100Sunsetlight-Weekday-ON": {
            "rule": "IF (outside.sunrise == DATE_FORMAT(time, %H.%M) OR DATE_FORMAT(time, %H%M%S) == 201500) AND WohnAUTO.state == on AND wochenente.state == off AND merkerwohnwand == off THEN switch DEVICE merkerwohnwand AND Light-status TO on",
            "active": 1
        },
        "110Sunsetlight-WeekEnd-ON": {
            "rule": "IF (outside.sunrise == DATE_FORMAT(time, %H.%M) OR DATE_FORMAT(time, %H%M%S) == 200000) AND WohnAUTO.state == on AND wochenente.state == on AND merkerwohnwand == off THEN switch DEVICE merkerwohnwand AND Light-status TO on",
            "active": 1  
        },
        "120light-Weekday-off": {
            "rule": "IF WohnAUTO.state == on AND wochenente.state == off AND merkerwohnwand.state == on AND Anlage.state == off AND Esstisch.state == off AND DATE_FORMAT(time, %H%M%S) >= 220000 THEN switch DEVICE Light-status TO off",
            "active": 1
        },
        "130light-WeekEnd-off": {
            "rule": "IF WohnAUTO.state == on AND wochenente.state == on AND merkerwohnwand.state == on AND Anlage.state == off AND Esstisch.state == off AND DATE_FORMAT(time, %H%M%S) >= 230000 THEN switch DEVICE Light-status TO off",
            "active": 1
        },
        "140switch-light": {
            "rule": "IF Light-status.state == on THEN switch DEVICE merkerwohnwand AND Wohnwand AND Bigben AND Saturn AND Kuchenlicht TO on AND dim DEVICE dimm1 TO 8 AND dim DEVICE dimm2 TO 3 ELSE switch DEVICE Wohnwand AND ambilight AND Kuchenlicht AND Saturn AND dimm1 AND dimm2 AND Kaffeemaschine AND Bigben AND Vitrine AND Vitrine2 AND merkerwohnwand TO off",
            "active": 1
        },
        "150coffee-weekday-ON": {
            "rule": "IF dienst.state == on AND Kaffeemaschine.state == off AND (DATE_FORMAT(time, %H) >= 10 AND DATE_FORMAT(time, %H%M%S) <= 180000) AND smartphonefleisch.state == connected THEN switch DEVICE Kaffeemaschine TO on",
            "active": 1
        },
        "160Coffee-AUTO": {
            "rule": "IF Kaffeemaschine.state == on AND kaffeeauto.state == on THEN switch DEVICE Kaffeemaschine TO off AFTER '1 HOUR'",
            "active": 1
        },
        "170Coffee-Weekend-On": {
            "rule": "IF wochenente.state == on AND DATE_FORMAT(time, %H%M%S) == 070000 THEN switch DEVICE Kaffeemaschine TO on AND switch DEVICE kaffeeauto TO off",
            "active": 1
        },
        "180Coffee-weekend-Off": {
            "rule": "IF wochenente.state == on AND DATE_FORMAT(time, %H%M%S) >= 170000 THEN switch DEVICE Kaffeemaschine TO off AND switch DEVICE kaffeeauto TO on",
            "active": 1
        },
        "190LabelWohnwand": {
           "rule": "IF WohnAUTO.state == on AND wochenente.state == on THEN label DEVICE wohnwandLabel TO 'ab Sonnenuntergang - 23:00' COLOR Blue",
           "active": 1
       },
        "200Labelsunset1": {
           "rule": "IF WohnAUTO.state == on AND wochenente.state == off THEN label DEVICE wohnwandLabel TO 'ab Sonnenuntergang - 22:00' COLOR Green",
           "active": 1
       },
        "220Labelsunset2": {
            "rule": "IF WohnAUTO.state == off AND Bereitschaft.state == off THEN label DEVICE wohnwandLabel TO 'nicht aktiv' COLOR Gray",
            "active": 1
        },
        "230Labelsunset2": {
            "rule": "IF wohnAUTO.state == off AND Bereitschaft.state == on THEN label DEVICE wohnwandLabel TO 'Bereitschaft' COLOR Red",
            "active": 1
        },
        "240Labelcoffee1": {
           "rule": "IF kaffeeauto.state == off AND wochenente.state == off THEN label DEVICE coffeeLabel TO 'Automatik aus' COLOR Blue",
           "active": 1
        },
        "250Labelcoffee2": {
           "rule": "IF Bereitschaft.state == on THEN label DEVICE coffeeLabel TO 'TIMER 15 Min' COLOR Red",
           "active": 1
        },
        "240Labelcoffee3": {
           "rule": "IF wochenente.state == on AND Bereitschaft.state == off THEN label DEVICE coffeeLabel TO '7 - 17 Uhr' COLOR Green",
           "active": 1
        },
        "250Labelcoffee4": {
           "rule": "IF wochenente.state == off AND kaffeeauto.state == on AND Bereitschaft.state == off THEN label DEVICE coffeeLabel TO '1h Automatik' COLOR Gray",
           "active": 1
        }
        
    },
    "gui": {
        "wohnwandLabel": {
            "name": "Status Lichtautomatik",
            "group": [ "Automatik" ],
            "media": [ "all" ]
        },
        "dienst": {
            "name": "Frühdienst",
            "group": [ "Automatik" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Bereitschaft": {
            "name": "Bereitschaft",
            "group": [ "Automatik" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "wochenente": {
            "name": "Wochenende",
            "group": [ "Automatik" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "WohnAUTO": {
            "name": "Wohnwand",
            "group": [ "Automatik" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "rpi": {
            "name": "Raspberry Temperatur",
            "group": [ "Daten" ],
            "media": [ "all" ]
        },
        "time": {
            "name": "Zeit",
            "format": "dd DD-MM-YYYY HH:mm:ss",
            "group": [ "Daten" ],
            "media": [ "all" ]
        },
        "outside": {
            "name": "Sonnenaufgang / Sonnenuntergang",
            "group": [ "Daten" ],
            "media": [ "all" ]
        },
        "merkerwohnwand": {
            "name": "Wohnwandmerker",
            "group": [ "Daten" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Light-status": {
            "name": "Licht Wohnung eingeschaltet",
            "group": [ "Daten" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Vitrine": {
            "name": "Lego old",
            "group": [ "Flur" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Vitrine2": {
            "name": "Lego design",
            "group": [ "Flur" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "coffeeLabel": {
            "name": "Status Kaffeemaschine",
            "group": [ "Küche" ],
            "media": [ "all" ]
        },
        "Kaffeemaschine": {
            "name": "Kaffeemaschine",
            "group": [ "Küche" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "kaffeeauto": {
            "name": "Kaffee Automatik",
            "group": [ "Küche" ],
            "media": [ "all" ]
        },
        "conradwallswitch": {
            "name": "Kochfeld",
            "group": [ "Küche" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Kuchenlicht": {
            "name": "Ambilight",
            "group": [ "Küche" ],
            "media": [ "all" ]
        },
        "Kuchenunterbaulicht": {
            "name": "Lichtleiste",
            "group": [ "Küche" ],
            "media": [ "all" ]
        },
        "musikwechsler": {
            "name": "Wechsler Musik Oder Homecinema",
            "group": [ "Musik Switch" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Anlage": {
            "name": "Steckdose Anlage",
            "group": [ "Musik Switch" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "LGanlage": {
            "name": "Steckdose LG-Homecinema",
            "group": [ "Musik Switch" ],
            "media": [ "all" ],
            "readonly": 0,
            "confirm": 1
        },
        "musik-w-K1": {
            "name": "Umschaltrelais K3",
            "group": [ "Musik Switch" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "musik-w-K2": {
            "name": "Umschaltrelais K4",
            "group": [ "Musik Switch" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Musik-Bad": {
            "name": "Nicht Aktiv",
            "group": [ "Musik Verteiler" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Musik-Balkon": {
            "name": "Balkon",
            "group": [ "Musik Verteiler" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Musik-Kuche": {
            "name": "Küche",
            "group": [ "Musik Verteiler" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "musik-gast": {
            "name": "Gästezimmer",
            "group": [ "Musik Verteiler" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "musikwechsler2": {
            "name": "Wechsler Musik Oder Homecinema",
            "group": [ "Musik Verteiler" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Nachttischlampe": {
            "name": "Nachttischlampe",
            "group": [ "Schlafzimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Avengers": {
            "name": "Wandbild",
            "group": [ "Schlafzimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "lichtauto5": {
            "name": "Lichtautomatik 5 Minuten",
            "group": [ "Schlafzimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Firetv": {
            "name": "Fire Tv Stick",
            "group": [ "Schlafzimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "ambilight": {
            "name": "Ambilight",
            "group": [ "Wohnzimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Bigben": {
            "name": "Big Ben",
            "group": [ "Wohnzimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Saturn": {
            "name": "Saturn V",
            "group": [ "Wohnzimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "dimm1": {
            "name": "Stehlampe",
            "group": [ "Wohnzimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "dimm2": {
            "name": "Leselampe",
            "group": [ "Wohnzimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Wohnwand": {
            "name": "Wohnwand",
            "group": [ "Wohnzimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Esstisch": {
            "name": "Esstisch",
            "group": [ "Wohnzimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "saveconfig": {
            "name": "Saveconfig",
            "group": [ "Tools" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Gummibar": {
            "name": "Gummibärchen",
            "group": [ "Gästezimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Stehlampegast": {
            "name": "Stehlampe",
            "group": [ "Gästezimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Ledlight": {
            "name": "Ambilight Wandbett",
            "group": [ "Gästezimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "musik-gast1": {
            "name": "Musik",
            "group": [ "Gästezimmer" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "AnetA8": {
            "name": "Anet A8",
            "group": [ "3Ddruck" ],
            "media": [ "all" ],
            "readonly": 0,
            "confirm": 1
        },
        "CTCBizer": {
            "name": "CTC Bizer",
            "group": [ "3Ddruck" ],
            "media": [ "all" ],
            "readonly": 0,
            "confirm": 1
        },
        "Reboot": {
            "name": "Neu Starten",
            "group": [ "Tools" ],
            "media": [ "all" ],
            "readonly": 0,
            "confirm": 1
        },
        "Version": {
           "name": "Software stand",
           "group": [ "Tools" ],
           "media": [ "all" ]
        }
    },
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "standalone": 1,
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/webgui",
        "webserver-http-port": 5001,
        "webserver-cache": 1,
        "whitelist": "",
        "gpio-platform": "raspberrypi2"
    },
    "hardware": {
        "433gpio": {
            "sender": 0,
            "receiver": 1
        }
    },
    "registry": {
        "webserver": {
            "ssl": {
                "certificate": {
                    "location": "/etc/pilight/pilight.pem"
                }
            }
        },
        "pilight": {
            "version": {
                "current": "8.1.3"
            }
        }
    }
}
 
Reply
#2
It would be great if you could specify which rule you are having troubles with.
 
Reply
#3
the first works just for test, i change this rule from set to rise and it works, if it was sunset it won't
Code:
"070flurON": {
            "rule": "IF (DATE_FORMAT(time, %H%M%S) == 190000 OR outside.sunrise == DATE_FORMAT(time, %H.%M)) AND time.second == 0 THEN switch DEVICE Vitrine AND Vitrine2 TO on",
            "active": 1
        },
 the most problem is this, its dayly dinner i the dark  Tongue Tongue Tongue Tongue Tongue


Code:
             "100Sunsetlight-Weekday-ON": {
            "rule": "IF (outside.sunrise == DATE_FORMAT(time, %H.%M) OR DATE_FORMAT(time, %H%M%S) == 201500) AND WohnAUTO.state == on AND wochenente.state == off AND merkerwohnwand == off THEN switch DEVICE merkerwohnwand AND Light-status TO on",
            "active": 1
        },
        "110Sunsetlight-WeekEnd-ON": {
            "rule": "IF (outside.sunrise == DATE_FORMAT(time, %H.%M) OR DATE_FORMAT(time, %H%M%S) == 200000) AND WohnAUTO.state == on AND wochenente.state == on AND merkerwohnwand == off THEN switch DEVICE merkerwohnwand AND Light-status TO on",
            "active": 1  
        },
 
Reply
#4
This is my sunset rule:
Code:
IF time.second == 0 AND stalamp1.state == off AND sun.sunset == DATE_FORMAT(DATE_ADD(time, '+1 HOUR'), '%Y-%m-%d %H:%M:%S', %H.%M) THEN switch DEVICE stalamp1 TO on
 
Reply
#5
(10-22-2019, 05:59 PM)curlymo Wrote: This is my sunset rule:
Code:
IF time.second == 0 AND stalamp1.state == off AND sun.sunset == DATE_FORMAT(DATE_ADD(time, '+1 HOUR'), '%Y-%m-%d %H:%M:%S', %H.%M) THEN switch DEVICE stalamp1 TO on
very nice, i change something other too and it worked great, Thank you
Code:
                "80Sunsetlight-Weekdaytime-ON": {
            "rule": "IF time.second == 0 AND wochenente.state == off AND merkerwohnwand == off  AND WohnAUTO.state == on AND DATE_FORMAT(time, %H%M%S) == 201500 THEN switch DEVICE merkerwohnwand AND Light-status TO on",
            "active": 1
        },
        "80Sunsetlight-dayly-ON": {
            "rule": "IF time.second == 0 AND outside.sunset == DATE_FORMAT(DATE_ADD(time, '+2 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M) THEN switch DEVICE merkerwohnwand AND Light-status TO on",
            "active": 1
        },
        "90Sunsetlight-WeekEnd-ON": {
                         "rule": "IF time.second == 0 AND wochenente.state == on AND merkerwohnwand == off AND WohnAUTO.state == on AND DATE_FORMAT(time, %H%M%S) == 200000 THEN switch DEVICE merkerwohnwand AND Light-status TO on",
                         "active": 1  
     
 
Reply
#6
I am having a problem with shapebender where I get it to work but it only gives me the frame of my shape and not the surfaces. Do you know what is going on?
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Rule triggers twice Thorben653 13 3,154 02-05-2020, 01:06 PM
Last Post: VicktorKopf
  Exclude Weekend from a rule PT-Biker 1 838 12-08-2019, 10:22 AM
Last Post: curlymo
  [Solved] On and Off for one device in one rule Oliver 3 952 10-28-2019, 06:55 PM
Last Post: Oliver
  Sunset state check parse error dennisvo 6 1,147 09-27-2019, 08:34 PM
Last Post: curlymo
  Rules wont work bdb 2 1,298 08-12-2018, 06:25 PM
Last Post: bdb
  Rule with&without device. One working not the other... Tamadite 9 2,419 07-24-2018, 08:55 AM
Last Post: curlymo
  rule executed once at start up segalion 3 1,211 07-12-2018, 05:28 PM
Last Post: curlymo
  Problem with executing bash script via rule/program dYna 1 1,557 02-15-2018, 09:06 PM
Last Post: dYna
  Rule Sunset works, Sunrise not apartmedia 1 1,642 12-05-2017, 07:09 PM
Last Post: apartmedia
  Problem with a Rule for a One Button Switch martin-dj 1 1,719 03-06-2017, 12:01 PM
Last Post: pilino1234

Forum Jump:


Browsing: 1 Guest(s)