Philips Hue plugin
Re: Philips Hue plugin
Awesome. Functionally it seems ok.
- kgschlosser
- Site Admin
- Posts: 5508
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Philips Hue plugin
It's just a massive amount of code lumped into one file. and there is also a whole lot of repeat code in it which is adding to the size. makes it hard to know what is going on.
Re: Philips Hue plugin
Just wanted to say thanks for this great plugin.
I am having some trouble trying to change lights based on ambient light level of the motion sensor.
Is this plugin still actively worked on? I see the last comments were from last year.
Many thanks,
I am having some trouble trying to change lights based on ambient light level of the motion sensor.
Is this plugin still actively worked on? I see the last comments were from last year.
Many thanks,
Re: Philips Hue plugin
What are you trying to do and how?
Re: Philips Hue plugin
I am trying to read the ambient light level off the Philips Hue Indoor Motion Sensor
Once I have this data I will change the brightness of my monitors to match.
It may be that i'm using the plugin incorrectly:
I am trying to get the sensor status as per the following image:

Then when I print:
print eg.plugins.PhilipsHue.getStatus (u'03 - Hue ambient light sensor 1')
I get the following output: It seems to be outputting the status of an IKEA bulb I have, not the light sensor.
Thanks again for all you support and making this great plugin.
Once I have this data I will change the brightness of my monitors to match.
It may be that i'm using the plugin incorrectly:
I am trying to get the sensor status as per the following image:

