Announcement

Collapse
No announcement yet.

What is the correct behaviour for Auto Connect?

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

    What is the correct behaviour for Auto Connect?

    Everything seems to be working fine with my Mega board now that I have the Reset function working correctly (https://forums.homeseer.com/forum/hs...et-not-working), however still have a bit of an issue with auto connect when I temporarily cycle power (I think).

    If I drop power or network connection for sometime (say more than 30 secs), the board reconnects just fine after sometime. If I remove power from the board temporarily (say less than 5 secs), the relays de-energise and LCD goes out. HS4 still reports as "connected". When I re-power, the board doesn't appear to properly re-initialize. i.e. LCD does not come back on properly and relays don't go back to proper state. It still appears to be communicating but unless I re-connect or reset, it remains in this state. Is this correct behaviour or should the board properly re-initialize immediately on power cycle?

    #2
    After some more testing I have found that if I cycle the power within 5 seconds, I get this problem. If I leave power off for more than 5 seconds and then turn on, the board comes back to life within 60 seconds.

    Comment


      #3
      Finally found the solution to the problem I was having.

      It was taking up to 40 sec for the Arduino to get an IP address on my unifi network. By disabling STP (spanning tree protocol) on the specific port the arduino is connected to, the Arduino connects immediately on a power cycle.

      I discovered this by temporarily changing the delay from 1500 to 60000 on the void setup() routine in the sketch before in attempts a connect at startup. It now happily operates at the standard delay(1500) in the sketch.

      Comment


        #4
        Originally posted by santoal View Post

        ...It was taking up to 40 sec for the Arduino to get an IP address on my unifi network. By disabling STP (spanning tree protocol) on the specific port the arduino is connected to, the Arduino connects immediately on a power cycle...
        Why not just assign a static IP address?

        Comment


          #5
          Static IP address is assigned. The DHCP issue with UniFi when stp is on seems to be a known issue with delayed connection.

          Comment


            #6
            Originally posted by santoal View Post
            Static IP address is assigned. The DHCP issue with UniFi when stp is on seems to be a known issue with delayed connection.
            If you have the Arduino configured with a static IP address than DHCP should not be an issue.

            Comment

            Working...
            X