Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
indigo_2025.1_documentation:device_class [2026/03/10 22:14] – [Get Dependencies] davel17indigo_2025.1_documentation:device_class [2026/03/10 22:43] (current) – [Ungroup With Device] davel17
Line 676: Line 676:
 |//''value''// No  |  boolean  |//''True''// to enable, //''False''// to disable| |//''value''// No  |  boolean  |//''True''// to enable, //''False''// to disable|
  
 +=== Get Dependencies ===
  
 +Return an indigo.Dict with all the dependencies on this device.
 +
 +^  Command Syntax Examples  ^
 +|<code>indigo.device.getDependencies(123)</code>|
 +
 +^  Parameters  ^^^^
 +^  Parameter  ^  Required  ^  Type  ^  Description  ^
 +|direct parameter|  Yes  |  integer  |id or instance of the device to get the dependencies for.|
 +
 +The dictionary will look something like this:
 +
 +<code>>>> print indigo.device.getDependencies(91776575)
 +Data : (dict)
 +     actionGroups : (list)
 +          Data : (dict)
 +               ID : 1280166770 (integer)
 +               Name : Set var to device state (string)
 +     controlPages : (list)
 +     devices : (list)
 +     schedules : (list)
 +     triggers : (list)
 +          Data : (dict)
 +               ID : 106487666 (integer)
 +               Name : Thermostat condition test (string)
 +     variables : (list)
 +</code>
 +
 +So, the dictionary will have 5 top-level keys: "actionGroups", "controlPages", "devices", "schedules", "triggers", and "variables". Each one of those keys will return a list object. Inside that list object will be multiple dicts, one for each dependency (or an empty list if there are none). Each dependency dictionary has two keys: "ID" which is the unique id and "Name" which is the name of the object.
 === Get Group List === === Get Group List ===
  
Line 682: Line 711:
  
 ^  Command Syntax Examples  ^ ^  Command Syntax Examples  ^
-|<code>indigo.device.getGroupList(123)</code>|+<code>indigo.device.getGroupList(123)  # returns an indigo.List of all devices grouped with dev</code>
  
 ^  Parameters  ^^^^ ^  Parameters  ^^^^
Line 698: Line 727:
  
 === 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. **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.** 
  
-<code> +^  Command Syntax Examples 
-indigo.device.groupWithDevice(devsomeOtherDev)  # group dev with another device +<code>indigo.device.groupWithDevice(dev_1dev_2)  # group dev with another device</code> 
-</code>+ 
 +^  Parameters  ^^^^ 
 +^  Parameter  ^  Required  ^  Type  ^  Description 
 +|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, name or instance of another device that will belong to the group.|
  
-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()//''.
 === Move To Folder === === Move To Folder ===
  
Line 822: Line 856:
  
 === Ungroup With Device === === Ungroup With Device ===
 +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  ^
 <code> <code>
-  indigo.device.ungroupDevice(dev)# group dev with another device+  indigo.device.ungroupDevice(dev)  ungroup dev
 </code> </code>
  
-See also ''//indigo.device.groupWithDevice()//'' and ''//indigo.device.getGroupList()//''.+^  Parameters  ^^^^ 
 +^  Parameter  ^  Required  ^  Type  ^  Description 
 +|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()//''.
 === Unlock === === Unlock ===
  
  • /www/perceptive/wiki/data/attic/indigo_2025.1_documentation/device_class.1773180859.txt.gz
  • Last modified: 2026/03/10 22:14
  • by davel17