HB startup Ocelot input state...

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

HB startup Ocelot input state...

Post by Timoh »

When HB starts up, is it supposed to set the inputs to their correct state so they match the inputs on the Ocelot?

For example, if a shutdown HB, open my garage door, and restart HB, HB still shows my door as being closed. Closing my door and opening it will change the input as expected.

Thanks
Tim
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

When HB starts, it queries the real-time buffer in the Ocelot to get the current input states. It then uses this as the baseline for changes going forward (to compare to changes in buffer for notifications).

Unfortunately, if you changes something while HB is down, that will be the new state when HB is restarted, and it WON'T send notification to the HB devices if different.
Scott
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Post by Timoh »

If I understand correctly, HB will read the Ocelot input states at startup for references *only*. It will then only change the HB device state upon change from this baseline.


Would there be any drawbacks to actually setting the HB device states based on that first read from the Ocelot?

Tim
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Timoh wrote:Would there be any drawbacks to actually setting the HB device states based on that first read from the Ocelot?
Yes. If you have tasks that fire when a PV changes, they would all go off when HB is restarted (assuming something changed). Now in some cases that may be ok, but on others you would have things happening that were supposed to have happen when the PV changed instead of when the server was started, which is probably not what you wanted.

I like to play it safe and take the conservative approach. There's no telling what folks have configured in their tasks. Besides, isn't the server running all the time?
Scott
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Post by Timoh »

Yep... Have to agree with your reasoning.

I wired up some new inputs and the issue I was having was that they were not reporting on/off states correctly due to the threshold values. So I was flipping back and forth between cmax and HB and the inputs were changing and not being registered.

Then I said to myself "Hey Dummy.... Scott added the ability to change parameters from HB, so you don't need to do it in cmax!" And that's what I did.

If it was really an issue I just thought of a workaround in that at HB start, I could run a task that set my threshold parameters to a min value, then a max value, then back to where they should be. This would cause the Ocelot to report an on/off depending on the changed threshold value.

Tim
Post Reply