New Zooz ZEN20 Device Type published

Yes, any device that has more than one component should be able to be handled with this approach

Yes, each switchable outlet is a device in its own right that implements the “Switch”, “Actuator”, and “Sensor” capabilities, so it should be selectable from any SmartApp asking for any of those capabilities, including AT.

2 Likes

So where/when are details coming out on how to modify custom device handlers to take advantage of this new platform capability?

http://docs.smartthings.com/en/latest/composite-devices/index.html is a good place to start.

1 Like

I updated the original post with links to documentation and examples. Thanks for the feedback

3 Likes

@bflorian

Bob,

First - THANK YOU! This is awesome!

Second - I think I may have found an issue in the new Composite Device feature. I am working on using the new Composite Device Parent/Child DH’s to work with my Arduino ST_Anything library. In general, things work well assuming one only adds Child Devices to a Parent Device. The issue I am having is when one removes a child device from a parent via the ST Phone App. In this case, the childDevices.size() is not properly decremented. Thus, when I try to find any remaining child in the collection with a matching deviceNetworkId, I get a null reference error using this code:

def childDevice = childDevices.find{it.deviceNetworkId == "${device.deviceNetworkId}-${name}"}

If I manually delete all child devices, and then re-add them, the collection’s size() is corrected.

Note: During the creation of these Child Devices, I am specifying “isComponent: false” which allows the devices to appear as normal things, and permits them to be deleted.

My long-term goal is for a user to simply configure their Arduino sketch, and then have the Parent Device Handler automagically create all of the necessary Child Devices as the Arduino updates flow into the Parent DH that do not match an existing Child Device Handler’s networkDeviceId. If a user later decides to add more devices to their Arduino, the additional children will simply appear in ST. However, I need to account for the case where a user decides to delete child devices as well.

Any help you can provide would be very helpful.

Again, thank you for creating the Composite Device Handler! This really should make many users very happy!

Dan

1 Like

What’s the diffrence between the Zooz Power Stip and Zooz Power Strip Outlet DH? Which one should we be using?

Thank you.

We’re looking into the device deletion issue @ogiewon . It seems to be some sort of race condition that’s occurring in our production environment but was not caught during QA testing in our test environment.

The Zooz Power Strip device type is the one used for the strip itself @Tolik . And instance of the Zooz Power Strip Outlet device type is created for each of the file outlets of the strip. They are hidden from the Things view but appear in the details page and when configuring SmartApps. If you already have a Zooz device using a custom DTH you should switch it to Zooz Power Strip. The five child devices for each outlet should be created when you save that change.

2 Likes

I’ve been using a custom DH with the following:

It has worked for me and provides me with 6 devices (1 overall on/off and 5 individual switches) that show in the Room List and Alexa sees them as individual switches.

If the devices doesn’t show up in the room list, will Alexa see the device as a switches and offer voice control for 6 separate switches as the current implementation allows?

2 Likes

Does the zooz or aeon smartstrip run local? And if not, is there a plan to?

Also, for the local list, what does the aeon outlet refer to? It does not seem to refer to the current aeon smart switches.

Does it refer to a discontinued item?

Bob,

Thanks for looking into the race condition. I was able to loop through the collection manually and trap the errors in a Try-Catch block to allow my code execution to continue without harm from the null values in the “deleted child devices.”

Thanks,

Dan

Did we get an answer to this?

My experience has been that every child device (whether visible on the Things page or not) is accessible from every SmartApp, including the Amazon Echo SmartApp.

Ok, Thanks… sounds like I would just make sure to relabel each of the Child Devices in the IDE so Alexa will control them by something other than the generic Channel CH1, etc. I didn’t see a way to relabel the child devices from the ST app.

I’m still not sure if I like that there’s not an option to also show a child device as an independent thing in a room. I tried assigning a room to a child device in the IDE, but it didn’t make it available in the room.

If you want to see the Child Devices as separate, independent, devices, you simply need to make a minor change to the Parent Device Handler.

In the following function, set the isComponent: true to false as shown below. Save and publish the DH. Then, delete your current device and re-add it. The new Parent Device Handler will then create independent Child devices which can be renamed and placed into rooms as you see fit. Be careful though: This also gives you the option to manually delete each child device with not way to re-create it except by deleting the parent and starting over again.

private void createChildDevices() {
	state.oldLabel = device.label
	for (i in 1..5) {
		addChildDevice("Zooz Power Strip Outlet", "${device.deviceNetworkId}-ep${i}", null,
				[completedSetup: true, label: "${device.displayName} (CH${i})",
				 isComponent: false, componentName: "ch$i", componentLabel: "Channel $i"])
	}
}
3 Likes

Thanks Dan,

Another word of caution about setting up the Child Outlet Devices as independents… Relabeling the Parent Strip Device ended up resetting all the Child Devices back to their original labels. (Actually, it renamed them based on the new Parent Label.) So I would recommend relabeling the Power Strip Device BEFORE customizing the independent Outlet labels.

Was the composite DT ever released for the Aeon SmartStrip? I’m wanting to buy one for my aquarium.

1 Like

Have we got any Info on this working for the aeon strip?

Has anyone confirmed if this runs locally?

It shows up as “cloud” on my IDE