Announcement

Collapse
No announcement yet.

Beta 2.0.4.3: Creating New Group can cause duplicate root devices

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • w.vuyk
    replied
    This issue was also solved with the latest beta - but ony if you recreate the devices that already exsist - or remove the group and re-add it on the manage devices page.... the referal to the "new" group should no longer be there after that.

    But was not expecting anyone was still using the device address

    Leave a comment:


  • kenm
    replied
    Great! Thanks for the quick response.

    I noticed something else while looking into this a little more. I've noticed that unlike the released version, each new LightGroup gets the same HS device addresses. In other words, all new groups get 001788FFFE2549B6_new-G, 001788FFFE2549B6_new, 001788FFFE2549B6_new-K, 001788FFFE2549B6_new-H, and 001788FFFE2549B6_new-S. For scripting this is a problem in that GetDeviceRef will only ever return the reference to the first device with that address.

    Leave a comment:


  • w.vuyk
    replied
    Ken

    I have tested the changes here. Need to do some other testing as well, but I think the new beta will be available end of day or tomorrow. In this beta submitting an empty ist of lights will be caught for new groups with a message to add lights or remove the group. Also the errors should no longer occur.

    Thanks!

    Wim

    Leave a comment:


  • w.vuyk
    replied
    Ken,

    I think I have found the issues here. I found two. One was creating the device address, which initially contains "new" as ID that is used during creation. This should have been the real ID as given by the bridge. Secondly, the on/off device was not correctly added to the device group, which causes the plugin to try to recreate the group device regulary.

    Also, but I guess you know by now is to add lights to the group when you start editing the lights. I will check if I can catch the fact the group still being empty and deny saving the group to prevent this error for the future.

    Wim

    Leave a comment:


  • Beta 2.0.4.3: Creating New Group can cause duplicate root devices

    I first reported this issue here because I thought it was related but now that I've reproduced it I don't think it is related.

    After creating a new group I got the following errors:
    Jul-29 7:38:54 PM JowiHue Error: (CreateNewDevice)::Column 'uniqueid' is constrained to be unique. Value '001788FFFE2549B6_new-G' is already present.
    Jul-29 7:33:40 PM JowiHue Group 4 renamed to Downstairs Floor Lamp
    Jul-29 7:28:54 PM JowiHue Error: (CreateNewDevice)::Column 'uniqueid' is constrained to be unique. Value '001788FFFE2549B6_new-G' is already present.
    Jul-29 7:26:24 PM JowiHue Error: (SetLights)::The given key was not present in the dictionary.
    Jul-29 7:25:58 PM JowiHue Error: (SetLights)::The given key was not present in the dictionary.
    Jul-29 7:21:57 PM JowiHue Group 4 renamed to Downstairs Floor Lamp
    Jul-29 7:21:30 PM JowiHue Error: (CreateNewDevice)::Column 'uniqueid' is constrained to be unique. Value '001788FFFE2549B6_new-G' is already present.
    Jul-29 7:21:29 PM JowiHue New group Floor Lamp successfully created on the bridge
    After these errors, the CreateNewDevice error was logged every 10 mins and a new root device was created for the group. What I didn't remember was the fact that I hadn't added a light to the group when I first created it and that is the root of the problem.

    To Reproduce:

    1. Go to Bridge Maintenance for the plugin.

    2. Expand Groups on Bridge and Click on the "+" button to create a new group.

    3. Name the new group "Test" and Click Submit.

    4. Click on "Edit Lights" and then Click on Submit without adding any lights to the group.

    Your get this error:
    Jul-30 5:58:31 PM JowiHue Error: (postBackProc)::web Maintenance:Index was outside the bounds of the array.
    5. Click on "Edit Lights" again and this time add a light to the group and then click Submit.

    You then get the following errors:
    Jul-30 5:58:40 PM JowiHue Error: (CreateNewDevice)::Column 'uniqueid' is constrained to be unique. Value '001788FFFE2549B6_new-G' is already present.
    Jul-30 5:58:40 PM JowiHue New group Test successfully created on the bridge
    At this point the CreateNewDevice error is logged every 10 minutes and a new root device for the group is created.

    Please let me know what additional info you need. I've collected the logs and can email them to you.

    Ken

Working...
X