| Both sides previous revision Previous revision Next revision | Previous revision |
| indigo_2025.1_documentation:device_class [2026/03/10 22:32] – [Ungroup With Device] davel17 | indigo_2025.1_documentation:device_class [2026/03/10 22:43] (current) – [Ungroup With Device] davel17 |
|---|
| |
| === Group With Device === | === Group With Device === |
| To group two or more devices together, use the ''//indigo.device.groupWithDevice()//'' command. The parameters are the Indigo Device object IDs of the devices to be grouped. | To group two or more devices together, use the ''//indigo.device.groupWithDevice()//'' command. The parameters are the Indigo Device object IDs of the devices to be grouped. **Note if you have the device dialog UI open, it will not dynamically update, and you shouldn’t call either method if the device factory UI is open.** |
| |
| ^ Command Syntax Examples ^ | ^ Command Syntax Examples ^ |
| ^ Parameters ^^^^ | ^ Parameters ^^^^ |
| ^ Parameter ^ Required ^ Type ^ Description ^ | ^ Parameter ^ Required ^ Type ^ Description ^ |
| |direct parameter (dev_1)| Yes | integer |id or instance of a device that will belong to the group.| | |direct parameter (dev_1)| Yes | integer |id, name or instance of a device that will belong to the group.| |
| |direct parameter (dev_2)| Yes | integer |id or instance of another device that will belong to the group.| | |direct parameter (dev_2)| Yes | integer |id, name or instance of another device that will belong to the group.| |
| |
| For example, if you want to group devices 123 and 456, you would use ''//indigo.device.groupWithDevice(123, 456)//''. There is no message printed to the events log if the devices grouped together successfully. If you want to add device 789 to the group, you would use ''//indigo.device.groupWithDevice(456, 789)//''. This is a great way to bring together different devices that have a common thread, but bear in mind that it's best not to try to group too many devices together. See also ''//indigo.device.ungroupDevice()//'' and ''//indigo.device.getGroupList()//''. | For example, if you want to group devices 123 and 456, you would use ''//indigo.device.groupWithDevice(123, 456)//''. There is no message printed to the events log if the devices grouped together successfully. If you want to add device 789 to the group, you would use ''//indigo.device.groupWithDevice(456, 789)//''. This is a great way to bring together different devices that have a common thread, but bear in mind that it's best not to try to group too many devices together. See also ''//indigo.device.ungroupDevice()//'' and ''//indigo.device.getGroupList()//''. |
| |
| === Ungroup With Device === | === Ungroup With Device === |
| If you want to remove a device from a group, use the ''//indigo.device.ungroupDevice()//'' command. | If you want to remove a device from a group, use the ''//indigo.device.ungroupDevice()//'' command. Use this command with the ID of the device you want removed from the group.**Note if you have the device dialog UI open, it will not dynamically update, and you shouldn’t call either method if the device factory UI is open.** |
| ^ Command Syntax Examples ^ | ^ Command Syntax Examples ^ |
| <code> | <code> |
| ^ Parameters ^^^^ | ^ Parameters ^^^^ |
| ^ Parameter ^ Required ^ Type ^ Description ^ | ^ Parameter ^ Required ^ Type ^ Description ^ |
| |direct parameter| Yes | integer |id or instance of the device to be removed from the group.| | |direct parameter| Yes | integer |id, name or instance of the device to be removed from the group.| |
| | If successful, nothing will be printed to the events log. See also ''//indigo.device.groupWithDevice()//'' and ''//indigo.device.getGroupList()//''. |
| | |
| See also ''//indigo.device.groupWithDevice()//'' and ''//indigo.device.getGroupList()//''. | |
| === Unlock === | === Unlock === |
| |