Best Practices at the start

Posted on
Sun Jun 12, 2016 11:45 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Best Practices at the start

Different Computers wrote:
Is there a way of doing this I haven't even thought of?

In 1.5.0 of Device Extensions I added a new conversion to read the device's lastUpdated property and turn it into "minutes elapsed". You can write an easy trigger "if door = open and elapsed >= 1". That feature is current in the plugin on the site (as 1.4.2) if you want to test it out. If the concept sounds good and works the way you want then let me know, I have a couple easy code ideas that could probably make it work out for you.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Sun Jun 12, 2016 12:04 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Best Practices at the start

Nice!

For now I've gone with variables. More I thought about it, the smoother that seemed.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sun Jun 12, 2016 12:20 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Best Practices at the start

If it looks like a device, and quacks like a device, call it a device. That's what the virtual devices are for. These are actual devices, but one that you don't have a direct connection to. If you set it up as a device, then you can use normal device semantics to interact with it.

Then, if you ever swap out those sensors for Insteon or Z-wave ones, nothing changes except the device type in the existing device.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Jun 12, 2016 12:37 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Best Practices at the start

Different Computers wrote:
For now I've gone with variables.
FlyingDiver wrote:
If it looks like a device, and quacks like a device, call it a device.

And these two quotes perfectly embody the reason for most of my plugins, I got tired of managing variables :P

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Sun Jun 12, 2016 12:38 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Best Practices at the start

Colorado4Wheeler wrote:
Different Computers wrote:
For now I've gone with variables.
FlyingDiver wrote:
If it looks like a device, and quacks like a device, call it a device.

And these two quotes perfectly embody the reason for most of my plugins, I got tired of managing variables :P


:D :D :D :D

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Aug 12, 2017 10:26 am
jphauck offline
Posts: 30
Joined: Oct 26, 2015
Location: Concord, CA

Re: Best Practices at the start

Different Computers wrote:
But IS that more complicated? In one case I have two groups (that have to be built of various parts and kept up to date) and in the other I have ONE group and one variable.

Imagine if I decided I want my GE Link bulbs to come on at 50 % starting at Sunset until full dark. If I don't do a variable, I have to create another group entirely for that 40-ish minute window of time/behavior.

I'm all for simplicity. But I wonder about how to achieve it. Hence my calling for best practices.



I am late to the game here, and what I have done in these cases is create scenes. When a device has more than on/off state and I want to leverage that consistently at a trigger or schedule, that works for me. For instance. I have all my outdoor low voltage pathway lights on a on off scene. But the lights on the garage exterior and front porch can be ramped to any level of brightness. I wanted my garage and porch to be a progressive ramp over the course of an hour to come on and go off (it is such a subtle beauty to watch). I have scenes set for 3 brightness levels. I did this because I also use those brightness levels off a motion sensor trigger.

I run the scenes in an on script with a delay that allows the ramp. May not be the best practice but I like how it looks and overall isn't that what really matters?

Jim H.
Concord, CA

Posted on
Mon Aug 14, 2017 7:55 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Best Practices at the start

I'm still thinking about this, but my first thought about it is Actions are better than virtual device groups because they're easier to tune or change. Doesn't mean I don't use some VDGs, but going forward I'll probably use Actions.

Having tried a bunch of ways to get my lights to react to sunrise/sunset, I'm finding the most satisfying one is to use a Luminance sensor. I'm still tuning the sensor itself and fixing some rules that keep exterior lights from coming on too soon, but this works best for me--better than a python script that counts up/down a value for "darkness" around sunset/sunrise, or trying to set long ramp up values based on the same.

Not an answer that's necessarily generalizable--but maybe it is: Maybe the Best Practice is to, whenever possible, have automations react to real world changes rather than set schedules or scripts.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sat Aug 26, 2017 5:21 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Best Practices at the start

Hi Ahmed,
Take a look at this page Indigo 7 Documentation

There is a link on that page to Getting Started Guide highlighted with ← Start here!

That should get you going but any further questions, please ask. :)

Who is online

Users browsing this forum: No registered users and 4 guests