Issue when trying to recall a HUE scene

This forum is archived topics from before the plugin was moved to the new owner. All topics are locked, but are preserved here for future reference.
lazlohollyfeld
Posts: 52
Joined: Mon Jan 09, 2012 10:37 pm

Issue when trying to recall a HUE scene

Post by lazlohollyfeld »

I just installed some Gledopto ceiling recessed can lights (4). I was only able to add them to indigo once I added them to a room - and not able to add them individually - not sure if that's normal or not..

In any case - I'm trying to create an action to recall a scene. I was able to select the the correct scene creator and scene - and the group shows the lights affected - but i get an error when I try to execute:

Code: Select all

   Action Group                    HUE Scene Test
   Hue Lights Error                Error in plugin execution ExecuteAction:

Traceback (most recent call last):
  File "plugin.py", line 10899, in recallScene
  File "plugin.py", line 8873, in doScene
NameError: global name 'device' is not defined
Indigo 4.7
HUE Plugin v 1.7.35

Anyone scene this? (pun intended)
Attachments
Screen Shot 2020-09-18 at 11.45.09 AM.png
Screen Shot 2020-09-18 at 11.45.09 AM.png (113.99 KiB) Viewed 4267 times
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Issue when trying to recall a HUE scene

Post by nsheldon »

Hi.

Thanks for the report.

I can add support for the Gledopto lights. The easiest way for me to do that is to get about 10 seconds worth of debug log output from you. Just turn on debug logging for about 10 seconds and paste the logs into your reply, along with the name you've given the lights within the Hue app. Debug logging can be toggled on and off in the Plugins menu -> Hue Lights -> Toggle Debugging.

As for the scene issue, that certainly looks like a plugin bug. I'll check it out and see if I can track down the problem without getting more debug log info from you. If I can't find the issue in the code, I'll probably hit you up for some more debug logs while you reproduce that error so I can get more detailed tracking info.

Regards,
Nathan
abplus
Posts: 50
Joined: Tue May 29, 2018 1:01 pm
Location: Westerham, Kent

Re: Issue when trying to recall a HUE scene

Post by abplus »

Hi Nathan,

I am experiencing the same problem. Please let me know if you need any more details.

Thanks !

Code: Select all

 
Hue Lights Debug                Starting recallScene. action values:
configured : True
delayAmount : 900
description : recall hue scene apb-dr night light from hue 2 app on iphone for all hue lights
deviceId : 0
pluginId : com.nathansheldon.indigoplugin.HueLights
pluginTypeId : recallScene
props : com.nathansheldon.indigoplugin.HueLights : (dict)
     description : recall hue scene APB-DR Night Light from Hue 2 app on iPhone for All Hue Lights (string)
     groupId : 0 (string)
     sceneId : ldrlSrGScEuTXzz (string)
     sceneLights : (list)
     sceneLightsDisabler : false (bool)
     userId : ZUtTPP-TaXDXrymWrCrYzXCeE5Pve-9XxSsrlqOk (string)
replaceExisting : True
textToSpeak : 
Device/Type ID:
None

   Hue Lights Error                Error in plugin execution ExecuteAction:

Traceback (most recent call last):
  File "plugin.py", line 10899, in recallScene
  File "plugin.py", line 8873, in doScene
NameError: global name 'device' is not defined

nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Issue when trying to recall a HUE scene

Post by nsheldon »

Thanks for the report and the debug details. That's helpful.
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Issue when trying to recall a HUE scene

Post by nsheldon »

Version 1.7.36 Posted
  • Fixed a bug that caused a plugin error when recalling a Hue scene.
lazlohollyfeld
Posts: 52
Joined: Mon Jan 09, 2012 10:37 pm

Re: Issue when trying to recall a HUE scene

Post by lazlohollyfeld »

Thanks a lot Nathan! I missed your earlier reply and saw someone else was able to supply you with the log... Please let me know if you need anything else - or if you need me to test anything wrt the Gledopto Recessed Lights if you decide to add support!

I am no longer seeing the errors. While this is working for my needs - i thought i'd share something with you that I am seeing:

I have 5 "scene creators" in my dropdown (seems to be devices used with other (real) HUE lights in the house
My iPhone is the only scene creator that allows me to select a scene and then my room's group and actually see the 4 ceiling lights appear (This is perfectly fine for my needs)
When I click on the "scene" dropdown, I see 5 copies of each scene that I have on the HUE app on my iPhone:
duplicate items.png
duplicate items.png (463.42 KiB) Viewed 4100 times
Only 1 of each of the duplicates work/show my ceiling lights
scene showing devices.png
scene showing devices.png (113.83 KiB) Viewed 4100 times
When I select a different copy - i don't see my lights:
scene not showing devices.png
scene not showing devices.png (106.39 KiB) Viewed 4100 times
I turned on debug mode while I was toggling thru the screenshots above - it was too big to attach so I made a link to my gDrive

thanks!!
jbdecker
Posts: 3
Joined: Fri Feb 07, 2020 2:40 pm

Re: Issue when trying to recall a HUE scene

Post by jbdecker »

Hi Nathan,

Not sure if I should create a new thread on this but I've got a similar yet slightly different error when trying to recall a hue scene:

Hue Lights Error Error in plugin execution GetUiDynamicList:

Traceback (most recent call last):
File "plugin.py", line 4772, in scenesListGenerator
KeyError: (u'none',)

Any ideas what I can try? The scene's appear empty even though there are many of them.

Thanks!

Here's a debug of this list:

Hue Lights Debug Loaded groups list - {u'24': {u'name': u'Guest Bathroom', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'25': {u'name': u'Guest Bedroom', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'26': {u'name': u'Pool', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'27': {u'name': u'Sunroom', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'20': {u'name': u'Spare Bedroom', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'21': {u'name': u'Hallway', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'22': {u'name': u"Jagger's Bathroom", u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'23': {u'name': u'Laundry Room', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'28': {u'name': u'discoAGroup', u'lights': [u'1', u'2', u'3'], u'state': {u'any_on': False, u'all_on': False}, u'recycle': False, u'sensors': [], u'type': u'LightGroup', u'action': {u'on': False, u'hue': 14957, u'colormode': u'xy', u'effect': u'none', u'alert': u'none', u'xy': [0.4576, 0.4099], u'bri': 254, u'ct': 366, u'sat': 141}}, u'29': {u'name': u'discoAGroupOdd', u'lights': [u'2'], u'state': {u'any_on': False, u'all_on': False}, u'recycle': False, u'sensors': [], u'type': u'LightGroup', u'action': {u'on': False, u'hue': 14957, u'colormode': u'xy', u'effect': u'none', u'alert': u'none', u'xy': [0.4576, 0.4099], u'bri': 254, u'ct': 366, u'sat': 141}}, u'1': {u'name': u'Bathroom', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'3': {u'name': u'Kitchen', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'2': {u'name': u'Living Room', u'lights': [u'32', u'33', u'16', u'6', u'2', u'8', u'1', u'3', u'7', u'4', u'5', u'14', u'15'], u'state': {u'any_on': True, u'all_on': False}, u'action': {u'on': False, u'hue': 8576, u'colormode': u'xy', u'effect': u'none', u'alert': u'none', u'xy': [0.4464, 0.4072], u'bri': 1, u'ct': 347, u'sat': 123}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Living room'}, u'5': {u'name': u'Entertainment area 1', u'stream': {u'proxymode': u'manual', u'active': True, u'proxynode': u'/lights/33', u'owner': u'c4ecf23b-ed83-41fd-acde-d9986e73dd9a'}, u'locations': {u'33': [0.57, 0.9, 1.0], u'32': [-0.62, 0.89, 1.0]}, u'lights': [u'33', u'32'], u'state': {u'any_on': True, u'all_on': True}, u'action': {u'on': True, u'hue': 41826, u'colormode': u'xy', u'effect': u'none', u'alert': u'none', u'xy': [0.3128, 0.3255], u'bri': 6, u'ct': 153, u'sat': 77}, u'recycle': False, u'sensors': [], u'type': u'Entertainment', u'class': u'TV'}, u'4': {u'name': u'Entertainment Room', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'6': {u'name': u'Babys Room', u'lights': [u'27', u'28'], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'hue': 8418, u'colormode': u'ct', u'effect': u'none', u'alert': u'select', u'xy': [0.4573, 0.41], u'bri': 1, u'ct': 366, u'sat': 140}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Living room'}, u'9': {u'name': u"Jagger's Bedroom", u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'8': {u'name': u'Office Hue', u'lights': [u'21', u'30', u'31'], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'hue': 8736, u'colormode': u'xy', u'effect': u'none', u'alert': u'none', u'xy': [0.5337, 0.3859], u'bri': 198, u'ct': 500, u'sat': 191}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'10': {u'name': u'Master Bedroom', u'lights': [u'11', u'10', u'9', u'19', u'20'], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'hue': 6291, u'colormode': u'xy', u'effect': u'none', u'alert': u'select', u'xy': [0.5612, 0.4042], u'bri': 1, u'ct': 500, u'sat': 251}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'13': {u'name': u'Family Room', u'lights': [u'34'], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'hue': 41442, u'colormode': u'xy', u'effect': u'none', u'alert': u'select', u'xy': [0.3146, 0.3303], u'bri': 254, u'ct': 156, u'sat': 75}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'12': {u'name': u'Master Bathroom', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'15': {u'name': u'Courtyard', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'14': {u'name': u'Back Yard', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'17': {u'name': u'Front Door', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'16': {u'name': u'Foyer', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'19': {u'name': u'Outside', u'lights': [u'25', u'26', u'22', u'23', u'24', u'17', u'18'], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'hue': 10899, u'colormode': u'xy', u'effect': u'none', u'alert': u'select', u'xy': [0.4695, 0.4751], u'bri': 76, u'ct': 385, u'sat': 254}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'18': {u'name': u'Front Yard', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}, u'30': {u'name': u'discoAGroupEven', u'lights': [u'1', u'3'], u'state': {u'any_on': False, u'all_on': False}, u'recycle': False, u'sensors': [], u'type': u'LightGroup', u'action': {u'on': False, u'hue': 14957, u'colormode': u'xy', u'effect': u'none', u'alert': u'none', u'xy': [0.4576, 0.4099], u'bri': 254, u'ct': 366, u'sat': 141}}, u'32': {u'name': u'Workshop', u'lights': [], u'state': {u'any_on': False, u'all_on': False}, u'action': {u'on': False, u'alert': u'none'}, u'recycle': False, u'sensors': [], u'type': u'Room', u'class': u'Other'}}
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Issue when trying to recall a HUE scene

Post by nsheldon »

lazlohollyfeld wrote:I have 5 "scene creators" in my dropdown (seems to be devices used with other (real) HUE lights in the house
My iPhone is the only scene creator that allows me to select a scene and then my room's group and actually see the 4 ceiling lights appear (This is perfectly fine for my needs)
When I click on the "scene" dropdown, I see 5 copies of each scene that I have on the HUE app on my iPhone:
Thanks for the report. At first glance this seem like expected behavior (at least from my own experience). The Hue app seems to create multiple copies of each scene with different combinations of lights from various rooms in your house. I don’t know why it does this or how to prevent it. That’s one of the reasons the Recall Hue Scene window is so complicated, because I couldn’t find any logical pattern to how scenes in the Hue bridge were organized so I just make all the options available in the dialog box. The Group Limit menu appears to be acting as designed. All that menu does is remove lights in the selected Scene that are not part of the selected Group. So if the Scene selected contains a light from the living room and a light from the dining room, if the Group Limit is set to "0: (All Hue Lights)", you'll see both lights listed and both of those lights will be affected when the scene is recalled. If the Group Limit is set to "1: Living Room" (the number will probably be different on your bridge), only the light in the living room will be affected by the recalled scene. If the Group Limit is set to "2: Dining Room", only the light in the dining room will be affected. Of course, if the Group Limit is set to "3: Bedroom", no lights will be affected because the Scene contains no lights in the bedroom.
jbdecker wrote:Hi Nathan,

Not sure if I should create a new thread on this but I've got a similar yet slightly different error when trying to recall a hue scene:

Hue Lights Error Error in plugin execution GetUiDynamicList:

Traceback (most recent call last):
File "plugin.py", line 4772, in scenesListGenerator
KeyError: (u'none',)

Any ideas what I can try? The scene's appear empty even though there are many of them.

Thanks!
Thanks for the report. It appears there might be some unexpected data coming from the Hue bridge that the plugin isn't expecting. The debug info you provided was just for a group list. I need to see debug logs starting from just before you click the "Edit Action Settings" button in the Recall Hue Scene action. You can get this by first opening the trigger, action group, schedule or control page that contains the Recall Hue Scene action. Then click the Plugins menu and select Hue Lights -> Toggle Debugging. Then click the "Edit Action Settings" button in the action window. You should see the error in the log window. Cancel the Edit window and choose the Toggle Debugging option from the Plugins -> Hue Lights menu again. Copy and paste the full debug log into your reply, or put it in a zipped file as lazlohollyfeld did.
jbdecker
Posts: 3
Joined: Fri Feb 07, 2020 2:40 pm

Re: Issue when trying to recall a HUE scene

Post by jbdecker »

Thank you!

The debug can be found here: https://www.dropbox.com/s/vmyjc4wwmyq5p ... g.rtf?dl=0

James
abplus
Posts: 50
Joined: Tue May 29, 2018 1:01 pm
Location: Westerham, Kent

Re: Issue when trying to recall a HUE scene

Post by abplus »

nsheldon wrote:Version 1.7.36 Posted
  • Fixed a bug that caused a plugin error when recalling a Hue scene.

Many thanks, all working fine for me now. :D

Andrew.
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Issue when trying to recall a HUE scene

Post by nsheldon »

Version 1.7.37 Posted
  • Fixed a bug that would cause an error when attempting to select a Hue scene in the Recall Hue Scene dialog if the scene parameters on the Hue bridge don't include a corresponding scene creator (owner).
  • Added support for a new dimming-only Hue white lamp.
Locked

Return to “Archives”