Announcement

Collapse
No announcement yet.

Detect offline insteon device

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Detect offline insteon device

    I've got two insteon devices in my house that frequently get disconnected. This is always due to human intervention, and it requires human intervention to get it back online. But I'm wondering if I can automate the process of detecting when the device is offline and notifying me so I can go fix it. One of the devices is an insteon bulb in a table lamp. The switch on the lamp often gets turned off, effectively disconnecting the insteon bulb and putting it offline. I have to turn the switch on the lamp to get the insteon control back. The other is a plugin module that gets unplugged every time my wife irons and needs the outlet. I don't know why she can't just plug it back in when she's done, but she never does, and I don't end up noticing for a few days when I walk into a dark room that isn't supposed to be dark. Again, if I could detect that the device is offline, I'd be able to proactively send a message to remind me to fix it.
    I'm not seeing an obvious way to know if an insteon device is offline. Any tricks to do this?

    #2
    Jon,
    I think you will need to write a vb script to do this. there is a plugin function that you can call to get status from a device. from there you can take action.

    Code:
    Public Function PollDevice(ByVal dvref As Integer) As IPlugInAPI.PollResultInfo
    the return is an HS structure, see below

    Code:
            Public Structure PollResultInfo
                Public Result As enumPollResult
                Public Value As Double
            End Structure
    Mark

    HS3 Pro 4.2.19.5
    Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
    Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
    Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

    Comment


      #3
      Thanks Mark. Can you elaborate on the definition of enumPollResult? What are the potential return values in that enum?

      Comment


        #4
        Another method would be to set up a recurring event to poll the two devices every say 15 minutes. Then another event for each device that triggers when the device value changes to "-1 Unknown". The event could Speak "Device unplugged" to notify you.

        Comment


          #5
          Originally posted by Jon View Post
          Thanks Mark. Can you elaborate on the definition of enumPollResult? What are the potential return values in that enum?
          Code:
                  Public Enum enumPollResult
                      OK = 1
                      Device_Not_Found = 2
                      Error_Getting_Status = 3
                      Could_Not_Reach_Plugin = 4
                      Unknown = 5
                      Timeout_OK = 6
                      Other_Error = 7
                      Status_Not_Supported = 8
                  End Enum
          I use:
          OK
          Unknown
          Error_Getting_Status - if the insteon Interface is down

          Unknown is probably your best bet and aligns with Burrington's suggestion
          Mark

          HS3 Pro 4.2.19.5
          Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
          Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
          Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

          Comment

          Working...
          X