Page 1 of 1

List all groups

Posted: Friday 04 August 2017 9:20
by EddyG
What is wrong with this part code? I thought I should get all group devices, but non are printed.

Code: Select all

   execute = function(domoticz)

                local groupDevices = domoticz.devices().filter(function(device)
                        return (device.deviceType == "Group")
                end)

                groupDevices.forEach(function(groupDevice)
                        print(groupDevice.name)
                end)
   end


Re: List all groups

Posted: Friday 04 August 2017 9:27
by dannybloe
Groups is a separate collection. domoticz.groups() and domoticz.scenes()

Rtfm :p

Re: List all groups

Posted: Friday 04 August 2017 9:31
by EddyG
Sorry, OEPS. :oops: