I've created a separate hardwareId for a dynamic collection of virtual switches. My script creates the switches when it needs to. But it also has to act when the switch is triggered.
I use myDeviceTriggers = domoticz.hardwareInfo(myHardwareId).idx and I get a table with all the right idx's. But adding myDeviceTriggers to the triggers doesn't work; nothing happens when I activate a switch.
I may be wrong here as I haven't tried it myself but, AFAIK, dzvents can get triggered by different means: devices, groups, scenes, variable but a hardware subsystem isn't part of that. TO get that to work, you would need to add all the devices in that hardware to a group and use the group as a trigger.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
heggink wrote: ↑Friday 25 February 2022 18:01
TO get that to work, you would need to add all the devices in that hardware to a group and use the group as a trigger.
Mm, but I would not know which device in the group caused the group-trigger, would I?
Anyway, I 'solved' it by add a prefix to the devices and using a wildcard in the device-triggers. Not very pretty, but it works. Thanks for the reply
--
Domoticz on rPi4 - RFXCOM RFXtrx433 USB - ZW090 Z-Stick Gen5 EU - IKEA Tradfri - Philips HUE - YouLess meter - SolarEdge