Yes, that is what I have done to try to solve that only the main switch (1) sends state change messages.
When you send a refresh () or a read command, all 3 switches respond.
By pressing the on-off button on the strip, the message that switch 1 sends due to the status change is captured with the zigbee Handlerand a read attribute command is sent to 2 and 3.
These respond to the read command and are updated by sending the command with the received status and the event is emitted to the platform, so that the device and the status on the platform are not de-synchronized.
The only problem is that when switch 1 is offand you turn off the 3 switches with the button on the power strip, switch 1 does not send a status change message and the off status of switches 2 and 3 is not updated in app until the following message from the configured report of switch 1, maximum 5 minutes.
It is not a big problem since that use case is very rare to occur, but I would like to know why this happens, jajaja…
Yes, the attribute is bound and configured either with the default configuration or by manually calling a do_Configure function. The result is identical.
It really is the same as i had done, but I have made a subdriver with the code you submitted and it does the exact same thing. Only switch 1(main) send configured report:
To compare I have installed the strip with the groovy DTH and the three switches send through switch 1 the status message according to the configuration, not only switch 1 as happens with the edge driver.
I put the IDE’s live logging capture where you can see the response of the 3 endpoints and raw data, which you can’t see in the logcat, just the decoded message.
In order to use the driver with 2, 3, 4 socket strips, I want to know how many components has the installed device, using component_count (), which I saw in the documentation and use a loop for enpoint = 1, components do … configuration or send commands to all components
Thanks
This occurs only when have these conditions and physical button on the power strip is pressed to turn off all the switdh at the same time.
This happens because the main switch is already OFF and there is no change of state and because switches 2 and 3 do not send periodic reports and they only respond to the refresh command or attribute read commands.
With this scenario, when switch 1 is turned off there is a change of state and it sends a zigbee message. I capture it with zigbee handler and emit the ON state of the other 2 switches
Hi, thank you for bringing this up. I tracked the bug report about this, what it’s clear is that this issue is not edge-related because it happens for other multi-component devices, that’s why I moved the post back here.
Once I get more info, I’ll let you know.
Was this ever resolved? Is multi-component devices working on the edge platform? I have multiple devices I bought specifically for the capabilities it came with that used child devices on the groovy platform.
The concept of “child devices” no longer exists on Edge. For devices that have multiple components like LED strips, you can do the following:
Create a device profile with multiple components and map them with the corresponding endpoints (if necessary) as described in this doc (Zigbee)
In this option, only the main component is exposed to some third-party integrations like Alexa.
Create separate devices in the same driver using try_create_device (Only for LAN drivers). Despite all being created with the same driver, they won’t be related as parent/child.
Here you can use persistent storage to keep control of the devices created
Also, be careful of creating several devices at once, you might have to avoid the device’s thread using cosock.spawn (please, take a look at this post)
I think I’ve seen somewhere a limitation that try_create_device can be used only for LAN drivers. Has this limitation beed removed and it now can be used from Zigbee drivers?
Thanks
Secondary switch gangs are not available in routines (and there is no Child), but they appear in Smart Lighting as switch “2/3”. Than with a “virtual Child switch” third-party voice integration could control these devices again.
If no Child Device can be created, than could I use a Virtual Device (switch) to control a secondary switch in a 2 or 3 gangs switch (Zigbee)?
What do you mean by “secondary”? Do you mean that in the routines, only the main switch appears?
I have a multi-component device and I see the switch capability appears for each component
As a side note, please remember that the Smart Lighting app is part of the legacy platform. The team mentioned the automation there will be migrated (only the active ones) but be careful creating new.
I’ve seen that’s the solution applied from many users. Thanks, @Paul_Oliver, for suggesting a solution!
Applied by some power users, sure. But way too complicated for most people who just buy a typical inexpensive two gang light switch and expect it to work out of the box with SmartThings.
While we’re talking about it…there will be Matter-compatible multi gang light switches soon. I hope those will be “plug and play” with the new SmartThings architecture because they will be on other Matter-compatible platforms.
They should work directly on SmartThings, the multi-component devices are fully supported there, we can create Routines for those devices. I understood the issue is with third-party apps, like Alexa (that’s already been reported).
I checked the Smart Lighting app, and yeah, it doesn’t allow you to select actions for each component and it only performs the action in “main”.
I’ll confirm with the team they’re considering the cases of multi-component devices in the new version of the app.
If I’m missing something, please provide more details
This is exactly what I tried to explain. Thanks @Mariano_Colmenarejo !
With that extra situation… only available in Smart Lighting, not in Routines. Why?
I have an Edge driver that creates a device with three components, each with a momentary capability. In ActionTiles, which has a Groovy based connector SmartApp, the components are presented in the device selection lists as if they are separate devices and momentary tiles can be created using them. They just don’t work.
So… there is not much to show in Routines. I have only a single switch with the Main´s name.
And for Smart Lighting I have the same image that @Mariano_Colmenarejo did post.
This device “Banheiro Banheiro” os a 2 ganha switch with @Mariano_Colmenarejo mukti-awirch edge driver.