Device custom states in to variables

Posted on
Sun Jul 03, 2016 10:58 am
Indy_Larry offline
Posts: 133
Joined: Dec 03, 2013
Location: Indianapolis

Device custom states in to variables

I am hoping to hear of a better way people are handling this. Right now I am having to go through and create a variable folder for the device I'm wanting to get information on. Then within that folder, I'm creating each variable name for the custom state that I'm wanting to know about or use. Then I'm creating a trigger so the variable will get populated with the device information.

Under actions > Variable Actions > Insert Device State into Variable > Select device and edit action setting

Lets take Daves Weather Underground plugin (its a great plugin Dave), it probably has more than 20 custom states that you can create a variables for. Are guys going in and manually creating variables for all of the custom states you want/need and then creating a trigger with multiple actions to populate all of those variables?

As of now I have one trigger for each device with multiple Actions to fill those variable fields with the device information.

Thanks,

Larry

Larry

Insteon, Z Wave, Hue, Sonos

Posted on
Sun Jul 03, 2016 11:01 am
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Device custom states in to variables

I myself typically trigger directly from the device state change.
Rarely have a need for a separate variable with it's info.

Carl

Posted on
Sun Jul 03, 2016 11:03 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Device custom states in to variables

Carl is correct – is there a particular reason you need the device states pushed into variable values? In most places that one uses a variable value they could also use a device state.

Image

Posted on
Sun Jul 03, 2016 11:39 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Device custom states in to variables

matt (support) wrote:
Carl is correct – is there a particular reason you need the device states pushed into variable values? In most places that one uses a variable value they could also use a device state.


The only time I had to do it was the highly specialized instance where a very short duration signal (in my case the Dakota Driveway sensor and PiBeacon door open/close states) were being used by a "poll once per minute"plugin (IndigoPlotD) Even using the "Maximum" option on the door open histogram plot, it missed almost all of the 1 second on/off on the driveway sensor and a good deal of the 5 to 10 second open/close on the doors till I created a variable that echoed the state with an instantaneous open/on trigger and a 1 minute delay on the close/off trigger.

Posted on
Sun Jul 03, 2016 2:28 pm
DaveL17 offline
User avatar
Posts: 6757
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Device custom states in to variables

Indy_Larry wrote:
Lets take Daves Weather Underground plugin (its a great plugin Dave), it probably has more than 20 custom states that you can create a variables for. Are guys going in and manually creating variables for all of the custom states you want/need and then creating a trigger with multiple actions to populate all of those variables?

Thanks Larry. You should be able to get the information you need directly from each plugin device.

Screen Shot 2016-07-03 at 3.24.54 PM.png
Screen Shot 2016-07-03 at 3.24.54 PM.png (62.58 KiB) Viewed 2247 times


What are you trying to accomplish, exactly?
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Jul 04, 2016 7:37 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Device custom states in to variables

The only time I had to do it was the highly specialized instance where a very short duration signal (in my case the Dakota Driveway sensor and PiBeacon door open/close states) were being used by a "poll once per minute"plugin (IndigoPlotD) Even using the "Maximum" option on the door open histogram plot, it missed almost all of the 1 second on/off on the driveway sensor and a good deal of the 5 to 10 second open/close on the doors till I created a variable that echoed the state with an instantaneous open/on trigger and a 1 minute delay on the close/off trigger.


you could increase the sampling rate for indigoplotD down to 1 every 4 seconds.. down from 1 every 1 minute. BUT this should only be done when your MAC can handle it.
Trying does not hurt though.

or another way o catch fast changing devices/states: everytime the state changes increment a variable. You them know exactly how often a door was opened/ closed. Then plot "DELTA" in indigoplotD.

Karl

in config:
Attachments
Screen Shot 2016-07-04 at 08.32.28.png
Screen Shot 2016-07-04 at 08.32.28.png (96.87 KiB) Viewed 2154 times

Posted on
Tue Jul 05, 2016 4:01 pm
Indy_Larry offline
Posts: 133
Joined: Dec 03, 2013
Location: Indianapolis

Re: Device custom states in to variables

Thanks everyone, for your replies. Matt, Carl, Dave you are correct and it seems I can do this in most if not all of things I'm working on now. I sometime I just over complicate things, and this is why I reached out.

As always thanks everyone.

Larry

Insteon, Z Wave, Hue, Sonos

Posted on
Tue Jul 05, 2016 4:11 pm
DaveL17 offline
User avatar
Posts: 6757
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Device custom states in to variables

Indy_Larry wrote:
I sometime I just over complicate things, and this is why I reached out.

Been there! Glad to help.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 13 guests

cron