@krlaframboise I setup an auto turn-off timer for relay 1 in the config settings. The relay turned off as expected, but the device state did not update. Any way to build that into the DTH?
If the device doesn’t send a report when it auto turns off then there’s nothing I can do, but it might be sending a report that I’m ignoring and if that’s the case then I can fix it…
I’ve already disconnected that device from my testing box so can you uncomment the trace line at the very bottom of the code, make it auto turn off, and then post the logging results.
It looks like relay 2 and relay 3 are still on so that’s the expected behavior. Once all 3 relays are off the main switch should change to off, but I haven’t tested that with the auto on/off feature.
I don’t have relay 2 or 3 setup at all. Do they turn on/off when using the “Main” switch even though I haven’t set them up or created child switches? Right now I don’t have any child switches created.
The parent device uses endpoint 0 which controls all 3 together.
If you enable the create child device setting for the relay you’re using it will create a child switch device that you can use to control and see the state of just that relay.
Ok, got the child device created. Now a new problem, but this may be out of your control. The child device doesn’t update the tile when it’s turned on, but the tile for the main device does update. It also throws an error when used in the automation creator and doesn’t show up in scenes. The switch state for the child device does appear to get updated in the IDE.
The only other child switch I have to compare is the Zooz Double Plug, which uses a different child DTH(child metering switch). But it does update status, work in automation creator and scenes correctly.
I didn’t actually test this handler in the new mobile app, but considering that I used a SmartThings built-in handler for the child device I expected it would work… You also confirmed that the IDE is updating so I don’t believe it’s anything in my handler.
Are you using my handler for the double plug? If so, try changing the type of the child device to the double plug’s child handler and let me know if that works. The new mobile app doesn’t like when you manually change the type field so you might have to save it a couple of times and/or close and re-open the new mobile app to refresh the cache.
Great work! I also just hooked mine up to our fireplace this afternoon and it’s working great!
Only downside is that the builders neglected to wire the power outlet inside the fireplace so I have the USB cord going out the front into an outlet near the fireplace.
I’m using the default SmartThings one. I hay still trying changing it to “child switch” to see if it still works.
IMO all devs need to start testing all their DTH in the new app. It looks like Classic isn’t going to be around much longer. But of course SmartThings hasn’t provided any kind of documentation for making a hub connected DTH work in the new app, so…
You can kinda see it in my first pic, but one of my outlets required a jumper to work. Kinda wonky, but all 3 inside the insert have power now.
It’s already using the built-in child switch handler so I’m not sure how you’re going to do that…
Except for this one, all the handlers I’ve released in the last year were tested in the new mobile app, but I wasn’t aware of the release date until after it was released so I had to rush this one.
That being said, the device having issues isn’t the one I wrote, it’s the built-in child switch handler so it wouldn’t surprise me if @philly33flyers enables the child device and tests it in the new mobile app that the on/off state of the child app would update as expected.
It might take a little while after enabling the child device for it to work in the new mobile app because I’ve run into a lot of caching issues with it.
It’s not a matter of not having documentation, the problem is that it’s not possible for anyone, except ST, to create custom UIs for the new mobile app. The core code for every built-in Hub Connected device is on GitHub.
I’ve gone through the full submission and approval process in the new developer workspace for a different manufacturer’s hub connected device and the handlers are created the exact same way as custom handlers. The only difference is tying the branding and product details to the handler when submitting them.
Also make sure that you don’t have a custom handler installed called “Child Switch” with the smartthings namespace because that would cause the problem you’re seeing…
no custom DTH for Child Switch. However, looks like the child device didn’t pick up the right DTH. Going to change it to the correct one and try again.
I do have the child device enabled for Relay 1, however I still use the Classic app and have no desire to mess with the new app at this time. I’ve tried the new app a few times here and there and do not like it at all.