Ah, that's the issue. You're confusing two different concepts. The Device Group device type in the Virtual Devices interface is a collection of unrelated devices in a single, standalone device (acting somewhat like a scene) so you control them all at the same time as if they were one device (and treating them as a meta state device). If you are trying to get all the devices in a Device Group, you need to get all the device id's from the device's props:
- Code: Select all
groupSecurity = indigo.devices[1912245] # "Security Walk Devices"
device_ids = groupSecurity.ownerProps["deviceList"]
# device_ids now has a list of device id's (each are strings so you'll need to coerce to ints to use)
for device_id_string in device_ids:
dev = indigo.devices[int(device_id_string)]
# do whatever with the dev here
The API call that you're using is meant to identify devices that are related somehow. Most often, these devices are "subordinate" or separate "personalities" that represent a different aspect of a physical (or logical) device. For instance, a multi-sensor device may support reporting motion, light, temperature, and humidity. Each of those "personalities" are represented as a separate device in Indigo (in this case, each are individual sensor devices), but they are in fact all part of the same physical device. Another example is an Airfoil instance: it contains multiple speaker devices, which are individual Indigo devices, but they are all in fact related to (and dependent upon) the main Airfoil instance device.