toggledbits / DelayLight

A plugin for Vera home automation to provide off- and on-delay of controlled loads.
GNU General Public License v3.0
4 stars 1 forks source link

Device dim level via Actions #13

Open tiaanv opened 6 years ago

tiaanv commented 6 years ago

I'm not a great fan of these types of issues logged in Github, but for reference on my forum post:

Firstly I love you plugin. You did a great job designing it, and the interface is really the part I find most elegant. I currently use a modified version of the Smartswitch plugin as my daily driver for managing automated lights. Lost of the code in there was modified by myself. I do quite a bit of setup these days for other people and find your plugin just to be much better to configure and maintain. It does almost everything I need to change over to DelayLight being my own daily driver.... almost.

The one feature I use quite extensively through the use of scenes, is the ability to set the smartswitches' dim levels. The use case for this is quite simple. during late nights, certain lights still react to triggers form sensors, but to be kind to late night eyes, they are dimmed quite low...
I can think of a two of ways to achieve this with DelayLight, but none of them seem elegant: Use duplicate duplicate timers. and only enable the right ones. Messy clutter. Set dim levels outside of Timers. Most of my lights go full power when binary on is received, instead of last level. they are not actually z-wave... limitation of interface. The fix on face value would be quite simple (expose an action on the timer that facilitates this), until you think about the one feature that really distinguishes DelayLight from SmartSwitch. The ability to include multiple devices for ON/OFF control. The only idea I could think of is to have a "global" ON dim level, and OFF dim level as part of the plugin, and leave the individual nodes dim levels empty. Then have an action that can set these variables. Not sure if this is elegant or practical.

So in conclusion. If you have any ideas how to do this either with an elegant workaround, or code, let me know. I am happy to tackle the code and design, and contribute to your Git Repo, but would not want to write anything that you don't' consider useful of appropriate. I also don't like making my own branches, as that generally leaves me without future enhancements ;)

toggledbits commented 6 years ago

I saw your post on the forums. I posted the common solution there. Let me know if that works for you.

vosmont commented 5 years ago

Hello @toggledbits , I just discovered your plugin. Great job ! Like @tiaanv, I was looking to replace the SmartSwitch plugin.

I was about to start a branch for the functionality to modify the dim level via actions. But just before I started, I saw this discussion. The post should be this : https://discourse.getvera.com/t/plugin-delaylight/198651/106

I've tried the LoadLevelLast, and it works.

Thanks !

toggledbits commented 5 years ago

@vosmont, this is another situation where I would say Reactor (or even just a native scene) is a better solution than additional interface and implementation complexity in DelayLight. There is a "Timing" variable on a DelayLight timer that can be tested in Reactor, or used as a trigger in native Vera scenes, to determine when timing stops, and use the Lua fragment provided in the post to reset the default dimming level at that point.

isidrology commented 5 years ago

best app that got me to start specifying the Nero. previously haven't been doing it due to limitations, this basically solved all the limitations I had.

One thing I was looking into is similar to the above, where my lights will turn on based on reed and motion triggers. However at night the light, when triggered will only go to 30%. This works great, however I want the situation where the wall switch is manually flicked, the lights will turn on to 100%. This is not currently happening as the app tells the light to turn on only at 30%. is there a way to use the inhibitor so that you can set it so that when the Switch input is sensed to be the manual trigger, the light will turn on at 100%? and inhibit the other sensors until a reed or motion is detected again after 5min?