Smartthings with AD2PI Network appliance

General Discussion

Re: Smartthings with AD2PI Network appliance

Postby Scott » Tue Apr 12, 2016 10:24 am

I don't believe you'll have any issues if you change their names with the app. That should accomplish the same thing as changing the labels when the devices are created. We look them up by their deviceNetworkId when we're interacting with them.
Scott
Expert Nut
Expert Nut
 
Posts: 118
Joined: Thu Dec 12, 2013 11:17 am

Re: Smartthings with AD2PI Network appliance

Postby JJsLegacy » Tue Apr 12, 2016 10:50 am

Scott wrote:I don't believe you'll have any issues if you change their names with the app. That should accomplish the same thing as changing the labels when the devices are created. We look them up by their deviceNetworkId when we're interacting with them.



Excellent - I will wait until we figure out why they aren't turning on/off before I change names but this is excellent so far!

I used Rule Machine (sadly withdrawn) to set this up to auto turn off the alarm this morning when we woke up - worked perfectly.
JJsLegacy
Junior Nut
Junior Nut
 
Posts: 31
Joined: Tue Jan 19, 2016 4:17 pm

Re: Smartthings with AD2PI Network appliance

Postby Scott » Tue Apr 12, 2016 11:55 am

Very cool!

So I tried a variety of switch configurations (configured or not, in different places, etc), but unfortunately I haven't been able to reproduce the switch issues. I pushed a debug branch up with some more log messages to hopefully help us narrow it down. I'd appreciate it if you could try the smartapp/device type from here: https://github.com/nutechsoftware/alarm ... tree/debug

Thanks!
Scott
Expert Nut
Expert Nut
 
Posts: 118
Joined: Thu Dec 12, 2013 11:17 am

Re: Smartthings with AD2PI Network appliance

Postby JJsLegacy » Tue Apr 12, 2016 12:07 pm

Will try it now and report back.


On a side note - you might want to add "decoration: "flat" " or similar to the refresh tile so you can detect it was pushed like:

standardTile("refresh", "device.refresh", inactiveLabel: false, width: 3, height: 2,decoration: "flat") {
state "default", action:"refresh.refresh", icon:"st.secondary.refresh"
}

Without that there is no real acknowledgement that the button is pushed.
JJsLegacy
Junior Nut
Junior Nut
 
Posts: 31
Joined: Tue Jan 19, 2016 4:17 pm

Re: Smartthings with AD2PI Network appliance

Postby JJsLegacy » Tue Apr 12, 2016 12:12 pm

With the debug code I do see this:

Code: Select all
removed the clutter



but no change in any switch state


I am not seeing this ever called:
log.trace("zoneOn: switch id=${evt.value}")

It's like it's not getting to the smartapp or something. hmmm


In the IDE under installedapps I see:

Event Subscriptions

None

Should it have any subscriptions?


***Edit - It was definitely the subscriptions missing. I tried to click through the smartapp a few times but no dice. I painfully removed everything I had setup and started over and I now see the events. Very odd but now we know!

Thanks for the help!
JJsLegacy
Junior Nut
Junior Nut
 
Posts: 31
Joined: Tue Jan 19, 2016 4:17 pm

Re: Smartthings with AD2PI Network appliance

Postby Scott » Tue Apr 12, 2016 2:09 pm

Awesome! Glad you figured it out. I'm thinking I may need a delay between addChildDevice and the subscribes. Gotta love asynchronous systems. =)
Scott
Expert Nut
Expert Nut
 
Posts: 118
Joined: Thu Dec 12, 2013 11:17 am

Quesito

Postby JJsLegacy » Tue Apr 12, 2016 4:15 pm

Probably a good idea - Smartthings isn't the most robust/stable thing in the world these days. A lot of unexplained random hiccups in the "cloud".

Things look great so far. I have it all rebuilt and customized.

My few thoughts/changes I made to my handlers:


1. Add " decoration: "flat" " to the standardtile definition for the refresh so you can tell that you pressed it.
2. Changed the api_key and PIN definition to "password" instead of "text" so the entries don't show - not a big deal but a bit more security.
3. Commented out the PANIC second line so I just have a blank tile until something safer is setup. (I actually moved refresh in its place since I will use that more often)

Question:
Any reason you made the zones on/off vs virtual open/close? It would seem ideal to make them virtual sensors but thought maybe there was a reason.

thanks for all the work on this!
JJsLegacy
Junior Nut
Junior Nut
 
Posts: 31
Joined: Tue Jan 19, 2016 4:17 pm

Re: Smartthings with AD2PI Network appliance

Postby slockner » Wed Apr 13, 2016 3:36 pm

Thanks guys this is working great. I was wondering if a way around the 60 sec refresh issue would be to create an Web Services SmartApp and then have the alarmdecoder webapp update the devices when ever a zone changes?

Thanks.
slockner
newt
newt
 
Posts: 4
Joined: Mon Jan 11, 2016 11:23 am

Re: Quesito

Postby Scott » Thu Apr 14, 2016 10:08 am

JJsLegacy wrote:Question:
Any reason you made the zones on/off vs virtual open/close? It would seem ideal to make them virtual sensors but thought maybe there was a reason.


Not implemented currently, but there's potential down the road for triggering virtual zones on the alarm, so switches made sense. Unsure of a real use-case at this point since SmartThings does a lot of that stuff, but the possibility is there.

slockner wrote:Thanks guys this is working great. I was wondering if a way around the 60 sec refresh issue would be to create an Web Services SmartApp and then have the alarmdecoder webapp update the devices when ever a zone changes?


I was digging into this a bit yesterday. That method definitely looks promising and likely not too much work to implement.
Scott
Expert Nut
Expert Nut
 
Posts: 118
Joined: Thu Dec 12, 2013 11:17 am

Re: Quesito

Postby JJsLegacy » Thu Apr 14, 2016 12:08 pm

Scott wrote:
Not implemented currently, but there's potential down the road for triggering virtual zones on the alarm, so switches made sense. Unsure of a real use-case at this point since SmartThings does a lot of that stuff, but the possibility is there.




Not sure I understand what you said. In smartthings you made the 8 "zones" on/off switches. Why not use an open/close model instead? This would allow for more logical rules to be created like turn off the HVAC if a window is open or alert me if a door is left open for X minutes. Not so easy to do with them being on/off. Makes sense?
JJsLegacy
Junior Nut
Junior Nut
 
Posts: 31
Joined: Tue Jan 19, 2016 4:17 pm

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 5 guests

cron