Then when I print:
print eg.plugins.PhilipsHue.getStatus (u'03 - Hue ambient light sensor 1')
I get the following output: It seems to be outputting the status of an IKEA bulb I have, not the light sensor.
Any idea where i'm going wrong?{u'swversion': u'1.3.013', u'name': u'Color light 1', u'swupdate': {u'state': u'notupdatable', u'lastinstall': u'2020-08-27T17:24:30'}, u'uniqueid': u'14:b4:57:ff:fe:4a:b5:da-01', u'capabilities': {u'control': {u'colorgamuttype': u'other'}, u'streaming': {u'renderer': False, u'proxy': False}, u'certified': False}, u'productname': u'Color light', u'state': {u'on': False, u'hue': 14988, u'colormode': u'xy', u'effect': u'none', u'alert': u'select', u'xy': [0.4577, 0.40999999999999998], u'reachable': False, u'mode': u'homeautomation', u'bri': 77, u'sat': 141}, u'manufacturername': u'IKEA of Sweden', u'config': {u'function': u'decorative', u'direction': u'omnidirectional', u'archetype': u'classicbulb'}, u'type': u'Color light', u'modelid': u'TRADFRI bulb E27 CWS opal 600lm'}
Thanks again for all you support and making this great plugin.
Re: Philips Hue plugin
You are using the function for getting the status of a light, you should use: getSensorStatussethtmf wrote: ↑Mon Aug 31, 2020 11:26 amI am trying to read the ambient light level off the Philips Hue Indoor Motion Sensor
Once I have this data I will change the brightness of my monitors to match.
It may be that i'm using the plugin incorrectly:
I am trying to get the sensor status as per the following image:
Then when I print:
print eg.plugins.PhilipsHue.getStatus (u'03 - Hue ambient light sensor 1')
I get the following output: It seems to be outputting the status of an IKEA bulb I have, not the light sensor.
Any idea where i'm going wrong?{u'swversion': u'1.3.013', u'name': u'Color light 1', u'swupdate': {u'state': u'notupdatable', u'lastinstall': u'2020-08-27T17:24:30'}, u'uniqueid': u'14:b4:57:ff:fe:4a:b5:da-01', u'capabilities': {u'control': {u'colorgamuttype': u'other'}, u'streaming': {u'renderer': False, u'proxy': False}, u'certified': False}, u'productname': u'Color light', u'state': {u'on': False, u'hue': 14988, u'colormode': u'xy', u'effect': u'none', u'alert': u'select', u'xy': [0.4577, 0.40999999999999998], u'reachable': False, u'mode': u'homeautomation', u'bri': 77, u'sat': 141}, u'manufacturername': u'IKEA of Sweden', u'config': {u'function': u'decorative', u'direction': u'omnidirectional', u'archetype': u'classicbulb'}, u'type': u'Color light', u'modelid': u'TRADFRI bulb E27 CWS opal 600lm'}
Thanks again for all you support and making this great plugin.
Re: Philips Hue plugin
Thanks I am now getting the correct status reading.You are using the function for getting the status of a light, you should use: getSensorStatus
Apologies for being slow here but I was expecting to get a reading of the various sensors, however I only get it's ID number and software version.
What do I need to get something like this?
Ambient light level: 56, Temperature: 24, etc. etc.
much appreciated,
Re: Philips Hue plugin
Can you copy and paste the entire response?sethtmf wrote: ↑Thu Sep 03, 2020 12:04 pmThanks I am now getting the correct status reading.You are using the function for getting the status of a light, you should use: getSensorStatus
Apologies for being slow here but I was expecting to get a reading of the various sensors, however I only get it's ID number and software version.
What do I need to get something like this?
Ambient light level: 56, Temperature: 24, etc. etc.
much appreciated,
If I run the same command for my tapswitch I get:
Code: Select all
{u'name': u'Stua', u'swupdate': {u'state': u'notupdatable', u'lastinstall': None}, u'uniqueid': u'00:00:00:00:00:42:4d:e0-f2', u'capabilities': {u'inputs': [{u'repeatintervals': [], u'events': [{u'eventtype': u'initial_press', u'buttonevent': 34}]}, {u'repeatintervals': [], u'events': [{u'eventtype': u'initial_press', u'buttonevent': 16}]}, {u'repeatintervals': [], u'events': [{u'eventtype': u'initial_press', u'buttonevent': 17}]}, {u'repeatintervals': [], u'events': [{u'eventtype': u'initial_press', u'buttonevent': 18}]}], u'primary': True, u'certified': True}, u'productname': u'Hue tap switch', u'state': {u'lastupdated': u'2020-09-04T05:12:32', u'buttonevent': 34}, u'diversityid': u'd8cde5d5-0eef-4b95-b0f0-71ddd2952af4', u'manufacturername': u'Signify Netherlands B.V.', u'type': u'ZGPSwitch', u'config': {u'on': True}, u'modelid': u'ZGPSWITCH'}
Re: Philips Hue plugin
Ok so I was being an idiot!
Can you copy and paste the entire response?
If I run the same command for my tapswitch I get:Code: Select all
{u'name': u'Stua', u'swupdate': {u'state': u'notupdatable', u'lastinstall': None}, u'uniqueid': u'00:00:00:00:00:42:4d:e0-f2', u'capabilities': {u'inputs': [{u'repeatintervals': [], u'events': [{u'eventtype': u'initial_press', u'buttonevent': 34}]}, {u'repeatintervals': [], u'events': [{u'eventtype': u'initial_press', u'buttonevent': 16}]}, {u'repeatintervals': [], u'events': [{u'eventtype': u'initial_press', u'buttonevent': 17}]}, {u'repeatintervals': [], u'events': [{u'eventtype': u'initial_press', u'buttonevent': 18}]}], u'primary': True, u'certified': True}, u'productname': u'Hue tap switch', u'state': {u'lastupdated': u'2020-09-04T05:12:32', u'buttonevent': 34}, u'diversityid': u'd8cde5d5-0eef-4b95-b0f0-71ddd2952af4', u'manufacturername': u'Signify Netherlands B.V.', u'type': u'ZGPSwitch', u'config': {u'on': True}, u'modelid': u'ZGPSWITCH'}
When I extend the EventGhost window to see the log I assumed that was the whole line as it stops before the edge of the window. I went to copy and paste here and realised it is fact much larger and has all the data i need.

The more you know!
Many thanks for you help.
Re: Philips Hue plugin
Hi,
I added some minor fixes for when the Hue Bridge isn't connectable. The connection timeout is now 1s (not the 30s default), and the errors are handled better. In my case, this was causing EG to block completely until the timeout finished. Code update attched.
Sam.
I added some minor fixes for when the Hue Bridge isn't connectable. The connection timeout is now 1s (not the 30s default), and the errors are handled better. In my case, this was causing EG to block completely until the timeout finished. Code update attched.
Sam.
- Attachments
-
- __init__.py
- (124.51 KiB) Downloaded 45 times