Best way to assign groups to many items

  • Platform information:

    • Hardware: Raspberry Pi IIIB+
    • openHAB version: 2.3.0-1 release build
  • Issue of the topic:
    I have added a lot of devices - including HueLights, TradfriLights, MyStrom switches mostly using PaperUI. Am now starting to try out some rules and can see the need to define groups, so that I can update multiple devices at once.
    I defined a group called HueLights and started to use paperUi to assign each Dimmer item to that group using PaperUI. I quickly realised that this will take a long time and is hard to verify.

  • the paperUI is a little slow (2012 MacBookPro running Safari)
  • I then filter items looking for i.e. DiningRoom, edit the first one and then close it, the filter is lost and the ordering of the items is different and not clear which items are already updated!

So, how can I more efficiently:
list items in a group?
add group to a series of items?
remove group from a series of items?

  • Please post configurations (if applicable):
    • Items configuration related to the issue
    • Sitemap configuration related to the issue
    • Rules code related to the issue

Trying to turn all lights off:

rule "All Lights Off"
when
	Time cron "10 * * * * ?" // every day at 1000 (format 'second minute hour day-of-month day-of-week year(optional)')
then
	//sendCommand('MyStromLights', 'OFF')
    MyStromLights.sendCommand(OFF)
    HueLights.sendCommand(OFF)
    sendCommand('TradfriLights', 0)
end
  • Services configuration related to the issue

  • Groups items

Group Lights (House)
Group HueLights (Lights)
Group TradfriLights (Lights)
Group MyStromLights (Lights)
  • If logs where generated please post these here using code fences:
2018-09-22 10:04:10.026 [ome.event.ItemCommandEvent] - Item 'MezzanineUplight_Switch' received command OFF
2018-09-22 10:04:10.034 [ome.event.ItemCommandEvent] - Item 'LivingRoomDecorLamp_Switch' received command OFF
==> /var/log/openhab2/openhab.log <==
2018-09-22 10:04:10.044 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'All Lights Off': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.sendCommand(java.lang.String,java.lang.String) on instance: null
==> /var/log/openhab2/events.log <==
2018-09-22 10:04:10.057 [ome.event.ItemCommandEvent] - Item 'BedroomMakeupLamp_Switch' received command OFF
2018-09-22 10:04:10.069 [ome.event.ItemCommandEvent] - Item 'BedroomUplight_Switch' received command OFF
2018-09-22 10:04:10.078 [ome.event.ItemCommandEvent] - Item 'HueLights' received command OFF
2018-09-22 10:04:10.643 [ome.event.ItemCommandEvent] - Item 'DiningRoomBarD_ColorTemperature' received command OFF
2018-09-22 10:04:10.655 [ome.event.ItemCommandEvent] - Item 'DiningRoomBarB_ColorTemperature' received command OFF
2018-09-22 10:04:10.663 [ome.event.ItemCommandEvent] - Item 'DiningRoomBarA_ColorTemperature' received command OFF
==> /var/log/openhab2/openhab.log <==
2018-09-22 10:04:15.426 [ERROR] [ower.internal.MyStromEcoPowerBinding] - Unable to switch state for device '64002D04DD74' error 'switch.not.allowed'
2018-09-22 10:04:15.447 [ERROR] [ower.internal.MyStromEcoPowerBinding] - Unable to switch state for device '64002D04DBAE' error 'switch.not.allowed'
2018-09-22 10:04:15.658 [ERROR] [ower.internal.MyStromEcoPowerBinding] - Unable to switch state for device '64002D049AC6' error 'switch.not.allowed'
2018-09-22 10:04:15.907 [ERROR] [ower.internal.MyStromEcoPowerBinding] - Unable to switch state for device '64002D049D44' error 'switch.not.allowed'

I am happy to create a set of commands to paste into terminal or use curl etc.

regards
Steve