switchOn() or switchOff() HUE light doesn't work
Posted: Monday 26 November 2018 8:31
Struggling some hours now with my new Tradfri Hue light.
When I switch the Tradfri light through the "light icon" on the Devices page, the light switch as expected.
When I use the following in dzVents, it doesn't work;
I see, corresponding to the line number of the above line in de scripts, error in my Logging page;
And device 'WCTradfri' exists, double , triple checked, copied name from devices page.
The following code is working;
So Switching on the device page and the above os.execute works, but the switchOn() or switchOff() commands don't work.
Any help would be appreciated.
When I switch the Tradfri light through the "light icon" on the Devices page, the light switch as expected.
When I use the following in dzVents, it doesn't work;
Code: Select all
domoticz.devices('WCTradfri').switchOn()
Code: Select all
2018-11-26 08:33:01.779 Status: dzVents: Error (2.4.7): ...-domoticz/scripts/dzVents/generated_scripts/WC-Licht.lua:18: attempt to index a nil value
The following code is working;
Code: Select all
WCSceneAan = 'curl --request PUT --data "{\\"scene\\": \\"6kLEoMrcZGjSbGP\\", \\"on\\":\"false\"}" "http://'..hueBridgeIP..'/api/'..hueApiKey..'/groups/2/action"'
os.execute(WCSceneAan)Any help would be appreciated.