Page 1 of 1
Philips Hue Cold and Warm white
Posted: Saturday 30 May 2020 20:55
by RvdM
Hi,
I'm trying to set the Kelvin level of my Philips Hue Ambiance light but I can't get it to work.
However this does not seem to work.
Code: Select all
domoticz.devices('Hue ambiance lamp 1').dimTo(100).setKelvin(6500)
Could someone tell me how to set the kelvin level on my Philips Hue light with dzVents
Thanks in advance
Re: Philips Hue Cold and Warm white
Posted: Saturday 30 May 2020 21:09
by waaren
RvdM wrote: ↑Saturday 30 May 2020 20:55
I'm trying to set the Kelvin level of my Philips Hue Ambiance light but I can't get it to work.
If the bulb is not yet On you need to do this in two steps.
Code: Select all
domoticz.devices('Hue ambiance lamp 1').dimTo(100)
domoticz.devices('Hue ambiance lamp 1').setKelvin(100) -- setKelvin in domoticz is 0-100
Re: Philips Hue Cold and Warm white
Posted: Sunday 31 May 2020 16:43
by RvdM
[translated]
@waaren, do you also happen to have an example regarding color selection?
Code: Select all
domoticz.devices('Hue color lamp 1').setHex(120,10,255)
The above or setColor doesn't seem to work
Re: Philips Hue Cold and Warm white
Posted: Sunday 31 May 2020 17:32
by waaren
RvdM wrote: ↑Sunday 31 May 2020 16:43
The above or setColor doesn't seem to work
Please use English on the forum.
If you want forum members to help then please provide more details like the system / domoticz version you use, the relevant loglines and what the expected result is versus the actual result.
Re: Philips Hue Cold and Warm white
Posted: Sunday 31 May 2020 18:33
by RvdM
Thank you for translating. I forgot for a moment this is an english speaking community. Sorry for that!
I'm running 2020.2 12099 and doing some test to determin if i want to switch from zwave switches/dimmers in the wall to philips hue light bulbs. To make a discission I wanted to test some usecases to see how good the integration of Philips Hue with domoticz is. Hence me asking some questions about it.
For now i'm testing with the script below and after setting kelvin levels I was looking to see how I can set a color for the full color philips hue light and how to activate a scene I made in the native Hue App and added to domoticz. So those are the things i'm testing with but progress is slow because
documentation is limited.
Code: Select all
return {
on = {
devices = { 'Hue ambiance lamp 1' }
},
execute = function(domoticz, switch)
domoticz.devices('Hue color lamp 1').dimTo(100)
--domoticz.devices('Hue ambiance lamp 1').setKelvin(100) -- setKelvin in domoticz is 0-100
domoticz.devices('Hue color lamp 1').setHex(120,0,255) -- setKelvin in domoticz is 0-100
end
}
Re: Philips Hue Cold and Warm white
Posted: Sunday 31 May 2020 19:48
by waaren
Documentation does contain a link to
domoticz API and this wiki page shows more information.
Below script would test quite a number of steps and would show what is happening in the log.
(update to latest Beta required)
Code: Select all
return {
on = {
devices = { 'Hue ambiance lamp 1' }
},
logging =
{
level = domoticz.LOG_DEBUG,
},
execute = function(dz)
bulb = dz.devices('Hue color lamp 1')
bulb.dimTo(100)
for i = 1, 255, 10 do
bulb.setHex(120, 0 , i).afterSec(i/25)
end
for i = 1, 255, 10 do
bulb.setColor(i,0,0).afterSec(11 + i /25)
end
end
}
Re: Philips Hue Cold and Warm white
Posted: Sunday 31 May 2020 20:38
by RvdM
Thank you for the link. Its still not very easy to read but your example helps a lot.
Sadly i'm on the latest stable build and I can't test this because of the system having a production status.
I'll get major incidents from my wife when something is not working
Code: Select all
return {
on = {
devices = { 'Hue ambiance lamp 1' }
},
execute = function(domoticz, switch)
domoticz.devices('Hue color lamp 1').dimTo(100)
--domoticz.devices('Hue ambiance lamp 1').setKelvin(100) -- setKelvin in domoticz is 0-100
domoticz.devices('Hue color lamp 1').setHex(120, 0 , 120) -- set color to 120, 0 120
end
}
Above instead of setKelvin does not seem to work :-/
Re: Philips Hue Cold and Warm white
Posted: Sunday 31 May 2020 22:16
by waaren
RvdM wrote: ↑Sunday 31 May 2020 20:38
I'll get major incidents from my wife when something is not working
Just because I understand the importance of the WAF, I modified the example to make it work in your version. If it does not work I would very much like to see the relevant loglines.
Code: Select all
return {
on = {
devices = { 'Hue ambiance lamp 1' }
},
logging =
{
level = domoticz.LOG_DEBUG,
},
execute = function(dz)
bulb = dz.devices('Hue color lamp 1')
bulb.dimTo(100)
for i = 1, 255, 10 do
bulb.setHex(120, 0 , i).afterSec(math.floor(i/25))
end
for i = 1, 255, 10 do
bulb.setColor(i, 0, 0).afterSec(math.ceil(11 + i /25))
end
end
}
Re: Philips Hue Cold and Warm white
Posted: Sunday 31 May 2020 23:28
by RvdM
WAF indeed is very important. Moving from z-wave fibaro to philips hue for the light parts in the living room. All must go very smooth.
As far I can see the problem is with the afterSec part that is not working. It all goes so fast the changing in color is can not be seen and it end with the last color.
When executing the curl command on CLI the colors change. So that is working.
Code: Select all
$ curl 'http://127.0.0.1:8080/json.htm?type=command¶m=setcolbrightnessvalue&idx=651&brightness=100' -d color='{"m":3,"t":0,"cw":0,"ww":0,"r":221,"g":0,"b":40}'{
"status" : "OK",
"title" : "SetColBrightnessValue"
}
Logging:
- Spoiler: show
- 2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... ":0,"b":91}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":101}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":111}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":121}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":131}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":141}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":151}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":161}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":171}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":181}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":191}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":201}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":211}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":221}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":231}
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.826 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.827 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.827 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":241}
2020-05-31 23:24:38.827 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.827 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.827 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.827 Status: dzVents: Debug: OpenURL: callback = nil
2020-05-31 23:24:38.827 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?type=com ... :0,"b":251}
2020-05-31 23:24:38.827 Status: dzVents: Debug: OpenURL: method = GET
2020-05-31 23:24:38.827 Status: dzVents: Debug: OpenURL: post data = nil
2020-05-31 23:24:38.827 Status: dzVents: Debug: OpenURL: headers = nil
2020-05-31 23:24:38.827 Status: dzVents: Debug: OpenURL: callback = nil
Re: Philips Hue Cold and Warm white
Posted: Monday 01 June 2020 23:17
by RvdM
Any idea @waaren?
Re: Philips Hue Cold and Warm white
Posted: Monday 01 June 2020 23:47
by waaren
RvdM wrote: ↑Monday 01 June 2020 23:17
Any idea @waaren?
Not sure but it could be that you face the afterSec bug. That one is fixed in dzVents 3.0.8
So if you don't have a test system you will have to wait until the next stable to continue with this example but the setHex and setColor without aterSec() should work. I tested this again today on latest stable and latest beta without a problem.
Re: Philips Hue Cold and Warm white
Posted: Tuesday 02 June 2020 20:43
by RvdM
Another problem I found with the following script. The brightness works but the setKelvin does not. In the logging the url mentioned does work when using it with curl from CLI.
Code: Select all
local allDevices = {
'Keuken spot 1',
'Keuken spot 2',
'Keuken spot 3',
'Keuken spot 4',
'Keuken spot 5',
'Keuken spot 6'
}
return {
active = true,
on = {
devices = {
'Film modus'
}
},
logging = {
level = domoticz.LOG_DEBUG,
},
execute = function(dz, item)
automation = dz.devices('Home Automation')
hueKelvin = dz.variables('Kelvin').value
hueBrightness = dz.variables('Brightness').value
if (automation.state == 'On' and item.state == 'Off') then
-- uncomment line below for scene usage
-- dz.log('Scene:' .. scene.name .. ' - Status: ' .. item.state)
-- scene = dz.devices('Scene Woonkamer AvondModus')
-- scene.switchSelector(0)
-- uncomment lines below for individual light control
for _, name in ipairs(allDevices) do
dz.devices(name).dimTo(hueBrightness)
dz.devices(name).setKelvin(100)
dz.log('Changing bulb: ' .. name .. ' - Kelvin:' .. hueKelvin .. '/Brightness:' .. hueBrightness)
end
end
end
}
Logging:
- Spoiler: show
- 2020-06-02 20:41:10.880 (Philips Hue) Color Switch (Keuken spot 6)
2020-06-02 20:41:10.667 Status: User: Admin initiated a switch command (648/Film modus/Off)
2020-06-02 20:41:10.696 Status: dzVents: Info: ------ Start internal script: cinemaSceneOff: Device: "Film modus (VirtualDevice)", Index: 648
2020-06-02 20:41:10.696 Status: dzVents: Debug: Processing device-adapter for Home Automation: Switch device adapter
2020-06-02 20:41:10.696 Status: dzVents: Debug: Processing device-adapter for Keuken spot 1: RGB(W) device adapter
2020-06-02 20:41:10.696 Status: dzVents: Debug: Processing device-adapter for Keuken spot 1: Switch device adapter
2020-06-02 20:41:10.696 Status: dzVents: Debug: Constructed timed-command: Set Level 50
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?param=se ... kelvin=100
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: method = GET
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: post data = nil
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: headers = nil
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: callback = nil
2020-06-02 20:41:10.696 Status: dzVents: Info: Changing bulb: Keuken spot 1 - Kelvin:100/Brightness:50
2020-06-02 20:41:10.696 Status: dzVents: Debug: Processing device-adapter for Keuken spot 2: RGB(W) device adapter
2020-06-02 20:41:10.696 Status: dzVents: Debug: Processing device-adapter for Keuken spot 2: Switch device adapter
2020-06-02 20:41:10.696 Status: dzVents: Debug: Constructed timed-command: Set Level 50
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?param=se ... kelvin=100
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: method = GET
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: post data = nil
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: headers = nil
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: callback = nil
2020-06-02 20:41:10.696 Status: dzVents: Info: Changing bulb: Keuken spot 2 - Kelvin:100/Brightness:50
2020-06-02 20:41:10.696 Status: dzVents: Debug: Processing device-adapter for Keuken spot 3: RGB(W) device adapter
2020-06-02 20:41:10.696 Status: dzVents: Debug: Processing device-adapter for Keuken spot 3: Switch device adapter
2020-06-02 20:41:10.696 Status: dzVents: Debug: Constructed timed-command: Set Level 50
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?param=se ... kelvin=100
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: method = GET
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: post data = nil
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: headers = nil
2020-06-02 20:41:10.696 Status: dzVents: Debug: OpenURL: callback = nil
2020-06-02 20:41:10.696 Status: dzVents: Info: Changing bulb: Keuken spot 3 - Kelvin:100/Brightness:50
2020-06-02 20:41:10.696 Status: dzVents: Debug: Processing device-adapter for Keuken spot 4: RGB(W) device adapter
2020-06-02 20:41:10.696 Status: dzVents: Debug: Processing device-adapter for Keuken spot 4: Switch device adapter
2020-06-02 20:41:10.697 Status: dzVents: Debug: Constructed timed-command: Set Level 50
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?param=se ... kelvin=100
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: method = GET
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: post data = nil
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: headers = nil
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: callback = nil
2020-06-02 20:41:10.697 Status: dzVents: Info: Changing bulb: Keuken spot 4 - Kelvin:100/Brightness:50
2020-06-02 20:41:10.697 Status: dzVents: Debug: Processing device-adapter for Keuken spot 5: RGB(W) device adapter
2020-06-02 20:41:10.697 Status: dzVents: Debug: Processing device-adapter for Keuken spot 5: Switch device adapter
2020-06-02 20:41:10.697 Status: dzVents: Debug: Constructed timed-command: Set Level 50
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?param=se ... kelvin=100
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: method = GET
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: post data = nil
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: headers = nil
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: callback = nil
2020-06-02 20:41:10.697 Status: dzVents: Info: Changing bulb: Keuken spot 5 - Kelvin:100/Brightness:50
2020-06-02 20:41:10.697 Status: dzVents: Debug: Processing device-adapter for Keuken spot 6: RGB(W) device adapter
2020-06-02 20:41:10.697 Status: dzVents: Debug: Processing device-adapter for Keuken spot 6: Switch device adapter
2020-06-02 20:41:10.697 Status: dzVents: Debug: Constructed timed-command: Set Level 50
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: url = http://127.0.0.1:8080/json.htm?param=se ... kelvin=100
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: method = GET
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: post data = nil
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: headers = nil
2020-06-02 20:41:10.697 Status: dzVents: Debug: OpenURL: callback = nil
2020-06-02 20:41:10.697 Status: dzVents: Info: Changing bulb: Keuken spot 6 - Kelvin:100/Brightness:50
2020-06-02 20:41:10.697 Status: dzVents: Info: ------ Finished cinemaSceneOff
Curl output:
Code: Select all
root@su01dxm01:~# curl 'http://127.0.0.1:8080/json.htm?param=setkelvinlevel&type=command&idx=692&kelvin=0'
{
"status" : "OK",
"title" : "Set Kelvin Level"
}
Re: Philips Hue Cold and Warm white
Posted: Tuesday 02 June 2020 21:30
by waaren
RvdM wrote: ↑Tuesday 02 June 2020 20:43
Another problem I found with the following script. The brightness works but the setKelvin does not. In the logging the url mentioned does work when using it with curl from CLI.
Sorry but I cannot replicate it. if I try this on my system it works without a problem and the setKelvin command has not changed in the last couple of months.
What do you have in Local Networks (no username/password):?
I use
127.0.0.*;192.168.192.*;::1 (without spaces or tabs)
and what do you see when you give dz.utils.dumpTable(dz.settings) in the script ?
Re: Philips Hue Cold and Warm white
Posted: Tuesday 02 June 2020 22:17
by RvdM
waaren wrote: ↑Tuesday 02 June 2020 21:30
RvdM wrote: ↑Tuesday 02 June 2020 20:43
Another problem I found with the following script. The brightness works but the setKelvin does not. In the logging the url mentioned does work when using it with curl from CLI.
Sorry but I cannot replicate it. if I try this on my system it works without a problem and the setKelvin command has not changed in the last couple of months.
What do you have in Local Networks (no username/password):?
I use
127.0.0.*;192.168.192.*;::1 (without spaces or tabs)
and what do you see when you give dz.utils.dumpTable(dz.settings) in the script ?
Code: Select all
2020-06-02 22:14:53.239 Status: dzVents: > url: http://127.0.0.1:8080
2020-06-02 22:14:53.239 Status: dzVents: > serverPort: 8080
2020-06-02 22:14:53.239 Status: dzVents: > location:
2020-06-02 22:14:53.239 Status: dzVents: > latitude: 0
2020-06-02 22:14:53.239 Status: dzVents: > longitude: 0
2020-06-02 22:14:53.239 Status: dzVents: > name: Domoticz
2020-06-02 22:14:53.239 Status: dzVents: > domoticzVersion: 2020.2 (build 12099)
2020-06-02 22:14:53.239 Status: dzVents: > dzVentsVersion: 3.0.7
2020-06-02 22:14:53.239 Status: dzVents: > Log level: 1
2020-06-02 22:14:53.239 Status: dzVents: > webRoot:
2020-06-02 22:14:53.239 Status: dzVents: > Domoticz url: http://127.0.0.1:8080
Re: Philips Hue Cold and Warm white
Posted: Tuesday 02 June 2020 22:38
by RvdM
Fixed by filling in the Networks field. Strange isnt it?
Re: Philips Hue Cold and Warm white
Posted: Tuesday 02 June 2020 22:47
by waaren
RvdM wrote: ↑Tuesday 02 June 2020 22:38
Fixed by filling in the Networks field. Strange isnt it?
Not really...
from the wiki:
Using dzVents with Domoticz
In Domoticz go to Setup > Settings > Other and in the section EventSystem make sure the check-box ‘dzVents disabled’ is not checked. Also make sure that in the Security section in the settings (Setup > Settings > System > Local Networks (no username/password) you allow 127.0.0.1 to not need a password. dzVents uses that port to send certain commands to Domoticz. Finally make sure you have set your current location in Setup > Settings > System > Location, otherwise there is no way to determine nighttime/daytime state.
Re: Philips Hue Cold and Warm white
Posted: Tuesday 02 June 2020 23:00
by RvdM
Steep learning curve... what is the best way to debug these scripts because the web-editor only catches some typo and stuff.
Would like to see something like: Error found on line: 13...
Re: Philips Hue Cold and Warm white
Posted: Tuesday 02 June 2020 23:38
by waaren
RvdM wrote: ↑Tuesday 02 June 2020 23:00
Steep learning curve... what is the best way to debug these scripts because the web-editor only catches some typo and stuff.
Would like to see something like: Error found on line: 13...
You will see syntax errors in the log if you enable logging in the settings.

- errors.png (13.25 KiB) Viewed 2700 times
Re: Philips Hue Cold and Warm white [Solved]
Posted: Wednesday 03 June 2020 0:06
by RvdM
waaren wrote: ↑Tuesday 02 June 2020 23:38
RvdM wrote: ↑Tuesday 02 June 2020 23:00
Steep learning curve... what is the best way to debug these scripts because the web-editor only catches some typo and stuff.
Would like to see something like: Error found on line: 13...
You will see syntax errors in the log if you enable logging in the settings.
errors.png
My hero!