Open evanes68 opened 4 years ago
Hmm, I now see the closed issue on disconnecttimeout...
It seems the connection is disconnected in my instance because for 10 minutes there are no messages. Which is logical because I am in a rural area with only some remotes sending signals.
The only reason I can understand such a timeout is if the rflink goes silent. But would you not want a reconnect in this situation? And not only on a write command but also on a system that only reads rflink messages?
I think I may have to increase the disconnecttimeout a little, but I still think the adapter need reconnect logic.
What is your position on this?
What is your position on this?
Happy to get a PR :-)
It took me a while to figure out what a PR is. This being my first, be gentle...
My rflink works well, but sometimes I get a disconnect and the adapter instance goes yellow.
I looked at the code in lib/serial.js and I see there is reconnect logic in the write routine, but there is no automatic reconnect on random disconnect.
In order to enable this please add the following lines in serial.js in the this.disconnected = function() (the disconnectTimeout line is an existing line to show where to add the code):