Page 8 of 11

Re: Philips Hue plugin

Posted: Sun Oct 16, 2016 10:09 am
by Aquila
Thank you!

It seems some other app is updating the status of the button, but not changing anything, just the "last updated" timestamp. I could try to make a work around, but since I don't have this button myself you have to be my tester.

Re: Philips Hue plugin

Posted: Sun Oct 16, 2016 10:34 am
by Aquila
jjazdk wrote:
Aquila wrote:If you switch to "All results" for outptlevel in the config, and then make macros for the events of the buttons and use the "getSensorStatus" action for the apropriate button. I'd like to see what changes, and if its something unimportant I can set up the plugin to ignore this changes.
Here you go, I setup the macro to read sensorstatus for both buttons at every call, I hope that is okay:

11:35:08 PhilipsHue.XFDHueDim2Btn4000State.change
11:35:08 gettingsensorstatus
11:35:08 Philips Hue: Get sensor status: 03 - XFDHueDim2Btn1000State
11:35:08 Info: {u'name': u'XFDHueDim2Btn1000State', u'uniqueid': u'E524EE76-5069-40F8-BFC4-756C915A', u'config': {u'on': True, u'reachable': True}, u'swversion': u'1.0', u'state': {u'status': 0, u'lastupdated': u'2016-10-16T09:35:06'}, u'manufacturername': u'xfiredesigns', u'recycle': False, u'type': u'CLIPGenericStatus', u'modelid': u'ButtonState'}
11:35:08 Philips Hue: Get sensor status: 04 - XFDHueDim2Btn4000State
11:35:08 Info: {u'name': u'XFDHueDim2Btn4000State', u'uniqueid': u'17A36714-0665-4581-8348-8D22550A', u'config': {u'on': True, u'reachable': True}, u'swversion': u'1.0', u'state': {u'status': 0, u'lastupdated': u'2016-10-16T09:35:06'}, u'manufacturername': u'xfiredesigns', u'recycle': False, u'type': u'CLIPGenericStatus', u'modelid': u'ButtonState'}
11:35:18 PhilipsHue.XFDHueDim2Btn1000State.change
11:35:18 gettingsensorstatus
11:35:18 Philips Hue: Get sensor status: 03 - XFDHueDim2Btn1000State
11:35:18 Info: {u'name': u'XFDHueDim2Btn1000State', u'uniqueid': u'E524EE76-5069-40F8-BFC4-756C915A', u'config': {u'on': True, u'reachable': True}, u'swversion': u'1.0', u'state': {u'status': 0, u'lastupdated': u'2016-10-16T09:35:16'}, u'manufacturername': u'xfiredesigns', u'recycle': False, u'type': u'CLIPGenericStatus', u'modelid': u'ButtonState'}
11:35:18 Philips Hue: Get sensor status: 04 - XFDHueDim2Btn4000State
11:35:18 Info: {u'name': u'XFDHueDim2Btn4000State', u'uniqueid': u'17A36714-0665-4581-8348-8D22550A', u'config': {u'on': True, u'reachable': True}, u'swversion': u'1.0', u'state': {u'status': 0, u'lastupdated': u'2016-10-16T09:35:16'}, u'manufacturername': u'xfiredesigns', u'recycle': False, u'type': u'CLIPGenericStatus', u'modelid': u'ButtonState'}
11:35:18 PhilipsHue.XFDHueDim2Btn4000State.change
11:35:18 gettingsensorstatus
11:35:18 Philips Hue: Get sensor status: 03 - XFDHueDim2Btn1000State
11:35:18 Info: {u'name': u'XFDHueDim2Btn1000State', u'uniqueid': u'E524EE76-5069-40F8-BFC4-756C915A', u'config': {u'on': True, u'reachable': True}, u'swversion': u'1.0', u'state': {u'status': 0, u'lastupdated': u'2016-10-16T09:35:16'}, u'manufacturername': u'xfiredesigns', u'recycle': False, u'type': u'CLIPGenericStatus', u'modelid': u'ButtonState'}
11:35:18 Philips Hue: Get sensor status: 04 - XFDHueDim2Btn4000State
11:35:18 Info: {u'name': u'XFDHueDim2Btn4000State', u'uniqueid': u'17A36714-0665-4581-8348-8D22550A', u'config': {u'on': True, u'reachable': True}, u'swversion': u'1.0', u'state': {u'status': 0, u'lastupdated': u'2016-10-16T09:35:16'}, u'manufacturername': u'xfiredesigns', u'recycle': False, u'type': u'CLIPGenericStatus', u'modelid': u'ButtonState'}
11:35:29 PhilipsHue.XFDHueDim2Btn1000State.change
11:35:29 gettingsensorstatus
11:35:29 Philips Hue: Get sensor status: 03 - XFDHueDim2Btn1000State
11:35:29 Info: {u'name': u'XFDHueDim2Btn1000State', u'uniqueid': u'E524EE76-5069-40F8-BFC4-756C915A', u'config': {u'on': True, u'reachable': True}, u'swversion': u'1.0', u'state': {u'status': 0, u'lastupdated': u'2016-10-16T09:35:26'}, u'manufacturername': u'xfiredesigns', u'recycle': False, u'type': u'CLIPGenericStatus', u'modelid': u'ButtonState'}
11:35:29 Philips Hue: Get sensor status: 04 - XFDHueDim2Btn4000State
11:35:29 Info: {u'name': u'XFDHueDim2Btn4000State', u'uniqueid': u'17A36714-0665-4581-8348-8D22550A', u'config': {u'on': True, u'reachable': True}, u'swversion': u'1.0', u'state': {u'status': 0, u'lastupdated': u'2016-10-16T09:35:26'}, u'manufacturername': u'xfiredesigns', u'recycle': False, u'type': u'CLIPGenericStatus', u'modelid': u'ButtonState'}
11:35:29 PhilipsHue.XFDHueDim2Btn4000State.change
11:35:29 gettingsensorstatus
11:35:29 Philips Hue: Get sensor status: 03 - XFDHueDim2Btn1000State
11:35:29 Info: {u'name': u'XFDHueDim2Btn1000State', u'uniqueid': u'E524EE76-5069-40F8-BFC4-756C915A', u'config': {u'on': True, u'reachable': True}, u'swversion': u'1.0', u'state': {u'status': 0, u'lastupdated': u'2016-10-16T09:35:26'}, u'manufacturername': u'xfiredesigns', u'recycle': False, u'type': u'CLIPGenericStatus', u'modelid': u'ButtonState'}
11:35:29 Philips Hue: Get sensor status: 04 - XFDHueDim2Btn4000State
11:35:29 Info: {u'name': u'XFDHueDim2Btn4000State', u'uniqueid': u'17A36714-0665-4581-8348-8D22550A', u'config': {u'on': True, u'reachable': True}, u'swversion': u'1.0', u'state': {u'status': 0, u'lastupdated': u'2016-10-16T09:35:26'}, u'manufacturername': u'xfiredesigns', u'recycle': False, u'type': u'CLIPGenericStatus', u'modelid': u'ButtonState'}
I have test version for you. I can't test it fully at my place, since I don't have the same switch. I hope it works. It should also give you events when buttons are really pushed.
__init__.py
Test version
(123.6 KiB) Downloaded 167 times

