Page 11 of 11

Re: Philips Hue plugin

Posted: Sat Nov 23, 2019 2:59 am
by leejk
Awesome. Functionally it seems ok.

Re: Philips Hue plugin

Posted: Sat Nov 23, 2019 3:15 am
by kgschlosser
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

Posted: Fri Aug 28, 2020 4:05 pm
by sethtmf
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,

Re: Philips Hue plugin

Posted: Sat Aug 29, 2020 7:09 am
by Aquila
sethtmf wrote:
Fri Aug 28, 2020 4:05 pm
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,
What are you trying to do and how?

Re: Philips Hue plugin

Posted: Mon Aug 31, 2020 11:26 am
by sethtmf
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:
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.
{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'}
Any idea where i'm going wrong?

Thanks again for all you support and making this great plugin.

Re: Philips Hue plugin

Posted: Tue Sep 01, 2020 8:08 am
by Aquila
sethtmf wrote:
Mon Aug 31, 2020 11:26 am
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:
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.
{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'}
Any idea where i'm going wrong?

Thanks again for all you support and making this great plugin.
You are using the function for getting the status of a light, you should use: getSensorStatus

Re: Philips Hue plugin

Posted: Thu Sep 03, 2020 12:04 pm
by sethtmf
You are using the function for getting the status of a light, you should use: getSensorStatus
Thanks I am now getting the correct status reading.

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

Posted: Fri Sep 04, 2020 2:01 pm
by Aquila
sethtmf wrote:
Thu Sep 03, 2020 12:04 pm
You are using the function for getting the status of a light, you should use: getSensorStatus
Thanks I am now getting the correct status reading.

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,
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'}

Re: Philips Hue plugin

Posted: Fri Sep 04, 2020 3:25 pm
by sethtmf

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'}
Ok so I was being an idiot!

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.

Image

The more you know!

Many thanks for you help.

Re: Philips Hue plugin

Posted: Sun Sep 13, 2020 11:22 am
by SamWest
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.