brbeaird / SmartThings_MyQ

Integrate SmartThings with MyQ (Obsolete)
https://github.com/brbeaird/SmartThings-MyQ-Edge
Apache License 2.0
410 stars 896 forks source link

Adding support to new SmartThings app #40

Closed vseven closed 6 years ago

vseven commented 6 years ago

Couple things that can be added that isn't perfect but makes it at least work until official documentation comes down:

brbeaird commented 6 years ago

Oh wow, that's excellent. I'll give that a try, thank you!

brbeaird commented 6 years ago

So does all that need to go into DTH or are the functions going into the SmartApp? Also, I'm not familiar with the syntax of that first meta data piece...got any similar examples I could check out?

vseven commented 6 years ago

All DTH. Here is a example of updated metadata in a "standard" DTH:

https://github.com/SmartThingsCommunity/SmartThingsPublic/blob/f64411dcd14d1a41e886a0feaddd530f675d3888/devicetypes/smartthings/smartpower-outlet.src/smartpower-outlet.groovy#L18

There is no true garage control I've found.....generic-contact-4 is the closest but like I said its not perfect (shows two switches...one for garage door and one for just door control) but it at least lets it work in the new app and doesn't seem to affect Classic. If I remove the capability door control it does show correctly.

Health check is a guess that seems to work ok. Its based on this for the structure (example is z-wave): https://community.smartthings.com/t/fibaro-open-close-sensor-health-check/140043/7 and then the syntax in the health check command in the stock EcoBee handler: https://github.com/SmartThingsCommunity/SmartThingsPublic/blob/f64411dcd14d1a41e886a0feaddd530f675d3888/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy#L142 but honestly I wouldn't add that part yet.

I would start with just the meta data and removing door control and you'll get it to at least show up in the new app and work. It will show "checking status" but clicking on it will show correctly.

Also the new app wont show the change....it holds the old dth. So to see it you have to delete the device and re-add.

brbeaird commented 6 years ago

Gotcha. That's annoying to have to delete and re-add...too lazy to deal with that at the moment, but I'll try at some point. Thanks again!

vseven commented 6 years ago

Yeah, I feel the same way especially since I then have to reauthorize ActionTiles for that device and update my panel since the "old" garage door is gone. But adding just the meta data and removing the "door Control" capability will give you a working device in the new app:

image

I haven't found a fix for the "Checking Status..." issue yet. Most people say adding the vid will fix it but it didn't in this case.

brbeaird commented 6 years ago

Ok, yep - I added my door to my second hub just to test it, and it now shows up in the new app. Progress! Hopefully we'll see changes soon-ish to make it a bit more streamlined.