Announcement

Collapse
No announcement yet.

Unable to connect to the remote server

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

    Unable to connect to the remote server

    Hello, every once in a while, my light switches won't respond to any commands, and when I check the log, after every command sent is an error that reads "Calling SetIOMulti in plugin Wemo:Unable to connect to the remote server". Cycling the plugin restores functionality, while also producing one more error: Calling SetIOMulti in plugin Wemo:The given key was not present in the dictionary. Is there something on my end causing this?

    #2
    Originally posted by bla8291 View Post
    Hello, every once in a while, my light switches won't respond to any commands, and when I check the log, after every command sent is an error that reads "Calling SetIOMulti in plugin Wemo:Unable to connect to the remote server". Cycling the plugin restores functionality, while also producing one more error: Calling SetIOMulti in plugin Wemo:The given key was not present in the dictionary. Is there something on my end causing this?
    Sorry you're having issues, let's see what we can figure out. The first error indicates it's losing the ability to talk to the light switch that it had seen previously on the network. The second error indicates you have a device in homeseer that you're trying to control that it hasn't seen on the network since the plugin has been started up.

    How often does this happen?
    Does it happen to the same switch or multiple switches?
    When this is happening are you able to use the Wemo phone app and still see the devices?

    Comment


      #3
      The frequency varies. It can happen about once or twice a day, or just once a week.

      When I get the error, some or all of the switches are unresponsive. It's not the same switch every time. For example - last night I tried turning off all the lights using a shortcut on my phone, and only the living room lights turned off, but nothing in my bedroom did.

      I never tried the Wemo app while this was happening but I was running another local Wemo controller side by side with your plugin, and that controller still worked. Now I only use your plugin. I will try the Wemo app next time it happens.

      Comment


        #4
        Another question, when this happens and the devices do not respond to commands from the plugin, if you manually change the state of the switch, does Homeseer still update the device state in Homeseer?


        Ok, thanks for the great information. Give me a bit to modify some code to help us get to the bottom of this.

        I plan to attack this in the following way:

        1: More meaningful error logging that let's us know how it's failing
        2: When the action or connectivity fails, try to verify if the IP is even reachable by pinging the IP and reporting the result.
        3: For devices that routinely fail to communicate, read the signal strength of the device and record the average strength and report a warning log when/if it starts to dip below that.
        4: Add some more error logic to ensure that any failures to communicate do not cause cascading problem to impact future polls.

        I may also look into creating a homeseer device to indicate signal strength or reachability and/or last time a successful communication took place.


        The way the plugin works right now is to issue an SSDP discovery to the network every 10 minutes, and for each Wemo device it discovers to send a message to the device telling it to notify the plugin for any changes in state. Then every 6 minutes it sends another message to that device to renew that message subscription.

        Comment


          #5
          When the switches are unresponsive, Homeseer does not see the state change when I manually operate the switches.
          Last edited by bla8291; March 4, 2018, 05:39 PM.

          Comment


            #6
            I've realized that a big part of this problem was due to the wifi channel set on my router. I had it set to automatic, and it chose a channel that was conflicting with other networks in my building and causing the devices to disconnect. I changed the channel and things have improved significantly. They even respond quicker than before, whereas before, they would sometimes lag or the command would timeout.

            Comment


              #7
              When a switch goes offline, is it supposed to lose the update request sent by Homeseer? I have a switch that loses connection when I operate the microwave, and when it comes back online, Homeseer can still control it but doesn't know what state it's in.

              Comment


                #8
                The design is like this...

                Send a message to the switch subscribing to any change in status and set the timeout value of this subscription to 10 minutes.

                Every 6 minutes renew the previous subscription.

                As the switch changes state, it sends the notification to the plugin.

                If this is insufficient due to spotty coverage, perhaps I need to rework the algorithm a bit. I appreciate any feedback you can provide so that I may make improvements to the plugin.

                Comment


                  #9
                  I was using an Android app called AutomationManager to control them locally before using Homeseer, and whenever a device went offline, the app would detect that and show it as such. So I suppose that it would resend this subscription once it was able to contact the device again.

                  With your plugin, an offline device isn't detected until a command is sent, which then causes the "unable to connect to the remote server" error in the log. After coming back online, even though the device control still works, rules that monitor the state of the device don't work since it's out of date. I have the plugin set to restart automatically once a day to fix this.

                  I think it would be better to actively monitor the connection status of the devices, pinging each device maybe every 30 seconds or every minute. Use the root of every device to display the connection status or create a new child device to display it. If a ping request fails, send a few more requests immediately to confirm, then display the device as offline if those additional requests fail as well. When the device comes back online, resend the subscription message. I think this would eliminate the need for the user to restart the plugin every time a device goes offline.

                  Comment


                    #10
                    Originally posted by bla8291 View Post
                    I was using an Android app called AutomationManager to control them locally before using Homeseer, and whenever a device went offline, the app would detect that and show it as such. So I suppose that it would resend this subscription once it was able to contact the device again.

                    With your plugin, an offline device isn't detected until a command is sent, which then causes the "unable to connect to the remote server" error in the log. After coming back online, even though the device control still works, rules that monitor the state of the device don't work since it's out of date. I have the plugin set to restart automatically once a day to fix this.

                    I think it would be better to actively monitor the connection status of the devices, pinging each device maybe every 30 seconds or every minute. Use the root of every device to display the connection status or create a new child device to display it. If a ping request fails, send a few more requests immediately to confirm, then display the device as offline if those additional requests fail as well. When the device comes back online, resend the subscription message. I think this would eliminate the need for the user to restart the plugin every time a device goes offline.
                    I like some your ideas here. I'll see what I can put into the next release to help the plugin deal with unstable connectivity.

                    Comment


                      #11
                      I am also receiving the "Calling SetIOMulti in plugin Wemo:Unable to connect to the remote server" error using plugin v1.1.40718.33645, and am unable to operate the Wemo devices from Homeseer. I must resort to using the Wemo App to control the devices. Restarting the Wemo plugin resolves the issue for a while. This seems to happen several times per week and affects all three of my Wemo switches in various areas of my home well-covered by WiFi signal strength.

                      At the time of this writing I noticed that v
                      1.2019.0112.1676 is now available. I'll upgrade and give it a try.

                      Comment


                        #12
                        Try the update and let me know if it doesn't help. I'll continue to look into anything on my side.

                        Comment


                          #13
                          I've been running the update since its release, and I can't say I've seen any errors. The problem that remains is that after an undetermined amount of time of the switches being online, commands sent from HomeSeer have no effect. The only reason it took me so long to notice is that I had a script set to run in parallel with my lighting events to perform the same action in case the HomeSeer commands fail. I tried to turn on a switch directly from the HS homepage and it didn't work. The strange thing is if the switch is turned on locally, the status updates in HomeSeer.

                          Comment


                            #14
                            The plugin works using several communication methods. When the plugin starts up and every so often it sends out a discovery message to find all switches/plugs. It then goes to all of them and sees if they're already in HomeSeer, if they're not it adds them. It then sends a subscribe request to the switch/plug to ask it to inform HomeSeer if the switch/plug changes it's status.

                            This would explain why you're still receiving status updates from the plugs. At this point I'm not 100% sure what would be causing the plugs to not be responding to the plugin.

                            Is it all the plugs at the same time or do they just randomly 1-by-1 stop working?
                            Do they start working again at anypoint other than when you restart the plugin?
                            Is it a specific model/type of switch/plug that stops or all of them?
                            How long after the plugin is running does it take for them to stop working? (hours? days? weeks?)
                            Do the plugs/switches have good wireless signal? Do you live in area with congested wireless coverage?

                            Comment


                              #15
                              I might be able to provide helpful answers, as this bug also still affects my setup. I am using plugin v1.2019.112.1676 on HS3 Pro. See inline responses:

                              Originally posted by kingfetty View Post
                              At this point I'm not 100% sure what would be causing the plugs to not be responding to the plugin.

                              Is it all the plugs at the same time or do they just randomly 1-by-1 stop working?
                              It's rarely a complete outage at first. Over time (generally a few days), all devices will eventually stop working (respective to the plugin). I have seen one or two wemo devices stop working, while the remaining devices are still functioning. Eventually all wemo devices will stop working from within HS, but all are still controllable from the official wemo app.

                              Do they start working again at anypoint other than when you restart the plugin?
                              No. Many days have gone by and I've never regained control of the devices from within HS. I must restart the plugin, then they all begin responding immediately.

                              Is it a specific model/type of switch/plug that stops or all of them?
                              I have different models (all of which are affected):
                              Two of: WeMo_WW_2.00.11143.PVT-OWRT-SNSV2
                              One of: WeMo_WW_2.00.11057.PVT-OWRT-SNS


                              How long after the plugin is running does it take for them to stop working? (hours? days? weeks?)
                              Historically between 1-4 days before all of the devices stop working. I'll time the working duration [restarting the plugin as I write this].

                              Do the plugs/switches have good wireless signal? Do you live in area with congested wireless coverage?
                              All wemo devices have very adequate WiFi coverage on different overlapping 2.4GHz channels from multiple access points. DHCP Lease Renewal is set to 86400 seconds. My private IP subnet is /16. The 2.4GHz spectrum is not overly saturated; and no packet loss to the devices.

                              Comment

                              Working...
                              X