Apologies if I’ve posted this in the wrong category. I’m new to HA but very quickly loving what it can do. I started with the basic scheduling of lights and switches, and as I already had a Lightify gateway for the bulbs, I decided to get the Osram Motion Sensor too to trigger the porch light when movement is detected after sunset. However, I found it wasn’t just a case of plug and play. What I did find on my voyage of discovering is that the attributes of this sensor (recognised as a light in HA) changed when movement was detected, specifically the RGB_COLOR value. After much fighting I finally created a sensor which switches on and off when movement is detected and thought I’d share as it has taken me days to get this far so it may help someone else.
- platform: template
sensors:
porch_movements:
value_template: "{% if '255, 255, 0' in states.light.porch_motion.attributes.rgb_color | string %}On{% else %}Off{% endif %}"
light.porch_motion is the name of the Osram Device
rgb_color: 255, 0, 0 is set when there is no movement
rgb_color: 255, 255, 0 means that movement has been detected
It’s so simple but took me days of trying to extract or test against this rgb value! I can now automate this, keeping on the outside porch light for a defined amount of time and restoring it back to its previous setting (based on a contribution I’ve found elsewhere on this forum) when it’s triggered.
See also https://github.com/tfriedel/python-lightify/issues/9. Unfortunately I don’t own any of the sensors and can’t accurately implement their support, so I just did my best by exposing all the raw values “as is”.
Bought the Lightify starter kit because it was Zigbee and I already have XBee running in the house. It came with their gateway which requires you to show activate it. The Germans in charge of this never did send me back the email to activate the gateway. Tried several times but no success. Called Sylvania tech support and they said it was all up to the Germans.
It’s a shame as I really wanted to get these pot lights working with my Zigbee (Xbee) stuff.
Any ideas?
Hi!
I am also trying to get the motion sensor to work. At the moment I see the „new“ raw sensor values. But they do not seem to change. How can I figure out if they really do change if motion is detected? @ar.ukraine Is there something I am missing?
Thanks!
Unfortunately, I don’t have any motion sensor and can’t test that. But according to existing information in Internet, it should work this way (but I can’t guarantee that):
Try to set both interval_lightify_status and scan_interval to 1, to make sure you refresh the values frequently enough. I have no idea for how long motion_detected value may be set, if it’s something like 30 seconds (and you use default scan_interval value that’s also 30 seconds), then you might miss the changes.
Also I’m not sure what enabled value actually means - you can also double check that it’s being set to True.
I did set both intervals to 1 but I am still not recieving any change of the sensor values in HA, even though the sensor is detecting the motion(sensor led is blinking).
The only idea that I have is to temporarily install Home Assistant 0.91 (the last release before my changes) and to try Using OSRAM Lightify Motion Sensor with HA - Triggered by change in RGB . If it works, then probably I broke something If it doesn’t, then probably it’s not really feasible at the moment: those values are all that the Lightify gateway returns via its API.
Yes, the sensor ist working in the Lightify app and I am able to create an automation within the app.
I will later try to create a new sensor as you suggested. But shouldn’t I see a change of the raw sensor values anyway?
Yes, you should. But HA UI doesn’t display history for the attributes, only for the “main” sensor value. If a value “blinks” only for a few seconds, the history will make sure you don’t miss it.
I did create the sensor as suggested, but still no change is visible.
I also tried to create a second image based on 0.91 but the downgrade is failing. Seems like there are some dependency issues. So I could not test it until now. @stevec is your sensor still working?
Sorry for an off-topic: Has anybody updated the Lightify application with a mandatory Gateway firmware upgrade to version 1.5.1.0? If yes, does HA integration still work as expected? Especially when working with scenes? Lightify firmware changelog says: “increased maximum number of 32 scenes”. To do that they would probably need to change binary offsets in API response.