FHEM Forum

FHEM => English Corner => Thema gestartet von: franc am 14 Mai 2014, 12:31:08

Titel: Updating an 'at'
Beitrag von: franc am 14 Mai 2014, 12:31:08
Hi, I'm Relatively new to fhem and have come across the first things I did had to do in a ugly way. I have a set of LIFX Wifi light bulbs did I am controlling via PIR sensor. My first setup easy thing to turn lights on when i went in to a room and have the lights in the other rooms turn off, then I wanted to do something fancy.

I'm currently doing this with some custom perl and by deleting and recreating the 'at' that turns the lights off Does anyone have any better suggestions? thanks





Titel: Antw:Updating an 'at'
Beitrag von: justme1968 am 14 Mai 2014, 12:42:45
have a look at 'modify'.

it allows you to modify any fhem device including at.
Titel: Antw:Updating an 'at'
Beitrag von: franc am 17 Mai 2014, 14:12:13
I probably should have explained the bits I found tricky.

The custom perl checks to see if if the 'at' is already set for a time earlier than time()+delay and if it is then does nothing, if not it modifies the 'at'. Without this check the 'at' keeps getting pushed further in to the future