Announcement

Collapse
No announcement yet.

frequent disconnections - nodemcu api

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

  • frequent disconnections - nodemcu api

    I have recently started using the nodemcu api with the arduino plugin. Every time I check (which is about twice a day) the board is disconnected. I immediately ping the board and there are no issues. The wireless signal strength at the point the nodemcu is at -59 dBm; a decent figure some would say very good..
    I then click the disconnected button followed by connect and it immediately reconnects. When I check a few hours later it is disconnected again.
    Any tips on how to automatically reconnect (I have ticked the Auto Connecr check box) ?.

    PS
    A brief copy of the log:
    Warning = Board: 2 has a connection ERROR. Retrying.
    Warning = Board: 2 has a connection ERROR. Trying Reset.
    Connecting Board No:2 at ip address 192.168.1.145 Port No:8901
    Board 2 Version API1.0.0.140 and Plugin Version 1.0.0.142 are compatible.
    Connected to Board No:2 at ip address 192.168.1.145 Port No:8901
    Updating pins on Board No: 2
    Updating Values on Board No: 2
    Warning = Board: 2 has a connection ERROR. Retrying.
    Board 2 Version API1.0.0.140 and Plugin Version 1.0.0.142 are compatible.
    Connected to Board No:2 at ip address 192.168.1.145 Port No:8901
    Updating pins on Board No: 2
    Updating Values on Board No: 2
    Warning = Board: 2 has a connection ERROR. Trying Reset.
    Error = Board: 2 Connection FAILED.
    Disconnected from Board No:2 at ip address 192.168.1.145 Port No:8901
    Connecting Board No:2 at ip address 192.168.1.145 Port No:8901
    Board 2 Version API1.0.0.140 and Plugin Version 1.0.0.142 are compatible.
    Connected to Board No:2 at ip address 192.168.1.145 Port No:8901
    Updating pins on Board No: 2
    Updating Values on Board No: 2

    If it does not add too much overhead would it be possible to put a time stamp on the log?


  • #2
    Here I have many nodeMCUs also running API version. Some are at the edges of wifi coverage so I see frequent errors. I have an event for each board that checks and resets if needed. With the recent group enhancements in easytrigger, I think I could do it with one event. Note that there is heartbeat built into my app. It toggles a heartbeat device every minute. If it has been in one state for several minutes, the app is either not running or comm is down. That is what is referenced in the last OR IF.

    Here is one of mine:
    Attached Files

    Comment


    • #3
      Thank you - will try it.

      Comment


      • #4
        You may find more stable connections if you include the pubsub library in your sketch for use of MQTT. This makes for a WiFi connection rather than a cabled one and then also able to setup the Quality Of Service to get the integrity appropriate for the data. If you use MQTT then you will also need a MQTT service enabled somewhere on your network. Mosquitto is a commonly used one.

        Comment

        Working...
        X