I am looking for a way to use the hue dimmer / switch in dzvents. Until now nothing can be found. There are 4 buttons that can be pressed short and long. I have not been able to find how to use this in dzVents. Is there anyone who has information about it.
Thankx,
Peter
Philips hue dimmer switch [Solved]
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Philips hue dimmer switch
This Hue device was implemented in domoticz in version V.11454 as a selector switch with 9 levels. (see below)kroonp wrote: ↑Thursday 06 August 2020 15:17 I am looking for a way to use the hue dimmer / switch in dzvents. Until now nothing can be found. There are 4 buttons that can be pressed short and long. I have not been able to find how to use this in dzVents. Is there anyone who has information about it.
Thankx,
Peter
NB. Depending on the set poll interval for the Hue hardware module in domoticz there can be delay between pressing the button and the event triggered.
A dzVents script to make use of the selector could look like
Code: Select all
return
{
on =
{
devices =
{
'Hue twilight', -- change to name of your Hue selector / dimmerswitch
}
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'Hue dimmer / selector',
},
execute = function(dz, item)
dz.log('Device ' .. item.name .. ' updated. Last level was ' .. item.lastLevel .. '; new level is ' .. item.level .. ' (' .. item.levelName .. ')', dz.LOG_DEBUG)
actions =
{
['Button 1 long'] = function() return '1L' end,
['Button 2 long'] = function() return '2L' end,
['Button 3 long'] = function() return '3L' end,
['Button 4 long'] = function() return '4L' end,
['Button 1 short'] = function() return '1S' end,
['Button 2 short'] = function() return '2S' end,
['Button 3 short'] = function() return '3S' end,
['Button 4 short'] = function() return '4S' end,
['Off'] = function() return 'Off' end,
}
dz.log('Short name for ' .. item.levelName .. ' ==>> ' .. actions[item.levelName](),LOG_DEBUG)
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 43
- Joined: Friday 17 July 2020 11:03
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Philips hue dimmer switch
Thank you for the reply. Unfortunately I do not yet understand how I can switch on a device with for example -button1 short-. But that is due to my inconsideration. I keep trying.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Philips hue dimmer switch
Hope this will help you understand
Code: Select all
return
{
on =
{
devices =
{
'Hue twilight', -- change to name of your Hue selector / dimmerswitch
}
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'Hue dimmer / selector',
},
execute = function(dz, item)
deviceToSwitch = dz.devices('testDevice') -- change to name of device to switch when button 1 is pressed short
dz.log('Device ' .. item.name .. ' updated. Last level was ' .. item.lastLevel .. '; new level is ' .. item.level .. ' (' .. item.levelName .. ')', dz.LOG_DEBUG)
actions =
{
['Button 1 long'] = function() return '1L' end,
['Button 2 long'] = function() return '2L' end,
['Button 3 long'] = function() return '3L' end,
['Button 4 long'] = function() return '4L' end,
['Button 1 short'] = function() return '1S' end,
['Button 2 short'] = function() return '2S' end,
['Button 3 short'] = function() return '3S' end,
['Button 4 short'] = function() return '4S' end,
['Off'] = function() return 'Off' end,
}
dz.log('Short name for ' .. item.levelName .. ' ==>> ' .. actions[item.levelName](),LOG_DEBUG)
if item.levelName == 'Button 1 short' then
deviceToSwitch.switchOn()
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 43
- Joined: Friday 17 July 2020 11:03
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Philips hue dimmer switch [Solved]
Thank you very much, I get it now. I have adjusted my script and it now works the way I intended it to. Thanks again and have a nice weekend.
-
- Posts: 8
- Joined: Thursday 25 February 2021 15:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Philips hue dimmer switch
Is there also a possibility to use the switch for 'dynamic' dimming like the Hue dimmer switch can do using the Hue AP?
So press and hold button 2 to have dynamic brighter light?
Now I can also press longer to add a delta to the status.
I would like dynamic dimm + and -.
Is that possible?
So press and hold button 2 to have dynamic brighter light?
Now I can also press longer to add a delta to the status.
I would like dynamic dimm + and -.
Is that possible?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Philips hue dimmer switch
I don't think this is possible other then with native Hue hub.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 8
- Joined: Thursday 25 February 2021 15:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Philips hue dimmer switch
That's too bad,
thanks!
thanks!
Who is online
Users browsing this forum: No registered users and 1 guest