Re: Philips Hue plugin

Posted: Sun Oct 16, 2016 7:50 pm
by jjazdk
Aquila wrote:I have test version for you. I can't test it fully at my place, since I don't have the same switch. I hope it works. It should also give you events when buttons are really pushed.
__init__.py
It sort of works :-) The state.change every 10 seconds is gone, but...

Upon pressing a button on the dimmer switch, the plug-in outputs a very angry log in red characters :-)

Log:
21:47:09 ---> Welcome to EventGhost <---
21:47:10 Autostart
21:47:10 Plugin: X10: Generic X10
21:47:11 Plugin: Task Create/Switch Events
21:47:11 Plugin: JRiver Media Center Event Plugin
21:47:11 Plugin: Philips Hue
21:47:11 PhilipsHue is started, and connecting to: 192.168.1.90...
21:47:11 Connected!
21:47:11 Plugin: Timer
21:47:11 Main.OnInit
21:47:24 Keyerror: Probably none-colored light.
21:47:24 Keyerror: Probably none-colored light.
21:47:24 Keyerror: Probably none-colored light.
21:47:24 PhilipsHue.12.changed {'bri': 250}
21:47:24 Exception in thread Thread-5:
21:47:24 Traceback (most recent call last):
21:47:24 File "threading.pyc", line 532, in __bootstrap_inner
21:47:24 File "threading.pyc", line 484, in run
21:47:24 File "C:\Program Files (x86)\EventGhost\plugins\PhilipsHue\__init__.py", line 369, in catchEvents
21:47:24 self.TriggerEvent(old_sensors['name'] + '.status_' + self.sensors['state']['status'])
21:47:24 TypeError: coercing to Unicode: need string or buffer, int found
21:47:24
21:48:15 System.Idle
21:48:24 System.UnIdle

Re: Philips Hue plugin

Posted: Sun Oct 16, 2016 9:25 pm
by Aquila
jjazdk wrote:It sort of works :-) The state.change every 10 seconds is gone, but...

Upon pressing a button on the dimmer switch, the plug-in outputs a very angry log in red characters :-)

Log:
21:47:09 ---> Welcome to EventGhost <---
21:47:10 Autostart
21:47:10 Plugin: X10: Generic X10
21:47:11 Plugin: Task Create/Switch Events
21:47:11 Plugin: JRiver Media Center Event Plugin
21:47:11 Plugin: Philips Hue
21:47:11 PhilipsHue is started, and connecting to: 192.168.1.90...
21:47:11 Connected!
21:47:11 Plugin: Timer
21:47:11 Main.OnInit
21:47:24 Keyerror: Probably none-colored light.
21:47:24 Keyerror: Probably none-colored light.
21:47:24 Keyerror: Probably none-colored light.
21:47:24 PhilipsHue.12.changed {'bri': 250}
21:47:24 Exception in thread Thread-5:
21:47:24 Traceback (most recent call last):
21:47:24 File "threading.pyc", line 532, in __bootstrap_inner
21:47:24 File "threading.pyc", line 484, in run
21:47:24 File "C:\Program Files (x86)\EventGhost\plugins\PhilipsHue\__init__.py", line 369, in catchEvents
21:47:24 self.TriggerEvent(old_sensors['name'] + '.status_' + self.sensors['state']['status'])
21:47:24 TypeError: coercing to Unicode: need string or buffer, int found
21:47:24
21:48:15 System.Idle
21:48:24 System.UnIdle


Thanks! Looks like I forgot a string conversion. I have added the string conversion, hope this one fixes the problem!
[attachment=0]__init__.py[/attachment]

Re: Philips Hue plugin

Posted: Mon Oct 17, 2016 9:32 pm
by jjazdk
Aquila wrote:Thanks! Looks like I forgot a string conversion. I have added the string conversion, hope this one fixes the problem!
__init__.py
This looks promising!

Upon pressing button4 (it switches off my kitchen lights), I get this log:
23:26:33 PhilipsHue.12.off
23:26:33 PhilipsHue.9.off
23:26:33 PhilipsHue.8.off
23:26:33 PhilipsHue.Hue dimmer switch 1.button4002
23:26:33 PhilipsHue.XFDHueDim2Btn4000State.status_1
23:26:35 PhilipsHue.XFDHueDim2Btn4000State.status_0

Pressing button4 again (when the lights are already off), yields this log:
23:27:37 PhilipsHue.Hue dimmer switch 1.button4002
23:27:37 PhilipsHue.XFDHueDim2Btn4000State.status_1
23:27:39 PhilipsHue.XFDHueDim2Btn4000State.status_0

Pressing button1 (switch on kitchen lights), I get this log:
23:27:52 PhilipsHue.12.on
23:27:52 PhilipsHue.9.on
23:27:52 PhilipsHue.8.on
23:27:52 PhilipsHue.XFDHueDim2Btn1000State.status_1
23:27:52 PhilipsHue.Hue dimmer switch 1.button1002
23:27:59 PhilipsHue.XFDHueDim2Btn1000State.status_0

Pressing button1 once more (with the lights already on), gives this:
23:29:43 PhilipsHue.Hue dimmer switch 1.button1000
23:29:45 PhilipsHue.XFDHueDim2Btn1000State.status_1
23:29:45 PhilipsHue.Hue dimmer switch 1.button1002
23:29:47 PhilipsHue.XFDHueDim2Btn1000State.status_0

Long-pressing button1 (switches kitchen, hall and livingroom lights to movei mode), gives a rather long log:
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 PhilipsHue.12.changed {'bri': 2}
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 PhilipsHue.1.changed {'bri': 1}
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 PhilipsHue.3.changed {'bri': 1}
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 PhilipsHue.2.changed {'bri': 2}
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 PhilipsHue.4.changed {'bri': 1}
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 Keyerror: Probably none-colored light.
23:30:38 PhilipsHue.7.changed {'bri': 2}
23:30:38 PhilipsHue.6.changed {'bri': 1}
23:30:38 PhilipsHue.9.changed {'bri': 1}
23:30:38 PhilipsHue.8.changed {'bri': 1}
23:30:38 PhilipsHue.Hue dimmer switch 1.button1001
23:30:40 PhilipsHue.Hue dimmer switch 1.button1003
23:30:55 Keyerror: Probably none-colored light.
23:30:55 Keyerror: Probably none-colored light.
23:30:55 Keyerror: Probably none-colored light.
23:30:55 Keyerror: Probably none-colored light.
23:30:55 Keyerror: Probably none-colored light.
23:30:55 Keyerror: Probably none-colored light.
23:30:59 PhilipsHue.3.changed {'hue': 12596, 'sat': 224}
23:30:59 PhilipsHue.2.changed {'hue': 12596, 'sat': 224}
23:31:08 PhilipsHue.1.changed {'hue': 12596, 'sat': 224}

Re: Philips Hue plugin

