Announcement

Collapse
No announcement yet.

ISY event data not loaded on first hs3 startup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ISY event data not loaded on first hs3 startup

    Not sure if this is a HS3 or ISY issue. Not sure exactly when it started, but I find on first startup of HS3 after a reboot the ISY device states and variables are populated in HS3 devices, but not in HS3 events. If I restart HS3, the events now have valid ISY devices and variables. See screen shots attached.
    Roger
    Attached Files

    #2
    Originally posted by rlrjupiter View Post
    Not sure if this is a HS3 or ISY issue. Not sure exactly when it started, but I find on first startup of HS3 after a reboot the ISY device states and variables are populated in HS3 devices, but not in HS3 events. If I restart HS3, the events now have valid ISY devices and variables. See screen shots attached.
    Roger
    It's obviously timing related. It looks like HS is querying the plug-in before the plug-in has queried the ISY.

    The guidelines for plug-in developers is that the plug-in initialization should not block the startup of HomeSeer so I don't, but in this case it looks like HomeSeer is not waiting for the initialization to complete before querying the plug-in for the event information.

    I'm afraid that if I try to solve this in the plug-in I'll end up causing more problems. I'd have to try an block the HS query which may end up blocking plug-in initialization and result in both the plug-in and HS hung waiting for each other.
    --
    Bob Paauwe
    ISYInsteon Plug-in
    http://www.bobsplace.com/ISYInsteon/

    Comment


      #3
      Is it due to other plugin startup delays or startup order? If its timing why wouldn't the second startup follow the same timing? I boot system wait 4 min before starting HS3, check events to see if they loaded devices and variables. If they are not there, I shutdown HS3 and restart. That always fixes the issue. Is something being cached from that first startup that would affect the second start timing?

      Comment


        #4
        I don't know.

        I don't have any access to the HomeSeer source code. And I agree that it doesn't really make sense that it would be have differently the first time it's run after a system boot. Possibly it has something to do with windows .dll caching that effects timing.

        The ISYInsteon plug-in supplies the string that is displayed in the event. HomeSeer gets that string by calling into a specific function in the plug-in. If that function is called before the plug-in has finished initializing, it is possible that the plug-in won't have access to the device names and thus return a string with them blank.

        I just ran some experiments and it makes even less sense to me now. That function is only called when you actually display the event and it's re-queried each time you open the event to display it. Thus, by the time you're looking at it in the web interface, it should be initialized and the device name should be available from the ISY (and would have to be if device status is updating).

        That function does have quite a bit of debugging info available for it if you switch the log level to debug. Simply switching to debug, opening the event, and then switching off debug should be enough. The debug lines of interest will have ActionFormatUI followed by a few ActionFromData lines.

        There should be a line "ActionFromData : Action ADR = <something>"

        The <something> is the ISY address for the device (or variable ID, or program ID, etc).

        The ActionFromData is the data HomeSeer passes into to the plug-in. If ADR is not set, then it's HomeSeer's fault, if it is set and correct, then the plug-in is failing.
        --
        Bob Paauwe
        ISYInsteon Plug-in
        http://www.bobsplace.com/ISYInsteon/

        Comment

        Working...
        X