Philips Hue plugin

Questions and comments specific to a particular plugin should go here.
Post Reply
Aquila
Experienced User
Posts: 86
Joined: Wed Jan 28, 2015 2:49 am

Re: Philips Hue plugin

Post by Aquila » Sun Aug 09, 2015 12:13 am

Bugfix update now availeble in first post. Clonelight, clonegroup and clonelight2group funictions were broken. They are now fixed, as a bonus they now handle "hue lux" lights correctly.
Changelog for ver. 0.3.6.2 wrote:- Fixed bugs in "cloneLight", "cloneLight2Group" and "cloneGroup". Thanks to yokel22 for pointing me to this.
As always, please tell me about bugs, requests, questions and so on. :) It's the only way to make this plugin better. Thank you. :)

bxr
Posts: 15
Joined: Sat Jul 21, 2012 2:56 am

Re: Philips Hue plugin

Post by bxr » Fri Nov 13, 2015 7:00 pm

Great plugin!!! Thanks for the hard work!

I added a correction to an error line (1512).
I guess this correction should be to other error lines as well (str(r['state']['on'])) ?
Attachments
__init__.py
(117.24 KiB) Downloaded 134 times

RiseUp
Posts: 15
Joined: Mon Nov 24, 2014 3:28 am

Re: Philips Hue plugin

Post by RiseUp » Thu Dec 31, 2015 10:36 pm

bxr wrote:I added a correction to an error line (1512).
I guess this correction should be to other error lines as well (str(r['state']['on'])) ?
Thanks for that tip, bxr. :D That fixed the error I was experiencing.

Instead of downloading your attachment, I simply modified the code as you explained where I was having the problem. Does your edited code have just the change on line 1512, or did you update it on the other problematic lines, as well?

Aquila
Experienced User
Posts: 86
Joined: Wed Jan 28, 2015 2:49 am

Re: Philips Hue plugin

Post by Aquila » Fri Jan 01, 2016 7:43 pm

Thanks for the tips bxr!

I have uploaded a new version (in the first post, as always) witch corrects this mistake. It should be the only place it occures.

Please post here if you find any other errors!

RiseUp
Posts: 15
Joined: Mon Nov 24, 2014 3:28 am

Re: Philips Hue plugin

Post by RiseUp » Mon Jan 04, 2016 1:39 pm

Aquila wrote:Please post here if you find any other errors!
At line 2427, the print statement should be:

Code: Select all

print 'Info: ' + str(r)

Phil
Experienced User
Posts: 108
Joined: Tue Apr 15, 2014 10:42 am
Location: Merseyside, UK

Re: Philips Hue plugin

Post by Phil » Thu Feb 18, 2016 3:30 pm

Hi
Im trying to switch from using python only to this plugin, so the bridge is already registered with something on my system.
When I try to add the addin I get this

14:58:27 Traceback (most recent call last) (1710):
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 59, in ProcessingTask
14:58:27 self.Configure(*args, **kwargs)
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 165, in Configure
14:58:27 treeItem.Configure(*args)
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 101, in Configure
14:58:27 return self.executable.Configure(*args)
14:58:27 File "C:\Program Files (x86)\EventGhost\plugins\PhilipsHue\__init__.py", line 312, in Configure
14:58:27 autoRestore = panel.Choice(autorestore.index(auto), choices=['On','Off'])
14:58:27 NameError: global name 'autorestore' is not defined
14:58:27 Unhandled exception in WorkerThread <ActionThread>:
14:58:27 Traceback (most recent call last) (1710):
14:58:27 Callers stack:
14:58:27 File "threading.pyc", line 504, in __bootstrap
14:58:27 File "wx\_core.pyc", line 14669, in <lambda>
14:58:27 File "threading.pyc", line 532, in __bootstrap_inner
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Core.py", line 197, in Notify
14:58:27 File "threading.pyc", line 484, in run
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 354, in __MainLoop
14:58:27 listener(value)
14:58:27 self.__DoOneEvent()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\MainFrame\TreeCtrl.py", line 844, in OnNodeSelected
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 328, in __DoOneEvent
14:58:27 path = node.GetPath()
14:58:27 action.PrintUnhandledException()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 377, in GetPath
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionThread.py", line 92, in HandleAction
14:58:27 path.append(parent.childs.index(item))
14:58:27 pluginInfo.treeItem.Refresh()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 69, in __call__
14:58:27 AttributeError: 'NoneType' object has no attribute 'childs'
14:58:27 self.processed.set()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginItem.py", line 125, in Delete
14:58:27 self.info = None
14:58:27 Traceback (most recent call last) (1710):
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 326, in __DoOneEvent
14:58:27 self.HandleAction(action)
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionThread.py", line 87, in HandleAction
14:58:27 action()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 62, in __call__
14:58:27 self.returnValue = self.func(*self.args, **self.kwargs)
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginItem.py", line 119, in DoIt
14:58:27 info.Close()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 231, in Close
14:58:27 self.instance.__close__()
14:58:27 File "C:\Program Files (x86)\EventGhost\plugins\PhilipsHue\__init__.py", line 253, in __close__
14:58:27 if not self.stopThreadEvent.isSet(): self.stopThreadEvent.set()
14:58:27 AttributeError: 'PhilipsHue' object has no attribute 'stopThreadEvent'


And nothing appears in the configuration list.
Any ideas?

thanks

Aquila
Experienced User
Posts: 86
Joined: Wed Jan 28, 2015 2:49 am

Re: Philips Hue plugin

Post by Aquila » Fri Feb 19, 2016 4:40 pm

New version, 0.3.6.4 available in the first post.

Changelog:
0.3.6.4 by Aquila 2016-02-19
- Cleaned up test code that broke the plugin.
- Fixed bug in info output in "getGroupStatus". (Thanks to RiseUp for pointing me to this.)

As always any requests or bugreports are welcome.

Aquila
Experienced User
Posts: 86
Joined: Wed Jan 28, 2015 2:49 am

Re: Philips Hue plugin

Post by Aquila » Fri Feb 19, 2016 4:42 pm

Phil wrote:Hi
Im trying to switch from using python only to this plugin, so the bridge is already registered with something on my system.
When I try to add the addin I get this

14:58:27 Traceback (most recent call last) (1710):
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 59, in ProcessingTask
14:58:27 self.Configure(*args, **kwargs)
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 165, in Configure
14:58:27 treeItem.Configure(*args)
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 101, in Configure
14:58:27 return self.executable.Configure(*args)
14:58:27 File "C:\Program Files (x86)\EventGhost\plugins\PhilipsHue\__init__.py", line 312, in Configure
14:58:27 autoRestore = panel.Choice(autorestore.index(auto), choices=['On','Off'])
14:58:27 NameError: global name 'autorestore' is not defined
14:58:27 Unhandled exception in WorkerThread <ActionThread>:
14:58:27 Traceback (most recent call last) (1710):
14:58:27 Callers stack:
14:58:27 File "threading.pyc", line 504, in __bootstrap
14:58:27 File "wx\_core.pyc", line 14669, in <lambda>
14:58:27 File "threading.pyc", line 532, in __bootstrap_inner
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Core.py", line 197, in Notify
14:58:27 File "threading.pyc", line 484, in run
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 354, in __MainLoop
14:58:27 listener(value)
14:58:27 self.__DoOneEvent()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\MainFrame\TreeCtrl.py", line 844, in OnNodeSelected
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 328, in __DoOneEvent
14:58:27 path = node.GetPath()
14:58:27 action.PrintUnhandledException()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 377, in GetPath
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionThread.py", line 92, in HandleAction
14:58:27 path.append(parent.childs.index(item))
14:58:27 pluginInfo.treeItem.Refresh()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 69, in __call__
14:58:27 AttributeError: 'NoneType' object has no attribute 'childs'
14:58:27 self.processed.set()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginItem.py", line 125, in Delete
14:58:27 self.info = None
14:58:27 Traceback (most recent call last) (1710):
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 326, in __DoOneEvent
14:58:27 self.HandleAction(action)
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionThread.py", line 87, in HandleAction
14:58:27 action()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 62, in __call__
14:58:27 self.returnValue = self.func(*self.args, **self.kwargs)
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginItem.py", line 119, in DoIt
14:58:27 info.Close()
14:58:27 File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 231, in Close
14:58:27 self.instance.__close__()
14:58:27 File "C:\Program Files (x86)\EventGhost\plugins\PhilipsHue\__init__.py", line 253, in __close__
14:58:27 if not self.stopThreadEvent.isSet(): self.stopThreadEvent.set()
14:58:27 AttributeError: 'PhilipsHue' object has no attribute 'stopThreadEvent'


