Author |
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: February 19 2011 at 18:10 | IP Logged
|
|
|
Hi - I had an interesting thing happen this evening.
1) power went out. PC continued to operate on UPS
2) PH tried unsuccessfully to turn on lamps, etc as it was right at dusk.
3) UPS timed out, PC went down.
4) Power came back, but lamps stayed OFF because PH -thought- it turned them on before it went down.
Don't know any way around this, except - is there some way to get PH to sample the house state (basically what you see on the Device Stat display), and then, add a command to your System Startup script to set all the modules to the listed state (before it catches up on un-executed events?)
or - how to tell PH that it's on UPS?
just an idea - unfortunately this is a (admittedly small) hole
thanks
/j
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 19 2011 at 19:56 | IP Logged
|
|
|
You could run a wall wart from normal power into a relay connected to something that PH can read. Then, just set a PowerOn GV, or similar, based on that input.
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: February 20 2011 at 08:19 | IP Logged
|
|
|
I test for PLM/PLC failures and if your power went out and the PLM/PLC is not on UPS you would get an error. In my case my error recovery is different than yours and will remember what the current setting are and restore them. As I recall you do your error recovery at the time you send the command. The devices will remember what the last was at power failure and restore back to that level. In your case probably off. One would have the same problem, as I once did, if PH is on a laptop. If the power comes on before the batteries shutdown then you most likely would have to do a reinit to recover using my senerio.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: February 20 2011 at 09:38 | IP Logged
|
|
|
Hi BB _ Not quite following - my PLM is not on UPS, and PH knows it didn't get through, but how do I get from there to "remember which commands didn't get through, and if you have a system startup soon after, repeat those commands"?
thanks
/j
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: February 20 2011 at 09:52 | IP Logged
|
|
|
Jeff, If I recall when you send an Insteon command you check immediately the status and do error recovery if it took or not. In my case I save the levels in their own global that I expect the device to be set at and check later and if the values don’t match I resend the command with the correct values. In essence we both achieve the same results and yours is a lot easier to implement and maintain. In my case I can come back later and recheck the status and if not correct I can resend the correct level or command to the device. I originally used this strategy because of the amount of noise I have and get flaky results even with Insteon. If I detect a communications problem with my PLM using a time-out approach I reinit and reset all devices to their last status.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: February 21 2011 at 11:44 | IP Logged
|
|
|
With the next beta, I have a couple of new plugins to deploy as well including a Power Status plugin. Basically this new plugin will use the Windows power management and automatically fire a trigger if the PH machine has a compliant UPS connected and power is lost (or restored). You can also check remaining battery percentage. When power is lost, you can then disconnect any power dependant controllers or perform other recovery actions/monitoring.
Dave.
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: February 21 2011 at 12:36 | IP Logged
|
|
|
BB- I could set up my own globals and code for every module, but that would be a lot of globals/code and i don't think I could find an easy way to index - (i.e., it would be a lot of manual if-then code).
dave - that sounds useful and helpful and i'll muck with it when it's available. What I was thinking was that PH always knows what the state of each module -should- be, it would be great if there was essentially a "sync" routine, that, when called, set every module to its expected state. I could just add that command to my startup and be ducky..
/j
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: February 21 2011 at 14:33 | IP Logged
|
|
|
Dave, that would be helpful. Right now I have a routine the does a PH_GETINSTEONLEVELRT to every concerned device and if I accumulate multiple consecutive errors in a certain period of time I consider that a timeout and reinit PH. This has worked for me but as Jeff said it is a global nightmare
__________________ Pete - X10 Oldie
|
Back to Top |
|
|