Posted: Tue Oct 18, 2016 7:54 am
by Aquila
That seems to be a correct response.

The "Keyerror" is due to that I suddenly realized that the "non-colored" lights don't have a hue and sat setting. A temporary fix was to catch the error, I will in a future version handle this differently.

It seems like you have a "fake" button imitating the real button, I guess thats the iPad app.

Re: Philips Hue plugin

Posted: Tue Oct 18, 2016 4:33 pm
by jjazdk
Aquila wrote:It seems like you have a "fake" button imitating the real button, I guess thats the iPad app.
Well... The iPad was turned off, when I did these logs, so.. :-)

Re: Philips Hue plugin

Posted: Sat Oct 22, 2016 11:13 am
by skribb
Can't wait to try this out.

Will buy Hue gen3 ASAP to replace my LIFX gen1!

Re: Philips Hue plugin

Posted: Thu Oct 27, 2016 5:56 pm
by skribb
Just got a Hue gen3 starter kit and playing around with your plugin now.

Working pretty well so far! Just wondering, I can't seem to make a cold white. How do I change the Kelvin to 4500?
Using "change to white" makes it lime green and setting the "saturation" to 0 +" brightness" 254 on "change light" makes it warm white.

Re: Philips Hue plugin

Posted: Thu Oct 27, 2016 6:03 pm
by Aquila
skribb wrote:Just got a Hue gen3 starter kit and playing around with your plugin now.

Working pretty well so far! Just wondering, I can't seem to make a cold white. How do I change the Kelvin to 4500?
Using "change to white" makes it lime green and setting the "saturation" to 0 +" brightness" 254 on "change light" makes it warm white.
This seems to be dependent on the bulb you use. The best way is to play with the settings in the original app untill you have the desired white. Then get the settings via my plugin and use this. I get cold white on my bulbs with sat:0 and bri:254. The "change to white" gives me varm white (the same as the bulb defaults to).

Re: Philips Hue plugin

Posted: Thu Oct 27, 2016 7:03 pm
by skribb
Aquila wrote:
skribb wrote:Just got a Hue gen3 starter kit and playing around with your plugin now.

Working pretty well so far! Just wondering, I can't seem to make a cold white. How do I change the Kelvin to 4500?
Using "change to white" makes it lime green and setting the "saturation" to 0 +" brightness" 254 on "change light" makes it warm white.
This seems to be dependent on the bulb you use. The best way is to play with the settings in the original app untill you have the desired white. Then get the settings via my plugin and use this. I get cold white on my bulbs with sat:0 and bri:254. The "change to white" gives me varm white (the same as the bulb defaults to).
Oh I see, interesting. What version of Hue do you have? Is it Generation 1, 2 or 3?

Is it "get status as command"?

Re: Philips Hue plugin

Posted: Thu Oct 27, 2016 7:36 pm
by Aquila
skribb wrote:Oh I see, interesting. What version of Hue do you have? Is it Generation 1, 2 or 3?

Is it "get status as command"?
Hue bridge is gen 2 (there is no gen 3 bridge), most bulbs are gen 1 and some are gen 2.
I have not gotten my hands on gen 3 bulb yet. I have to have use for the bulb to buy one, they are quite expensive. :p

Use the "Get status" command, remember to set "output level" to "all" in the config.

Re: Philips Hue plugin

Posted: Fri Oct 28, 2016 2:51 pm
by skribb
Aquila wrote:
skribb wrote:Oh I see, interesting. What version of Hue do you have? Is it Generation 1, 2 or 3?

Is it "get status as command"?
Hue bridge is gen 2 (there is no gen 3 bridge), most bulbs are gen 1 and some are gen 2.
I have not gotten my hands on gen 3 bulb yet. I have to have use for the bulb to buy one, they are quite expensive. :p

Use the "Get status" command, remember to set "output level" to "all" in the config.
Thanks :D

EDIT: now THIS is cool white! It's slightly less bright than the "default white" but it is almost snow white in brilliance.

02:59:31 Info: {'on': True, 'hue': 41310, 'effect': u'none', 'alert': u'select', 'bri': 254, 'sat': 69}

Re: Philips Hue plugin

Posted: Wed Nov 02, 2016 3:38 am
by Search&Destroy
Is the Pulse command a special Hue Bridge command like colorloop?
Because I would like to change the intensity (from lowest brightness up to highest) and change time (like 10 sec, or 60 sec).

Ahh and btw.:
When I want to set brightness to 100% I have to add the Dim Up command (with 100 at "Dim up in %" field) three times to reach realy 100%.
Is this a Bug?

Re: Philips Hue plugin

Posted: Thu Dec 22, 2016 12:18 pm
by Daywalker815
Hi,

i hope you don't mind, i added SaveGroupStatus and RecallGroupStatus to the plugin

Greetings
DW