[APP][Pro] < group > (3.2.4 - Stable)

When you are looping over all devices in a group and turning then on/off…how is the “on/off”-action implmented?

Are you doing something like “await device.setCapabilityValue(‘onoff’, true);”

If you do something like above I specifically am asking if you are using “await” or not.

i found an easier way. I simply use the following in the code.

“device.settings.devices”

the above gives me an array with all device that are part of a specific group-device.

device is pointing to a device that is a “< group >”-device.

Nice. Can you share the code please?

I get console output as below (“Källa Lamgrupp” is a device created with “< group >”-app.
image

The code used is as below

/*

  • In this script we turn on all lights.

*/

// Get all devices

const devices = await Homey.devices.getDevices();

// Loop over all devices

const devicelist = [“Köksfönster”, “Ljusslinga Balkong”];

for (const device of Object.values(devices)) {

// If this device is a light (class)

// Or this is a ‘What’s plugged in?’-light (virtualClass)

// if (device.class === ‘light’ || device.virtualClass === ‘light’) {

// if (device.class === ‘socket’ || device.class === ‘light’) {

// if (device.name === ‘Köksfönster’ || device.name === ‘Ljusslinga Balkong’) {

// if (devicelist.includes(device.name)) {

if (1 === 1) {

  if (device.name === "Källare Lampgrupp") {

    console.log(device.name + ',' + device.id + ',' + device.class);

    //console.log(device);

    _deviceslistTEST = device.settings.devices;

    console.log(_deviceslistTEST);

    console.log(_deviceslistTEST[0]);

  }

}

else {console.log(device.name + ',' + device.id + ',' + device.class);}



 // Turn the light on by setting the capability `onoff` to `true`

/*

await device.setCapabilityValue('onoff', false)

  .then(() => log('OK'))

  .catch(error => log(`Error:`, error));

*/

// } else {

// log(\nEJ OK '${device.name}' - '${device.class}' - '${device.virtualClass}' on...);

// }

}

1 Like

Hi

When or will there be homey Bridge support? Would really like have same group option for bridge.

Read back:

When using “< groups >”-app i have experienced devices not being handled,

The answer i have got to solve this to add a delay between each device. I have added delay of both 100 and 200 milliseconds but devices are still sometimes missed.

How is the on/off-command actually sent to the devices in a group?

Are the on/off-commands send as “await”-commands so that a command is surely executed before the next one is triggered?

ON/OFF is sent as a standard command, same way as the original app, the group app works very similar to how it would work if you just did the same stuff using flows … with two differences.

  1. Its easier
  2. The group app will actually try to retry failed commands (though that doesnt seem to fix the problem many times as its due to the Homey getting ‘backed up’ rather then the receiving device.

In the settings page of the group app, im pretty sure you can add a delay if that works for you;

Just increase the delay time step by step until you have a balance between delay & fails I would say.
It’s quite a brilliant workaround if you want to switch many devices at once imho.
Because Homey itself can’t.

@Jamie , it looks like I have found a bug. I have a group that has no devices. I want to add a device, however when I click one of the eligible devices suddenly all are selected. So I am unable to add a device to the group. Every click does a select-all or deselect-all.
When I create a new group everything works ok… also with some other groups I have no problems.

Confirmed. But, I even didn’t know one can create a group without devices…
Now I’m a bit curious why you shouldn’t add devices while creating a group?

1 Like

Moet die derde niet ‘stoekdraad’ zijn, Peter?

1 Like

If you could please keep the conversation in English as much as possible, then more people will be able to participate and help you.
Please translate your post.

[feature request]

When i add a gas meter it shows only the total usage, is it possible to add the current usage?
(this would be great due to the explosion of current gas prices)

Thx.

Afaik (most) gasmeters only report the total usage once every x minutes

You could create a variable f.i. [GasmeterLastValue]

With this flow, you can store the current meter value, and compare it to the one stored 5 minutes ago.
Subtract the values and feed the result to f.i. a virtual gasmeter

the actual/current usage of the gas is broadcast by the P1 meter with label ‘gas’, so there is no need for any calculations etc, the data is already present…

Ah, you’re in luck I think. Or I’m in bad luck :sweat_smile:
The HomeWizard P1 app or my energymeter doesn’t show it. Also the High/Low rate indicator isn’t here.
Running latest app v2.1.4 version

The gas flow is something I added to the energy apps I created (Plugwise Smile P1, Youless, Beeclear).

But I have good news for you: Add your Homewizard P1 to Power By The Hour. And you will get a gas flow as bonus (albeit in liter/minute) :slight_smile:

1 Like

EDIT: App restart did the trick up 'till now.

Hi Jamie,
I hope all’s fine, and congrats!

The app memory useage grows a lot the last couple of hours.
I sent a diag before I restarted the app
db07c52c-d36b-4929-87e4-8c5d8a2f8c2e
Maybe the restart is sufficient, no hurries.

1 Like

Can you add the option to add devices with less capabilities? For example i’ve a light switch and hue lamps separated, but I would like to group them, but the light switch is not dimmable.