Announcement

Collapse
No announcement yet.

polling

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

    polling

    I know there is a way to have HS automaticly pool Insteon devices. Is there a way to only poll when needed? Like in a script? I have a few scripts that will exicute based on the current status of lights. I also have some x10 remotes that will change the status but HS will not see these changes as I have the x10 function turned off. Nothing worse than going to bed and then having the light flash to let you know it will turn off in one minute when it was allready off.

    #2
    If you have things setup properly HomeSeer will know the status of the lights without polling. There is also scheduled polling available, and I'm pretty sure there is a script command to force polling of a device.

    If HomeSeer is not tracking the status of your Insteon lights properly then something is not setup correctly with the plug-in or you are having Insteon communication problems.

    Jon


    Originally posted by cgertz
    I know there is a way to have HS automaticly pool Insteon devices. Is there a way to only poll when needed? Like in a script? I have a few scripts that will exicute based on the current status of lights. I also have some x10 remotes that will change the status but HS will not see these changes as I have the x10 function turned off. Nothing worse than going to bed and then having the light flash to let you know it will turn off in one minute when it was allready off.
    Jon Ort
    JonOrt@The--Orts.com
    (Remove the dashes in the address, spam is getting out of hand)

    Comment


      #3
      HS tracks switch status changes just fine. The only issue I have is when I turn off my bedroom light using a X10 mini timer. The light will turn off via the X10 command but the switch will not report back to HS that it turned off since the command came on the X10 side. I have X10 disabled in the plug in since this is the only non RF X10 device I have left.

      I tried using the hs.PollDevice command but that keeps reporting back "unknown". I supose I could use the geturl command and get the status from the SDM via the "getOnLevelText" but that doesn't seem very clean way to do it. If anyone has a better idea I am open to sugestions.

      Comment


        #4
        PollDevice should work. Better would be to have the mini timer send an X10 command to HomeSeer and have an event turn off the light via insteon.

        Post a detailed debug of you calling hs.PollDevice and we'll see why polling does not work (you could set the light to auto-poll in the Insteon config too)

        Jon


        Originally posted by cgertz
        HS tracks switch status changes just fine. The only issue I have is when I turn off my bedroom light using a X10 mini timer. The light will turn off via the X10 command but the switch will not report back to HS that it turned off since the command came on the X10 side. I have X10 disabled in the plug in since this is the only non RF X10 device I have left.

        I tried using the hs.PollDevice command but that keeps reporting back "unknown". I supose I could use the geturl command and get the status from the SDM via the "getOnLevelText" but that doesn't seem very clean way to do it. If anyone has a better idea I am open to sugestions.
        Jon Ort
        JonOrt@The--Orts.com
        (Remove the dashes in the address, spam is getting out of hand)

        Comment


          #5
          With the x10 Disable on the plugin I do not get any information with detail logging on. With X10 enabled I get
          Code:
          4/10/2006 10:31:18 PM ~!~Insteon~!~Queueing X10 Command: %1 Cmd: 15 Pcnt: 0 Data1:  0 Data2: 0
          4/10/2006 10:31:18 PM ~!~Insteon~!~Calling DM: 'SendX10=%1'...
          4/10/2006 10:31:18 PM ~!~Insteon~!~Calling DM: 'SendX10=% Status Request'...
          4/10/2006 10:31:18 PM ~!~Insteon~!~-xX10: True,%1
          4/10/2006 10:31:18 PM ~!~Insteon~!~-xX10: True,% STATUS REQUEST
          4/10/2006 10:31:26 PM ~!~polling~!~17
          [COLOR=Magenta]Turned switch on here manually using HS[/COLOR]
          4/10/2006 10:32:05 PM ~!~Info~!~Device: Master bedroom Overhead light (%1) ON
          4/10/2006 10:32:05 PM ~!~Insteon~!~Processing SetIO for device - %1 Cmd:  2 Bright:  0 Data1:  0 Data2:  0
          4/10/2006 10:32:05 PM ~!~Insteon~!~Setting status and value for device %1 to % based value of 100
          4/10/2006 10:32:05 PM ~!~Insteon~!~Calling DM: SetOnLevelText(01.51.66, 100%)
          4/10/2006 10:32:05 PM ~!~Insteon~!~-xIns: 00 D3 D8 01 51 66 05 11 FF, Src[00.D3.D8] Dst[01.51.66] Cmd:Go ON FF
          4/10/2006 10:32:06 PM ~!~Insteon~!~ Result: ON
          4/10/2006 10:32:06 PM ~!~Insteon~!~-rIns : 04 01 51 66 00 D3 D8 26 11 FF - Event: ACK msg, Src[01.51.66] Dst[00.D3.D8] {Ack/Dir} Cmd:Go ON Ex: FF
          4/10/2006 10:32:06 PM ~!~Insteon~!~-rTxt: setOnLevelText=01.51.66,ON
          4/10/2006 10:32:09 PM ~!~Info~!~Event Trigger "test on demand polling"
          4/10/2006 10:32:09 PM ~!~Info~!~Running script in background: gertz.pooling.txt
          4/10/2006 10:32:10 PM ~!~Insteon~!~Queueing X10 Command: %1 Cmd: 15 Pcnt: 0 Data1:  0 Data2: 0
          4/10/2006 10:32:10 PM ~!~Insteon~!~Calling DM: 'SendX10=%1'...
          4/10/2006 10:32:10 PM ~!~Insteon~!~Calling DM: 'SendX10=% Status Request'...
          4/10/2006 10:32:11 PM ~!~Insteon~!~-xX10: True,%1
          4/10/2006 10:32:11 PM ~!~Insteon~!~-xX10: True,% STATUS REQUEST
          4/10/2006 10:32:18 PM ~!~polling~!~17
          I get a returned value of 17 no matter what wtate the switch is in.
          I have the script down to get the information direct from the SDM I will run that for a few days and see if the extra communication causes any problems.

          Comment


            #6
            It looks like HomeSeer is sending me an X10 polling request instead of calling the proper poll callback in my plug-in. I assume that using the "Poll devices" option in the HomeSeer UI works properly?

            Jon


            Originally posted by cgertz
            With the x10 Disable on the plugin I do not get any information with detail logging on. With X10 enabled I get
            Code:
            4/10/2006 10:31:18 PM ~!~Insteon~!~Queueing X10 Command: %1 Cmd: 15 Pcnt: 0 Data1:  0 Data2: 0
             4/10/2006 10:31:18 PM ~!~Insteon~!~Calling DM: 'SendX10=%1'...
             4/10/2006 10:31:18 PM ~!~Insteon~!~Calling DM: 'SendX10=% Status Request'...
             4/10/2006 10:31:18 PM ~!~Insteon~!~-xX10: True,%1
             4/10/2006 10:31:18 PM ~!~Insteon~!~-xX10: True,% STATUS REQUEST
             4/10/2006 10:31:26 PM ~!~polling~!~17
             [color=Magenta]Turned switch on here manually using HS[/color]
             4/10/2006 10:32:05 PM ~!~Info~!~Device: Master bedroom Overhead light (%1) ON
             4/10/2006 10:32:05 PM ~!~Insteon~!~Processing SetIO for device - %1 Cmd:  2 Bright:  0 Data1:  0 Data2:  0
             4/10/2006 10:32:05 PM ~!~Insteon~!~Setting status and value for device %1 to % based value of 100
             4/10/2006 10:32:05 PM ~!~Insteon~!~Calling DM: SetOnLevelText(01.51.66, 100%)
             4/10/2006 10:32:05 PM ~!~Insteon~!~-xIns: 00 D3 D8 01 51 66 05 11 FF, Src[00.D3.D8] Dst[01.51.66] Cmd:Go ON FF
             4/10/2006 10:32:06 PM ~!~Insteon~!~ Result: ON
             4/10/2006 10:32:06 PM ~!~Insteon~!~-rIns : 04 01 51 66 00 D3 D8 26 11 FF - Event: ACK msg, Src[01.51.66] Dst[00.D3.D8] {Ack/Dir} Cmd:Go ON Ex: FF
             4/10/2006 10:32:06 PM ~!~Insteon~!~-rTxt: setOnLevelText=01.51.66,ON
             4/10/2006 10:32:09 PM ~!~Info~!~Event Trigger "test on demand polling"
             4/10/2006 10:32:09 PM ~!~Info~!~Running script in background: gertz.pooling.txt
             4/10/2006 10:32:10 PM ~!~Insteon~!~Queueing X10 Command: %1 Cmd: 15 Pcnt: 0 Data1:  0 Data2: 0
             4/10/2006 10:32:10 PM ~!~Insteon~!~Calling DM: 'SendX10=%1'...
             4/10/2006 10:32:10 PM ~!~Insteon~!~Calling DM: 'SendX10=% Status Request'...
             4/10/2006 10:32:11 PM ~!~Insteon~!~-xX10: True,%1
             4/10/2006 10:32:11 PM ~!~Insteon~!~-xX10: True,% STATUS REQUEST
             4/10/2006 10:32:18 PM ~!~polling~!~17
            I get a returned value of 17 no matter what wtate the switch is in.
            I have the script down to get the information direct from the SDM I will run that for a few days and see if the extra communication causes any problems.
            Jon Ort
            JonOrt@The--Orts.com
            (Remove the dashes in the address, spam is getting out of hand)

            Comment


              #7
              I set polling to 1 min in the pluging and it will update. Still I don't think the SDM is stable enough for the extra traffic. The way I had it setup I was only getting one SDM crash once a week if that. If the hs.PollDevice is suppose to callback to your plugin maybe this is a held desk ticket. I was under the impression that it was the plugin that handled the polling requests.

              Comment


                #8
                "Held Desk"... I like that.

                I know that HomeSeer calls the poll function in the plug-in when you use the "Poll devices" button on the HomeSeer interface. I would assume it should call the same interface when the device in question is an IO device (as Insteon devices are)

                Jon


                Originally posted by cgertz
                I set polling to 1 min in the pluging and it will update. Still I don't think the SDM is stable enough for the extra traffic. The way I had it setup I was only getting one SDM crash once a week if that. If the hs.PollDevice is suppose to callback to your plugin maybe this is a held desk ticket. I was under the impression that it was the plugin that handled the polling requests.
                Jon Ort
                JonOrt@The--Orts.com
                (Remove the dashes in the address, spam is getting out of hand)

                Comment


                  #9
                  Looking at the code, it should be calling your SetIO function with a command of 15, which is a status request. Is this what you expect?
                  💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                  Comment


                    #10
                    Nope, since I'm an IO plug-in and the SDK states:

                    ...
                    ' this function is called when the user chooses to poll for a device's current value.
                    Public Function PollDevice(ByVal ref As Long, ByVal housecode As String, ByVal devicecode As String) As String
                    ...

                    The above code is called when the user selects the poll devices button from the UI. I would expect that if a user has a script that calls PollDevice on my device that the same function would be called rather than sending a poll X10 code through SetIO.

                    Jon




                    Originally posted by rjh
                    Looking at the code, it should be calling your SetIO function with a command of 15, which is a status request. Is this what you expect?
                    Jon Ort
                    JonOrt@The--Orts.com
                    (Remove the dashes in the address, spam is getting out of hand)

                    Comment


                      #11
                      Ok, forgot about that one. It appears to be working ok from the Poll button on the status page, but not from the script function. That has been fixed.
                      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                      Comment


                        #12
                        Installed 2.1.29 this morning. Polling now works. Thank you both for all your hard work.

                        Comment

                        Working...
                        X