manu-fwi / openlcb-gateway

Gateway from openlcb to cmri (and more)
GNU General Public License v3.0
3 stars 1 forks source link

RR_duino_net_serial.py: Node down at startup never discovered later #9

Closed ggee closed 4 years ago

ggee commented 4 years ago

While testing the latest fixes, I found a startup problem.

  1. If my RR_duino_nodes_DB.cfg listed 3 nodes and only 1 was running when I start RR_duino_net_serial.py, the other 2 are not added to the dead node check.

  2. If I plugged one of the missing nodes in, RR_duino_net_serial.py does not know it started and does not poll the config for it.

pi@rr-lcc-1:~/openlcb-gateway $ python3 RR_duino_net_serial.py
RR_duino_net_serial started on serial port /dev/ttyUSB0 at 38400
Connected to serial port /dev/ttyUSB0
Connected to gateway!
Loading RR_duino nodes from RR_duino_nodes_DB.cfg
    Found node: 1
    Found node: 2
    Found node: 3
Timed out!
Timed out!
*** Getting config from node at  3
    Sensors list= [(1, 9, 2)]
    Turnouts list= []
    Sending message to gateway: {"FULLID": 2002004, "ADDRESS": 3, "VERSION": 3, "SENSORS": [[1, 9, 2]], "TURNOUTS": []}
Checking for dead nodes
Checking for dead nodes
Checking for dead nodes
ggee commented 4 years ago

Issue fixed.