Notify device from interface on startup?
Posted: Sat Dec 03, 2005 1:52 pm
In my HAI plugin I want to be able to query the security status every time HouseBot starts up. This is because the security status may have changed while HouseBot was not running and it will also help "resync" HB when it crashes while attempting to execute an HAI command.
I tried several different things and none of them worked. I then came to what I believe is a correct conclusion but if so I'm not sure what to do about it.
Here is what I think is happening. When HouseBot starts it starts all the hardware interfaces and then it starts the various devices. I am assuming that my hardware interface *is* getting the updated security status and sending a notification. However, since the corresponding device module is not yet started it's not listening for notifications.
Typically I wouldn't need to do a periodic poll for security mode although just because it was easy I added to an hourly poll that grabs a few other bits of data. This poll works just fine to update the security status.
So I have two questions:
- does my hypothesis seem correct?
- if so can someone suggest how I might solve this issue?
-- Dave
I tried several different things and none of them worked. I then came to what I believe is a correct conclusion but if so I'm not sure what to do about it.
Here is what I think is happening. When HouseBot starts it starts all the hardware interfaces and then it starts the various devices. I am assuming that my hardware interface *is* getting the updated security status and sending a notification. However, since the corresponding device module is not yet started it's not listening for notifications.
Typically I wouldn't need to do a periodic poll for security mode although just because it was easy I added to an hourly poll that grabs a few other bits of data. This poll works just fine to update the security status.
So I have two questions:
- does my hypothesis seem correct?
- if so can someone suggest how I might solve this issue?
-- Dave