I have around 15 lamps controlled with FHEM. I've also made a system to know there is nobody home.
I'd like to 'for each' true all my lights so see if I left one of them on while no one is home.
I've made all my lights member of a group called lights, they are all FS20.
you can use a normal list command so list devices that meet certain conditons. search for devspec in the commandref.
or have a look readingsGroup to habe a list in the webfrontend of all lights that are still on. there is an example in the wiki for this near the end of the readingsGroup page.
or use a structure and combine the display with an all off button.
Thanks for the responce!,
I've checked the commandref, and this works fine;
list TYPE=FS20 STATE
But when I use;
list GROUP=lights STATE
FHEM does not return anything.
Also, how should I contruct the 'if' statement to test if one of the lights are still on?
Thanks
group ist not an internal but an attribute and has to be written in lower case. solist group=lights STATE
will work.
to get only the lights that are not off you can use something like this:list group=lights:FILTER=STATE!=off
Thanks Justme,
That part with the group works fine if I use lower case.
I'd like to send a notification if one of the lights are still on, how would one construct the IF statement.
if [one of the lights are still on] {
(code to send message)
}
use a structure to combine all lights in to ohne state and then query this state with Value(...).