Re: Philips Hue plugin
Posted: Sat Nov 23, 2019 2:59 am
Awesome. Functionally it seems ok.
What are you trying to do and how?
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'}
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.
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
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,
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!
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'}