is DIYHue able to “fake” lights ?
So I would like to switch something on/off (e.g. my alarming system) by execution of an shell command.
Can I use DIYHue for this by “faking” a light (which is not physical there) but it then e.g. switches my alarming system on/off.
Yes, it is possible, in the past we did such thing by having one light that was enabling the alarm and if one of the motion sensors get triggered an email notification was sent. Now we have the web based interface that allow to enable/disable this feature more easy so we don’t emulate this light anymore.
In diyhue you have hue ecosystem emulation (plugs, lights, sensors, remotes) and we flag them with a key named protocol. The value of this will send it to be processed by a custom python file.
Do you have a link or any info HOW to do that ?
I cannot find any docu about custom lights or how to “emulate” a light (no physical light there) and to execute a python command when switching it on/off…
I remember i write such info but i cannot find it now. Basically you need to take example from this folder diyHue/BridgeEmulator/lights/protocols at master · diyhue/diyHue · GitHub and create a new file with the protocol name you wish. The test light need to have in lights.yaml protocol: the_name_you_choosed
You also need to append the filename of you protocol here diyHue/__init__.py at ce83f0c5dc10bb0f53f83bd8358d757bf9283b02 · diyhue/diyHue · GitHub like every other protocol.