DzVents: Make rooms available as device groups Topic is solved
Moderators: leecollings, remb0
-
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
DzVents: Make rooms available as device groups
Domoticz has the ability to assign your devices to a room. I can not find however how to find the devices in a particular room from DzVents. Can we have the rooms available as device groups from the domotiz object? This enables us to create scripts that automatically operate on all devices in a particular room.
-
- Posts: 40
- Joined: Tuesday 01 December 2015 8:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Netherlands
- Contact:
Re: DzVents: Make rooms available as device groups
That wuld be nice.
Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: DzVents: Make rooms available as device groups
Yes, it is already on my list. Maybe for 2.5.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: DzVents: Make rooms available as device groups
@rrozema,rrozema wrote: ↑Monday 02 April 2018 19:41 Domoticz has the ability to assign your devices to a room. I can not find however how to find the devices in a particular room from DzVents. Can we have the rooms available as device groups from the domotiz object? This enables us to create scripts that automatically operate on all devices in a particular room.
as workaround until this is implemented you can add all devices in a room to a domoticz group and loop through these devices with
domoticz.groups("group name").devices().forEach(function(device) -- loop over all devices in this group;
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: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: DzVents: Make rooms available as device groups
Yes thank you for the suggestion, I use many groups already. I was however trying to avoid having to maintain all these groups: I have, like many people will have done, assigned my devices into rooms to show them correctly on the floorplan. I asked for this addition to DzVents to take advantage of these room assignments.waaren wrote: ↑Monday 18 June 2018 11:35@rrozema,rrozema wrote: ↑Monday 02 April 2018 19:41 Domoticz has the ability to assign your devices to a room. I can not find however how to find the devices in a particular room from DzVents. Can we have the rooms available as device groups from the domotiz object? This enables us to create scripts that automatically operate on all devices in a particular room.
as workaround until this is implemented you can add all devices in a room to a domoticz group and loop through these devices with
domoticz.groups("group name").devices().forEach(function(device) -- loop over all devices in this group;
For example: by creating a generic script that periodically goes over all rooms, looking for rooms that have lights that are on and have one or more motion sensor(s). If there has been no motion in the room the last, say 5 minutes, I can switch off the light(s) in that room automatically. I don't need to hard code any motion sensors or switches, just add the script and it works, even if a motion sensor or a a light is added or removed. All you need to do is add it to the correct room, which you would do already for showing it correctly in the floorplan.
Note to Danny: I think, once this is added, the next question will be how to identify which devices are motion sensors, lights, etc. I'm currently using json in each device's description fields to configure settings per device. Maybe you've got some good ideas for this too?
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: DzVents: Make rooms available as device groups
All the type information is already on the Device object so that should not be so hard.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: DzVents: Make rooms available as device groups
I may be in need of some assistance then setting up device types. For all my motion sensors (most of them are cheap neo coolcam z-wave pir devices, but i also have more expensive aeotec) are detected as normal on/off switches. If I try to switch such a device manually, domoticz responds that the device does not support being switched. So domoticz knows it is a device that can't be switched, but i haven't found a way to distinguish these sensors from switches yet.
-
- Posts: 241
- Joined: Tuesday 16 May 2017 13:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: The Neterlands
- Contact:
Re: DzVents: Make rooms available as device groups
you can use a prefix in the name of the devices like lampxxx or PIRxxx that is what i use and then with a wildcard like PIR* you can cycle trough them
raspberry pi | xiaomi vacuum | yeelight | philips hue | zwave | ubiquiti unifi | harmony | sonoff | zigbee2mqtt | https://www.youtube.com/channel/UC2Zidl ... m1OLuNldfQ
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: DzVents: Make rooms available as device groups
Or use the description field and use that in your scripts.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: DzVents: Make rooms available as device groups
Yes, that is a workaround. And i do things like that. However, dzvents exposes all sorts of attributes for each device and yet none of these can be used to identify a switch from a motion sensor? I don't think that's the way it was intended.snellejellep wrote: ↑Monday 18 June 2018 14:45 you can use a prefix in the name of the devices like lampxxx or PIRxxx that is what i use and then with a wildcard like PIR* you can cycle trough them
-
- Posts: 40
- Joined: Tuesday 01 December 2015 8:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Netherlands
- Contact:
Re: DzVents: Make rooms available as device groups
Nice! Thank you.
I already use the group approach, but the room approach seems more appropriate.
I also encoutered the type problem. Seems to be another feature request, I see naming conventions as a workaround too.
Last edited by Ries on Monday 18 June 2018 15:02, edited 1 time in total.
Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat
-
- Posts: 241
- Joined: Tuesday 16 May 2017 13:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: The Neterlands
- Contact:
Re: DzVents: Make rooms available as device groups
rrozema wrote: ↑Monday 18 June 2018 14:51Yes, that is a workaround. And i do things like that. However, dzvents exposes all sorts of attributes for each device and yet none of these can be used to identify a switch from a motion sensor? I don't think that's the way it was intended.snellejellep wrote: ↑Monday 18 June 2018 14:45 you can use a prefix in the name of the devices like lampxxx or PIRxxx that is what i use and then with a wildcard like PIR* you can cycle trough them

cant you set the switch type to motion sensor like the image above?
raspberry pi | xiaomi vacuum | yeelight | philips hue | zwave | ubiquiti unifi | harmony | sonoff | zigbee2mqtt | https://www.youtube.com/channel/UC2Zidl ... m1OLuNldfQ
-
- Posts: 40
- Joined: Tuesday 01 December 2015 8:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Netherlands
- Contact:
Re: DzVents: Make rooms available as device groups
It doenst show like that in the dzvents device object. It is a switch there.cant you set the switch type to motion sensor like the image above?
Also the icon type doenst always reflect (in dzvents) the icon chosen.
Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: DzVents: Make rooms available as device groups
In my environment a motion sensor is identified by dzVents as motion sensor. So I expect if it is not in your environment that it is something at another level than dzVents's
....
if trigger.switchType == "Motion Sensor"then
print("XMotion triggered: " .. trigger.name)
end
2018-06-18 15:16:40.710 Status: dzVents: XMotion triggered: XMotion-1
....
if trigger.switchType == "Motion Sensor"then
print("XMotion triggered: " .. trigger.name)
end
2018-06-18 15:16:40.710 Status: dzVents: XMotion triggered: XMotion-1
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: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: DzVents: Make rooms available as device groups
I agree. It is probably not dzVents making these devices look all the same, that's why I said I am in need of some guidance here. To illustrate the problem, here's my device list filtered on devices that have 'motion' in their name:
As you can see my motion devices are all listed as 'Light/Switch' and SubType 'Switch'. I have yet to find how I can change these values. They automatically assigned when the device is first detected. In the properties in the Switches tab there is an option to select 'Switch Type:', which can be set to 'Motion Sensor', but that value can't be found in the properties dzVents exposes for the device:
Edit: Forum code can't make the attachments show up on the correct place. please see the attachments for the pictures.
As you can see my motion devices are all listed as 'Light/Switch' and SubType 'Switch'. I have yet to find how I can change these values. They automatically assigned when the device is first detected. In the properties in the Switches tab there is an option to select 'Switch Type:', which can be set to 'Motion Sensor', but that value can't be found in the properties dzVents exposes for the device:
Edit: Forum code can't make the attachments show up on the correct place. please see the attachments for the pictures.
- Attachments
-
- motion device switch properties.JPG (35.08 KiB) Viewed 2522 times
-
- motion devices.JPG (77.35 KiB) Viewed 2522 times
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: DzVents: Make rooms available as device groups
Sorry but still don't get what your problem is with the identification of these sensors in dzVents. I see the same as you do in the devices tab but dzVents is able to identify the switchtype property correctly.rrozema wrote: ↑Monday 18 June 2018 18:01 I agree. It is probably not dzVents making these devices look all the same, that's why I said I am in need of some guidance here. To illustrate the problem, here's my device list filtered on devices that have 'motion' in their name:
As you can see my motion devices are all listed as 'Light/Switch' and SubType 'Switch'. I have yet to find how I can change these values. They automatically assigned when the device is first detected. In the properties in the Switches tab there is an option to select 'Switch Type:', which can be set to 'Motion Sensor', but that value can't be found in the properties dzVents exposes for the device:
Edit: Forum code can't make the attachments show up on the correct place. please see the attachments for the pictures.
The output of this dzVents code snippet
Code: Select all
dz.devices().forEach(function(device)
if string.find(device.name,"otion") or string.find(device.name,"eging") then
print(" device ID: " .. device.idx .. " ===>>> " ..
device.name .." ===>>> type: " ..
tostring(device.switchType))
end
end)
Code: Select all
2018-06-18 19:15:11.955 Status: dzVents: device ID: 30 ===>>> Trap bewegingsmelder ===>>> type: Motion Sensor
2018-06-18 19:15:11.956 Status: dzVents: device ID: 32 ===>>> WC bewegingsmelder ===>>> type: Motion Sensor
2018-06-18 19:15:12.074 Status: dzVents: device ID: 500 ===>>> Beweging buiten ===>>> type: Motion Sensor
2018-06-18 19:15:12.077 Status: dzVents: device ID: 508 ===>>> Homewizard - Beweging buiten ===>>> type: Motion Sensor
2018-06-18 19:15:12.101 Status: dzVents: device ID: 582 ===>>> XMotion-1 ===>>> type: Motion Sensor
2018-06-18 19:15:12.102 Status: dzVents: device ID: 583 ===>>> XMotion-2 ===>>> type: Motion Sensor
2018-06-18 19:15:12.114 Status: dzVents: device ID: 657 ===>>> XMotion-3 ===>>> type: Motion Sensor
2018-06-18 19:15:12.116 Status: dzVents: device ID: 670 ===>>> Beweging kantoor ===>>> type: Motion Sensor
2018-06-18 19:15:12.146 Status: dzVents: device ID: 794 ===>>> X-Motion zolderhok lux ===>>> type: On/Off // combined Motion sensor / lux device
2018-06-18 19:15:12.147 Status: dzVents: device ID: 795 ===>>> XMotion Zolderhok ===>>> type: Motion Sensor
2018-06-18 19:15:12.148 Status: dzVents: device ID: 796 ===>>> X-Motion6 lux ===>>> type: On/Off // combined Motion sensor / lux device
2018-06-18 19:15:12.149 Status: dzVents: device ID: 797 ===>>> XMotion-6 ===>>> type: Motion Sensor
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: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: DzVents: Make rooms available as device groups
Thank you. I don't know how I missed this. You are absolutely right, device.switchType will do the trick.waaren wrote: ↑Monday 18 June 2018 19:18Code: Select all
dz.devices().forEach(function(device) if string.find(device.name,"otion") or string.find(device.name,"eging") then print(" device ID: " .. device.idx .. " ===>>> " .. device.name .." ===>>> type: " .. tostring(device.switchType)) end end)
-
- Posts: 40
- Joined: Tuesday 01 December 2015 8:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Netherlands
- Contact:
Re: DzVents: Make rooms available as device groups
How do you differentiate between lux devices that way? As well as computers or phone
Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: DzVents: Make rooms available as device groups
Lux devices can be identified by their deviceType or deviceSubType. Please elaborate on the computers or phone. What kind of devices are they ? How are they defined ?
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
Who is online
Users browsing this forum: No registered users and 0 guests