Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: "Smarter" lighting control Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jpcurcio
Senior Member
Senior Member
Avatar

Joined: April 01 2007
Location: United States
Online Status: Offline
Posts: 119
Posted: January 03 2008 at 16:40 | IP Logged Quote jpcurcio

In the new year, I'm going to try to make my lighting control a little smarter and more sophisticated. I'll try to explain what I mean... here are a few examples:

1. I have a "dusk" timed event/macro to turn on certain lights. However, if I manually turned on a light, I probably don't want the "dusk" timed event/macro to change the level... but I still want it to turn off with the "go to bed" event.

2. I want to be able to over-ride a setting for one (or multiple) lights, but then restore it to the state it should be in afterwards. For example, if a timed event turns a light on to 80%, but I want to locally dim it to 20%, it should stay there until I "restore" it. At that point, if the light should have turned off via a timed event, I would want it to turn off.

In order to do this, there are a few things that I need to do... one is store the "previous value" of the light. This is easy to do using variables, but is there a better way?

Also, what I want to happen might depend on the current status. Short of including a status check for every lamp in every a macro prior to executing the command (every single time, mind you), is there a simpler way?

As an example, take this scenario:

Timed event to turn on kitchen light. If light is on already, do nothing, but if it's off, turn it on. Next, I want to execute a "special" command to dim the light, but later restore the value. However, if the kitchen light should have turned off by a timed event, I want to turn it off, not resotre the previous dim level.

Make sense? I'm sure I can do this by "brute force" programming, but any suggestions to streamline the process?

Thanks...

-John
Back to Top View jpcurcio's Profile Search for other posts by jpcurcio
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 03 2008 at 20:44 | IP Logged Quote TonyNo

In situations like these, I just check the current status using ph_getx10level, ph_getinsteonlevel/ph_getinsteonlevelrt and react accordingly.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum