Closed TimmyUll closed 5 years ago
That’s the idea of a factory reset, which you need to make the light join another network. Change the poweron settings from the deCONZ GUI.
Hey ebaauw, I dont get how to do it... Would anyone please be so kind to explain how to do it exactly? Where do I have to fill in what value? Regards Ferdel73
Go to the Cluster Info panel and write the PowerOn attributes of the OnOff, Level Control, and Color Control clusters. See https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1014#issuecomment-445452409 and the next comment.
Thank you for the quick answer! I will try during Chrismas holidays. Just last night I got deCONZ running over x11vnc, before I only used deconz.service headless (deconz-gui.service wont start...). But I ran into some problems regarding different data / databases under phosconn with gui and headless. Regards Ferdel
I've tried to set PowerOn OnOff to both "On" and "Off" ("Previous" not working) but it doesn't seem to matter. The light still comes on at 100%, not remembering last state when turning off electricity. Am I misunderstanding what's supposed to happen?
What light type and what light firmware version are you using? It works for me for all types of Hue lights at the latest (Dec 2018) firmware.
it's a hue ambiance white e27 bulb. Model: LTW001 SW: 5.127.1.26420. Just updated to the latest fw.
It should be mentioned, I didn't seem to get it to work as expected with the hue gateway either. I was able to chose the power on behavior in the app but it seemed to reset both light levels and color when turning off the electricity. I didn't spend much time trying before changing to conbee, though, since I wasn't that interested in the hue gateway more than updating to the latest firmware.
That is the firmware that supports PowerOn OnOff (and the dimming and colour variants).
Note that it might take a couple of seconds before the light has written the setting to non-volatile memory. You should be able to read back the setting in the deCONZ GUI.
Ok. To rule out anything I might be doing wrong, would you mind telling me exactly what variable, and to what, I would need to set to get a light to go back to the previous state of light level and color when turning the electricity back on again? All I could gather when looking at the linked threads was setting power onoff to "off" since it was already set to on. (on another note, now when trying to set power onoff back to "on" again I get "failed to write")
For previous settings, you need to write 0xff or 0xffff to the following attributes:
I'm sorry for the late reply. I've managed to set the default value of PowerOn OnOff and I've uncommented the PowerOn variants. I haven't gotten around to fix/understand the rest yet but I'll be back with more questions when/if they'll arise. Thanks for the help!
Hello again, after repairing my raspberry installation -'which took quite some time -'the deCONZ GUI is working now. But as described it fails to write the “Previous“ value to Poweron onoff. How can i change this value without the software? It is the latest version, bulb fw is at december version. Do i have to use newer github Files? Will there be a patched release soon? Sorry for being pesky (AND late) about this, but i appreciate your knowledge!
This is an issue with the deCONZ GUI, not with the open source REST API plugin.
If you're comfortable reading and writing ZCL payloads, you might try https://github.com/ma-ca/deconz-cli-plugin.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hey @ebaauw, I have read all your work on the Power On stuff. I just upgraded all my bulbs to the latest firmware since I have never done that. Now I want to make use of the "Previous" mode. So the lights come on in the same state/color/level as they went out. I still doesn't work through the deconz GUI.
Can you help me do this? What steps do I need to follow?
I have edited general.xml to circumvent the enum problem by adding this:
<value name="Unused2" value="0x02"/>
<value name="Unused3" value="0x03"/>
<!--etc-->
<value name="Unused253" value="0xfd"/>
<value name="Unused254" value="0xfe"/>
That seems to work for the on/off state, but not for the color and level... Please help me.
See above.
For Hue lights to power on at previous settings, you need to set the following attributes:
enum
values with gaps. Specifying all 256 possible values in general.xml might very well work around it; I've never tried this myself, though;ct
).general.xml
:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/14c07293647d78385ee0b4dea61a8fdd04e270d7/general.xml#L1565-L1566
and then uncomment the manufacturer-specific attributes:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/14c07293647d78385ee0b4dea61a8fdd04e270d7/general.xml#L1610-L1613
This is needed only for (extended) color lights (supporting xy
).@ebaauw Awesome! I had a hard time with step 4. That works now!
Maybe for others that need this same help correct 0x65535 into 65535 :-)
Im new to Deconz, and have only started looking into how to configure things. But are the power-on settings eventually added to the GUI?
Thx @ebaauw for the time you've put into this, for providing the steps above. Also thx to @frankhommers for the clever workaround to circumvent the enum8 issue wrt non-continuous values.
I've been able to successfully setup my deCONZ GUI so that I can now configure my Hue bulbs so they default to the 'Previous' power on state. SWEET!
However, I've got nearly 100 bulbs to do, and doing those 4 steps in the deCONZ GUI for each and every bulb is going to be very tedious. Not to mention mistake-prone. I also want to be able to quickly re-apply the 'Previous' power on state if I have to remove groups of my bulbs from my Raspbee/deCONZ/Phoscon bridge, link them to the original Hue bridge, do a FW upg, and then re-link them back to my Raspbee bridge.
Therefore, is there a way these 4 steps could be automated/scripted via bash or python or some other method so I can do a large number of bulbs quickly and without making any mistakes (missing steps and/or typos)?
Lacking (pending?) support for this by the REST API plugin, you would need to use the deconz-cli-plugin to send the attribute write commands.
@ebaauw, could You please help me make correct deconz-cli ZCL command?
I'm trying to set PhilipsHUE to "previous" 0xFF setting with no success.
I was using based on searching in gitHub:
zclattr
I like to keep my sniffer running when composing cli commands, to make sure that it indeed sends the ZigBee message I want.
You need to specify the attribute ID in the payload as big endian, so 0340
for 0x4003. The type of the attribute is enum8, so 30
. Not sure if the endpoint needs to be in decimal or hex.
So try:
zclattr 0x5CCC 11 0x0006 02034030FF
or
zclattr 0x5CCC 0x0B 0x0006 02034030FF
@ebaauw Many thanks, first one is working!!! I was very near, but was using wrong data type.
After going through all this, im still confused as to how to make this change. I want to set my Hue light which is not paired to a Hue bridge anymore, but directly to Deconz to adjust the power-on behavior to "previous state". Based on all of the above and any limitations or issues that might exist, what is the best way to do that? I am a noob in regards to Deconz and the GUI so might need a little bit of extended info if anyone is able to share their method to do this.
Thanks Andrew
@frankhommers would you mind sharing the lines you extended the general.xml as a gist/snippet?
update: I solved it myself and it is working :)
for anyone who is trying to solve it in the way described above, I created a gist for the missing lines that have to be inserted around line 550 (for version .75): https://gist.github.com/mgrn0/8f52a05601a5fdc7d6e35e80c5cdc088
if wanted I can create a step-by-step howto with screens for explanation.
Are you able to provide step by step instructions around how to make this change if possible?
Are you able to provide step by step instructions around how to make this change if possible?
will do.
Have you had a chance to list the steps needed to do this?
sorry for the delay @Bruskey , for me the following steps were successful:
update the bulbs to latest firmware (I did so through a Hue bridge, removed the bulbs from the bridge and added them to my Raspbee 2 based system). (I only used regular bulbs, so no color temperatur nor hue adjustable ones.)
add the missing values / lines (https://gist.github.com/mgrn0/8f52a05601a5fdc7d6e35e80c5cdc088) in /usr/share/deCONZ/zcl/general.xml , restart deCONZ
select bulb which you want to set on/off behaviour for; click second grey round dot on the right to open dropdown (1)
click "OnOff cluster 0x0006" (2)
scroll down on the left and read 'Cluster info" attributes (3)
double click "PowerOn OnOff" attribute (4)
set attribute to "Previous" on modal / popup (it is the very last value on the bottom after all the "unused" entries we added in the xml above) (5)
do similar with the "Level Control" Cluster (6) and "PowerOn Level" Attribute (7), set to value to "255"
read value to make sure it was really written to non-volatile memory (light has to be on for some seconds)
if you are using a bulb with temperature or hue control you might want to follow the steps 3 and 4 mentioned at https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1055#issuecomment-559993258
Hope this helps :)
@mgrn0 if you want to have your bulbs to 'off' state after a power cut (e.g. my home automation system will decide if they will be turned on) what steps should i then take, can you also elaborate on that in such detail?
@Webunity I was only after the "last / previous" setting, but from what I understand you would chose "off" in step (5) instead of "previous", which is at the very top of the dropdown menu.
@mgrn0 Apologies for sounding like a noob, but i have installed Deconz through Home Assistant as an addon on the same server Home Assistant is running on. When you say the below, how do i actually access the file system to make those changes to the xml file?
add the missing values / lines (https://gist.github.com/mgrn0/8f52a05601a5fdc7d6e35e80c5cdc088) in /usr/share/deCONZ/zcl/general.xml , restart deCONZ
@Bruskey hm, I am running deCONZ on a Raspbee 2, so I don't know where in your case the files are located; if you go to "Edit > Preferences" (deCONZ) you will be able to see the path to the XML in your case, however you have to figure out how to edit the file / how to 'get' there, sorry (maybe somebody else can help?)
I tried to follow the guide for my Hue GU10 bulbs, but when I turn them off and on again they're just cold white? Is the color part for X and Y correct? Can't set that anymore because it's gone commented out in the XML like in the guide.
Edit: After some more tinkering they're now back to their normal 'on' value that's the default. I really don't understand why it sometimes seems to work, and it sometimes doesn't. Sometimes the writing and reading is also stuck for ages...
There a bug in the GUI, that it doesn't understand the same attribute IDs for standard and manufacturer-specific attributes. If you comment out the standard Current X and Current Y attributes in general.xml
and uncomment the PowerOn variants, you should be able to set these from the GUI.
I've done that. I think I have to try it again some other time. It does seem to remember my brightness value though. But my Windows 10 seems to crash or logout when I am trying it too much, rather not mess around too much with it because I have to restart my VM's every time.
Would be great if this would be implemented in Phoscon, or via the API at least. This is undoable right now, especially for multiple lights.
I also try to find the general.xml
file but with no luck. I am using deCONZ in Hass.IO as a Docker plugin. In Docker it says that the volume should be at /usr/share/hassio/addons/data/core_deconz but there is no such directory
why is the deconz GUI not fixed yet?
When I try to write the value Previous
to my Hue bulbs through the GUI, it gives me the error writing failed
.
However, writing the value off
or on
works fine.
Why can't I set the Previous
value?
@ludipq did you add the value entries in the xml file as described above?
It's unfortunate this isn't already corrected for Hue bulbs. The above method does not seem to work well for my color lights. Hoping we see some effort put into this from Deconz.
@ludipq did you add the value entries in the xml file as described above?
No, I thought I didn't have to because the option was there in the GUI.
Where do I find general.xml
when running on Docker?
I have mapped the following folder and this is the only content of it.
/volume1/docker/deconz:/root/.local/share/dresden-elektronik/deCONZ
@ludipq did you add the value entries in the xml file as described above?
No, I thought I didn't have to because the option was there in the GUI.
Where do I find
general.xml
when running on Docker? I have mapped the following folder and this is the only content of it.
/volume1/docker/deconz:/root/.local/share/dresden-elektronik/deCONZ
Anyone?
I just updated both my ConBee and deCONZ to the latest versions, and suddenly I am able to write the "previous" value to the bulbs, without editing the xml file!
@ludipq can you elaborate on the steps that you have taken?
@gvdhoven On/off cluster in deCONZ. Then attribute 0x4003 :)
I still can't write to the attribute, I receive the same error as before writing failed
. Running deCONZ v2.05.88 and updated the FW to 0x26390500
I managed to write to à couple of them. I think I need to upgrade the firmware on the others.
@gvdhoven On/off cluster in deCONZ. Then attribute 0x4003 :)
Writing previous works for me, but it doesn't function as intended.
Has anyone found a way to do this with Hass.IO deCONZ addon?
When updating and change power-on behavior on Hue-lights to "last uses color and brightness". Then connect them to conbee again. The Power-on behavior changes back to 100% White light regardless what previous state was.