Philips Hue plugin

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

Re: Philips Hue plugin

Post by Aquila » Wed Apr 08, 2015 11:18 pm

yokel22 wrote:A pulse at max/min would be good. Having red at both ends of the hue value could be a bit confusing to the end user also. Maybe just have the hue values (0-60000). I was thinking small steps with a autorepeat macro.
I can't limit the hue values. This is due to the Osram bulbs that can be used with the Hue Bridge, they show green for value 0. I think I will make a option to puls on max/min.

If I make the steps configurable each user can use it for their own needs. With a autorepeat macro it is important to remember the Hue Bridge limit of 10 calls to lights per second or 1 call to a group per second.

User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: Philips Hue plugin

Post by yokel22 » Thu Apr 09, 2015 4:10 am

I was wondering if autorepeat macro would overwhelm the bridge :) . I hadn't tried it yet. Configurable stepping is what I'd pictured.

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

Re: Philips Hue plugin

Post by Aquila » Thu Apr 16, 2015 9:30 pm

I have posted a new version of the plugin in the first post.
Changelog for 0.3.4 by Aquila 2015-04-16 wrote: - New function: "cloneLight", "cloneLight2Group" and "cloneGroup". Copy settings from one light/group to another.
- New functions: "satGroupUp", "hueGroupUp", "satGroupDown" and "hueGroupDown". Increases or decreases hue or saturation of a light by a choosen step. (NB! Changes from current GROUP setting, individual light
setting may be diffrent.)
- New functions: "satUp", "satDown", "hueUp" and "hueDown". Increases or decreases hue or saturation of a light by a choosen step.
The up and down function for Hue and saturation is based on a suggestion by yokel22. :)

Please note that groups retain settings given to this group. If you control a light with a different group or a light command the light will change (and the light setting), but not the group setting. Even if all lights in a group has changed status due to other commands, the setting of the group will not change. This is due to the functionality of the Hue Bridge.

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

Re: Philips Hue plugin

Post by Aquila » Thu Apr 16, 2015 9:32 pm

yokel22 wrote:I was wondering if autorepeat macro would overwhelm the bridge :) . I hadn't tried it yet. Configurable stepping is what I'd pictured.
Try out the new version! :)

Have you ever manged to overwhelm the bridge in a normal user case? I have flooded the bridge in a test scenario, but never found a useful case that the bridge can't handle.

User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: Philips Hue plugin

Post by yokel22 » Sat Apr 18, 2015 1:06 pm

I played around with it a bit yesterday. Everything seems to be working well. The pulse at min/max is effective in alerting you. Maybe add a pulse to the dim max.

I've never flooded the bridge in general use. Even when running crazy strobe patterns. Autorepeat macro works quite well for single bulbs. I have it set to .2 repeat. For groups its easier to just press the button every second than holding it down for long periods.

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

Re: Philips Hue plugin

Post by Aquila » Sat Apr 18, 2015 1:21 pm

Thank you. I have already added pulse to the dimUp and dimGroupUp functions. :) Took me 30 seconds. I'm working on the errorhandling in the plugin. So I'm going over every function to add errorhandling, quite a great task. So it may be some days before I publish next version. With changes in every function the bugtesting will take some time.

Siutsch
Experienced User
Posts: 51
Joined: Wed Apr 28, 2010 6:53 am

Re: Philips Hue plugin

Post by Siutsch » Wed Jul 15, 2015 8:56 pm

Thank you for this fantastic plugin.

Just bought a Philips Hue Stater Kit (after I found this topic) and testet this plugin with Eventghost.

Everything seems to work very good! :D

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

Re: Philips Hue plugin

Post by Aquila » Wed Jul 15, 2015 9:17 pm

Siutsch wrote:Thank you for this fantastic plugin.

Just bought a Philips Hue Stater Kit (after I found this topic) and testet this plugin with Eventghost.

Everything seems to work very good! :D
Thank you! :)

Any input to changes are welcome.

krad23
Posts: 6
Joined: Wed Jul 29, 2015 3:19 pm

Re: Philips Hue plugin

Post by krad23 » Wed Jul 29, 2015 3:31 pm

I just installed eventghost to try out your plugin. So far it's been working great on the simple tasks I've tried.
I haven't developed anything big like I have on Tasker+AutoHue though, not yet at least.

krad23
Posts: 6
Joined: Wed Jul 29, 2015 3:19 pm

Re: Philips Hue plugin

Post by krad23 » Thu Jul 30, 2015 9:56 pm

I couldn't really understand when catchEvents() gets called..

But it gave me this idea. Would it be possible to have a continuous listener that generates events whenever a lights status changes? For example if I turn it on or off from a different source like HueTap or my mobile phone

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

Re: Philips Hue plugin

Post by Aquila » Thu Jul 30, 2015 10:17 pm

krad23 wrote:I couldn't really understand when catchEvents() gets called..

But it gave me this idea. Would it be possible to have a continuous listener that generates events whenever a lights status changes? For example if I turn it on or off from a different source like HueTap or my mobile phone
catchEvents() runs in the background every 2 seconds. At the moment it throws events if a light gets unreachable or if a HueTap button is pushed. It's a "pull" prosecess, so the plugin have to ask the bridge everytime to get a new status. This means that there will allways be a delay. For some events its between 1-3 sec (button push), (un)available lightbulb is 5-45 sec as far as I have tested.

What you ask for is possible. The plugin would have to keep track of the status of every light and check if it is changed. It would put a load on the bridge to have this done, so I would have to put in a delay that would mean that a respons would be slow. If people need this I will put it on my "to-do" list.

krad23
Posts: 6
Joined: Wed Jul 29, 2015 3:19 pm

Re: Philips Hue plugin

Post by krad23 » Sat Aug 01, 2015 9:22 pm

while making my own plugin for the iKettle (and basing it on your plugin), I've realized that you should also kill the thread in a __close__, otherwise it might hang when closing eventghost

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

Re: Philips Hue plugin

Post by Aquila » Sun Aug 02, 2015 7:29 pm

krad23 wrote:while making my own plugin for the iKettle (and basing it on your plugin), I've realized that you should also kill the thread in a __close__, otherwise it might hang when closing eventghost
That explains my Eventghost hangig. :p

Thanks, will work this in to next version. Next version will also have the new username/register function Philips is pushing out, the old system will be removed soon so have to change it.

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

Re: Philips Hue plugin

Post by Aquila » Tue Aug 04, 2015 5:30 pm

I have published a new version of the plugin, it is available in the first post as usual.
Changelog wrote:0.3.6 by Aquila 2015-08-04
- Added configuration of Daylight sensor. (Built in sensor in Hue Bridge, depends on date/time and positon NOT real light. Leave position to 'none' to not use.)
- Added button in Configdialog to get random username from bridge. (Philips Hue have removed the posibility to choose own username.)
- Removed "register" function due to new method to connect to bridge.
- Fixed small output bug in errorhandeling
- Eventthread is now stoped on close also, so plugin should no longer hang Eventghost after closing. (Thanks to krad23 for pointing me to this problem.)
0.3.5 by Aquila 2015-04-17 (Not published)
- Option to print errors and results.
- Improved errorhandeling.
- Removed puls from "saveStatus". The Hue bridge does not reset puls setting when it is done pulsing, so saving status with puls setting would restart puls on recallStatus.
- Added option to pulse light on max brightness in "dimUp" and "dimGroupUp" functions.
So this new version gives you more controll over the output of errormessages. It also comes with the new way to get a username from the bridge, you can no longer choose your own username. This is due to changes in the Hue API on this part.

Also the daylight sensor can now be setup in the configdialog. This is not very usefull if you only use Eventghost with Hue, but it has been requested. ;)

I'm working on better events, so that Eventghost can be notified when other apps changes a setting or a light or something.

Please write here if you discover any buggs or if you have requests or comments. :)

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

Re: Philips Hue plugin

Post by Aquila » Fri Aug 07, 2015 12:49 pm

Whoops, there was a bug in version 0.3.6 than made it very hard for new users to use the plugin. This should now be fixed. New version (0.3.6.1) is available in the first post.

Please post here or send me an e-mail if you have any difficulties using the plugin. :)

Post Reply