The Vera Community forums have moved!

General => Power Management => Topic started by: turby on March 17, 2015, 03:41:53 pm

Title: Virtual switch and luup code activating scenes based on available power
Post by: turby on March 17, 2015, 03:41:53 pm
Can someone please help me with the code required?  ???


Title: Re: Virtual switch and luup code activating scenes based on available power
Post by: RexBeckett on March 17, 2015, 07:52:04 pm
This level of polling and processing really needs to be done in a plugin rather than a scene. At the very least the code could be placed in Startup Lua so it starts automatically following a Vera/Luup restart.

Have you already done any Lua coding on Vera? This should not require very advanced code but it will involve these parts:


I would break it down and get each part running before attempting the next stage. I would strongly recommend using ZeroBrane Studio for Vera (http://forum.micasaverde.com/index.php/topic,17780.0.html) as a development tool. There is a one-time licence fee but it could save you many hours of trial-and-error debugging.

This is an adventurous project if you haven't written any Lua for Vera but I don't see any insurmountable issues.