Announcement

Collapse
No announcement yet.

Plugin startup, and HS3 restart, causing devices to change and events to fire

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

    Plugin startup, and HS3 restart, causing devices to change and events to fire

    Hi,

    It appears the devices this plugin controls are updated during the plugin startup process. This is problematic because it causes events to fire when changes are detected. Is there any way to wait until the plugin has started, and then only update devices that have a different status than what the plugin detected during startup? I looked for an event condition, like "HomeSeer has been running for..." but that doesn't appear to exist. I don't know how else to prevent these events from firing.

    Granted I fortunately don't need to restart HomeSeer or reboot my computer that often, but when I do, things go haywire right after it boots up with events running that shouldn't.

    Thanks,
    Mike
    HomeSeer 3, Insteon, Z-wave, USB-UIRT, Google Hub/Chromecasts/Smart Speakers, Foscam cameras, Amcrest camera, RCA HSDB2a doorbell
    Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Insteon, Jon00 Homeseer/Echo Skill Helper, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

    #2
    In the startup.vb script I switch off a virtual device at the start of the script and switch it on at the end of the script.
    I can then make an event depending on how long the device is ON.
    Peter

    http://ohh.pcgsm.nl

    Comment


      #3
      That's a clever idea, peterpc , however it seems less than optimal. I don't have this problem with any other plugins or any other devices. I know the plugin is "reconnecting" to all of the devices during startup, but I don't need to know about that. I only need to know if the device values have changed between the last HS or plugin shutdown and when the plugin finishes starting up. I'd love to hear what spud has to say about this before I go this work-around route.
      HomeSeer 3, Insteon, Z-wave, USB-UIRT, Google Hub/Chromecasts/Smart Speakers, Foscam cameras, Amcrest camera, RCA HSDB2a doorbell
      Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Insteon, Jon00 Homeseer/Echo Skill Helper, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

      Comment


        #4
        I'm not sure I understand the problem
        When the plugin starts, it start a thread to discover your chromecast, then when a chromecast is discovered it connects to it and update the devices accordingly to the real status of the devices. But this is not something that is specifically done during the plugin startup process, the discovery thread is always running, so I don't understand what you want me to change?
        What specific devices are causing problem and why?

        Comment


          #5
          I primarily look at the Status device. I have some events that are roughly, If Status has been Idle for 10 seconds, do something (change TV input, reset display). Even if these devices were already Idle before a HS or plugin restart, these events fire 10 seconds after startup. I haven't checked to see if these devices go through multiple statuses before returning to Idle, or if just the timestamps change. I propose that no devices or timestamps get altered during plugin startup. Once startup is complete, compare HS values to plugin values and update accordingly. Then resume normal discovery thread operations. Does that make any more sense?
          HomeSeer 3, Insteon, Z-wave, USB-UIRT, Google Hub/Chromecasts/Smart Speakers, Foscam cameras, Amcrest camera, RCA HSDB2a doorbell
          Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Insteon, Jon00 Homeseer/Echo Skill Helper, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

          Comment


            #6
            Originally posted by mrceolla View Post
            I primarily look at the Status device. I have some events that are roughly, If Status has been Idle for 10 seconds, do something (change TV input, reset display). Even if these devices were already Idle before a HS or plugin restart, these events fire 10 seconds after startup. I haven't checked to see if these devices go through multiple statuses before returning to Idle, or if just the timestamps change. I propose that no devices or timestamps get altered during plugin startup. Once startup is complete, compare HS values to plugin values and update accordingly. Then resume normal discovery thread operations. Does that make any more sense?
            Not really...
            What do you call "plugin startup"? the function called by HS to initialize the plugin does almost nothing, the devices are not updated in this function. Even if I add a delay so that the first update of devices is done like 1 minute after the plugin has started I don't see how that would solve your problem?
            If you don't want the timestamp of a device to be updated if the value has not changed, then check the "Last Change Time Updates on Status Change Only" setting for this device.

            Comment


              #7
              Yeah, I didn't know what happens under the hood. I'm not sure how to explain it differently. If the discovery thread is constantly running and there is nothing special about the start of the plugin, then why isn't the status device's timestamp updating regularly without a value change? It seems to me that would happen more often than just after start.

              Are you referring to the "Do not update device last change time if device value does not change" setting on the device detail's Configuration tab in HS3? Those are all already checked. This seems to indicate the Status device is actually changing values and not just updating the timestamp. Could it be going from Idle -> Unknown -> Idle as things get reconnected?
              HomeSeer 3, Insteon, Z-wave, USB-UIRT, Google Hub/Chromecasts/Smart Speakers, Foscam cameras, Amcrest camera, RCA HSDB2a doorbell
              Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Insteon, Jon00 Homeseer/Echo Skill Helper, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

              Comment

              Working...
              X