setRGB does not work with Hue Iris  [SOLVED]

Moderator: leecollings

Post Reply
edsger
Posts: 8
Joined: Friday 01 February 2019 15:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

setRGB does not work with Hue Iris

Post by edsger »

I'm getting errors in my scripts when trying to control my Hue Iris.
I'm running the latest beta Domoticz V4.10364.

Code: Select all

hueIris = domoticz.devices('Hue iris 1')
hueIris.setRGB(1, 1, 1)
results in an error being logged (note the last line shows the error).

Code: Select all

2019-02-01 15:27:23.607 Status: User: pi initiated a switch command (56/dummyswitch/On)
2019-02-01 15:27:23.757 Status: dzVents: Info: Handling events for: "dummyswitch", value: "On"
2019-02-01 15:27:23.758 Status: dzVents: Info: ------ Start internal script: test: Device: "dummyswitch (DummyHW)", Index: 56
2019-02-01 15:27:23.759 Status: dzVents: Debug: Processing device-adapter for Hue iris 1: RGB(W) device adapter
2019-02-01 15:27:23.759 Status: dzVents: Debug: Processing device-adapter for Hue iris 1: Switch device adapter
2019-02-01 15:27:23.760 Status: dzVents: Info: Switch dummyswitch is turned on
2019-02-01 15:27:23.760 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?param=setcolbrightnessvalue&type=command&idx=52&hue=300&brightness=0.3921568627451&iswhite=true
2019-02-01 15:27:23.760 Status: dzVents: Debug: OpenURL: method = GET
2019-02-01 15:27:23.760 Status: dzVents: Debug: OpenURL: post data = nil
2019-02-01 15:27:23.760 Status: dzVents: Debug: OpenURL: headers = nil
2019-02-01 15:27:23.760 Status: dzVents: Debug: OpenURL: callback = nil
2019-02-01 15:27:23.760 Status: dzVents: Info: HueIris state On
2019-02-01 15:27:23.760 Status: dzVents: Info: HueIris rgb {"b":255,"cw":0,"g":74,"m":3,"r":0,"t":0,"ww":0}
2019-02-01 15:27:23.760 Status: dzVents: Info: ------ Finished test
2019-02-01 15:27:23.761 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2019-02-01 15:27:23.790 Error: Error opening url: http://127.0.0.1:8080/json.htm?param=setcolbrightnessvalue&type=command&idx=52&hue=300&brightness=0.3921568627451&iswhite=true
Switching the device on and off using the script and "dummy switch" does work.
I tried several different ways but couldn't get this work. Not sure, but I think this is a dzVents bug.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: setRGB does not work with Hue Iris  [SOLVED]

Post by waaren »

edsger wrote: Friday 01 February 2019 15:30 I'm getting errors in my scripts when trying to control my Hue Iris.

Code: Select all

2019-02-01 15:27:23.790 Error: Error opening url: http://127.0.0.1:8080/json.htm?
please look at the 10 lines using dzVents with Domoticz

One of these line states: "Also make sure that in the Security section in the settings you allow 127.0.0.1 to not need a password. dzVents uses that port to send certain commands to Domoticz."
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
edsger
Posts: 8
Joined: Friday 01 February 2019 15:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: setRGB does not work with Hue Iris

Post by edsger »

Ok, I do feel stupid as that worked.

In my defense, I did read that part and tried to set all the correct settings. However, I did not find a security section, and to check all my settings I first tried to turn the light on and off and that worked! So apparently settings RGB is something completely different?

Anyway, suggestion to clarify the wiki for this. If you like I can edit it as well.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: setRGB does not work with Hue Iris

Post by waaren »

edsger wrote: Friday 01 February 2019 19:10 In my defense, I did read that part and tried to set all the correct settings. However, I did not find a security section, and to check all my settings I first tried to turn the light on and off and that worked! So apparently settings RGB is something completely different?
Anyway, suggestion to clarify the wiki for this. If you like I can edit it as well.
setRGB is indeed one of the dzVents functions that require to access the domoticz API via local (127.0.0.1)
I clarified the wiki to explain where to find the security section.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
edsger
Posts: 8
Joined: Friday 01 February 2019 15:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: setRGB does not work with Hue Iris

Post by edsger »

Thanks for the help!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest