There’s been a few updates to this thread, so please make sure to keep up with the latest posts at the bottom!
Sorry for starting another thread on these bulbs, but this warrants a new thread (I think). This thread provides the device type for the GE Link Bulb modified by community members specifically to allow ST to receive the bulb’s “ON” status when it’s manually turned on by a switch - not the app.
Thank you to this community for all the help, especially @Sticks18 for the code snippet that did the trick. This was a shortcoming to address between ST and the bulb, and this community did it. The device type code below works for the several bulbs I have. Now whenever someone in my house turns on a lamp with one of these bulbs ST’s app correctly shows the status of the bulb - yea!
No worries @wackware,and thanks. The parse was modified to also look at case “1000” and case “1001” that the stock device type wasn’t checking for in the catchall string.
Once debug and trace info was opened up to see everything possible, Sticks18 picked up on the fact the device passed different values for when the app turned on the bulb vs manually turning it on: (hopefully I got that right)
If I’m not mistaken, @urman found an issue with dimming because the hex value was not padded with zero and someone had a workaround. Does your device type include this workaround or am I thinking about some other issue?
@beckwith, actually the code was there to address a smooth transition, but the parameter value for level was 0000. I updated the code to make it 1500, and tested to see that it works, and it does transition smoothly. Now, the issue with anything below 7 is still there, for now.
This is right. The problem was that the response message format was different when the bulb gets an ‘on’ command (default response) versus the ‘refresh’ command (read attributes response). This fix should help correct the bulb state when it gets out of sync by getting the right on/off state when refresh is called.
I don’t think it fixes getting status when physical power is off, or automatically updating to ‘on’ when a physical switch turns it ‘on’. It will update correctly to ‘on’ as long as refresh is called though. I’m still working on these scenarios.
Anyone make progress on the setLevel stuff? It seems to bounce around because it gets multiple responses.
Here’s a fix for dimming below 7. Thanks to @kelchm for suggesting the hex() function. I just tweaked his code to transform the level percent from ST to a value the device can use before sending it to the hex() function. I couldn’t test it, but it should work.