Could someone tell me how to set the kelvin level on my Philips Hue light with dzVents
Thanks in advance
Running virtualized domoticz server on a proxmox cluster with a slave for optimal RFX communication. Using Aeotec Z-Stick Gen5, rfxtrx433e, Homebridge and a Philips HUE bridge for all sort of home automation.
domoticz.devices('Hue color lamp 1').setHex(120,10,255)
The above or setColor doesn't seem to work
Running virtualized domoticz server on a proxmox cluster with a slave for optimal RFX communication. Using Aeotec Z-Stick Gen5, rfxtrx433e, Homebridge and a Philips HUE bridge for all sort of home automation.
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.
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.
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
}
Running virtualized domoticz server on a proxmox cluster with a slave for optimal RFX communication. Using Aeotec Z-Stick Gen5, rfxtrx433e, Homebridge and a Philips HUE bridge for all sort of home automation.
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
}
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
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 :-/
Running virtualized domoticz server on a proxmox cluster with a slave for optimal RFX communication. Using Aeotec Z-Stick Gen5, rfxtrx433e, Homebridge and a Philips HUE bridge for all sort of home automation.
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.
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
}
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.
Running virtualized domoticz server on a proxmox cluster with a slave for optimal RFX communication. Using Aeotec Z-Stick Gen5, rfxtrx433e, Homebridge and a Philips HUE bridge for all sort of home automation.
Running virtualized domoticz server on a proxmox cluster with a slave for optimal RFX communication. Using Aeotec Z-Stick Gen5, rfxtrx433e, Homebridge and a Philips HUE bridge for all sort of home automation.
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.
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.
Schermafbeelding 2020-06-02 om 20.46.18.png (208.23 KiB) Viewed 2581 times
Schermafbeelding 2020-06-02 om 20.45.55.png (279.94 KiB) Viewed 2581 times
Running virtualized domoticz server on a proxmox cluster with a slave for optimal RFX communication. Using Aeotec Z-Stick Gen5, rfxtrx433e, Homebridge and a Philips HUE bridge for all sort of home automation.
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 ?
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 ?
Schermafbeelding 2020-06-02 om 22.16.39.png (48.82 KiB) Viewed 2569 times
Running virtualized domoticz server on a proxmox cluster with a slave for optimal RFX communication. Using Aeotec Z-Stick Gen5, rfxtrx433e, Homebridge and a Philips HUE bridge for all sort of home automation.
Fixed by filling in the Networks field. Strange isnt it?
Running virtualized domoticz server on a proxmox cluster with a slave for optimal RFX communication. Using Aeotec Z-Stick Gen5, rfxtrx433e, Homebridge and a Philips HUE bridge for all sort of home automation.
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.
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...
Running virtualized domoticz server on a proxmox cluster with a slave for optimal RFX communication. Using Aeotec Z-Stick Gen5, rfxtrx433e, Homebridge and a Philips HUE bridge for all sort of home automation.
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.
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!
Running virtualized domoticz server on a proxmox cluster with a slave for optimal RFX communication. Using Aeotec Z-Stick Gen5, rfxtrx433e, Homebridge and a Philips HUE bridge for all sort of home automation.