And nothing appears in the configuration list.
Any ideas?

thanks
The error is some code I have been trying out that was not cleaned up before I published the last version. I had a fixed version ready, so I put it up now in the first post.

I'm working on catching events from changes to light settings from other applications, and I used the wrong version to fix a previous bug. Sorry!

Phil
Experienced User
Posts: 108
Joined: Tue Apr 15, 2014 10:42 am
Location: Merseyside, UK

Re: Philips Hue plugin

Post by Phil » Mon Feb 22, 2016 12:37 pm

Glad its not me!
Thanks

Aquila
Experienced User
Posts: 86
Joined: Wed Jan 28, 2015 2:49 am

Re: Philips Hue plugin

Post by Aquila » Mon Feb 22, 2016 3:03 pm

Phil wrote:Glad its not me!
Thanks
Did the fixed version work for you?

Phil
Experienced User
Posts: 108
Joined: Tue Apr 15, 2014 10:42 am
Location: Merseyside, UK

Re: Philips Hue plugin

Post by Phil » Thu Feb 25, 2016 3:15 pm

Hi, it worked to the point that it let me connect to the bridge,but then failed with similar issues to the first post I did.

Aquila
Experienced User
Posts: 86
Joined: Wed Jan 28, 2015 2:49 am

Re: Philips Hue plugin

Post by Aquila » Thu Feb 25, 2016 7:14 pm

Phil wrote:Hi, it worked to the point that it let me connect to the bridge,but then failed with similar issues to the first post I did.
Please post the log from the error. I should be able to pinpoint any errors in the code.

Aquila
Experienced User
Posts: 86
Joined: Wed Jan 28, 2015 2:49 am

Re: Philips Hue plugin

Post by Aquila » Fri Feb 26, 2016 10:49 pm

Changelog wrote:0.3.6.5 by Aquila 2016-02-26
- Fix crash in config dialog for the plugin.
I published a new version in the first post. This should fix the error in saving the plugin configdata.

As always, please report errors or requests for new features. :)

Windhowl
Posts: 11
Joined: Wed Apr 06, 2016 5:41 pm

Re: Philips Hue plugin

Post by Windhowl » Wed Apr 06, 2016 5:53 pm

Hi
First of all I want to say thank you for this awesome plugin. Because of you there are so many possibilities :)

Now to my request:

I just added a Philips Hue Dimmer to my setup and wanted to trigger events with the 4 different buttons. I see that Eventghost is aware of button presses but every button has the same event output if I don't miss anything.
So my feature request would be to make it possible to receive each single button as an event.

Is that possible?

Greets Windhowl

Aquila
Experienced User
Posts: 86
Joined: Wed Jan 28, 2015 2:49 am

Re: Philips Hue plugin

Post by Aquila » Wed Apr 06, 2016 7:07 pm

Windhowl wrote:Hi
First of all I want to say thank you for this awesome plugin. Because of you there are so many possibilities :)

Now to my request:

I just added a Philips Hue Dimmer to my setup and wanted to trigger events with the 4 different buttons. I see that Eventghost is aware of button presses but every button has the same event output if I don't miss anything.
So my feature request would be to make it possible to receive each single button as an event.

Is that possible?

Greets Windhowl
Hmm, I don't have the Dimmer myself. I should maybe gather some cash and pick one up to fix this.

I also found another possible solution that would enable all switches, but I have to test it a bit first to see that it works correctly.

Post Reply