I’ve added a simple watchdog automatic serial port restart to the MBUS interfacer if no valid response is received after 10 attempts. This seems to have fixed a data dropout issue for someone I have been helping with this. This update is now available in the latest version of EmonHub v2.6.6 (commit auto restart serial if no data in 10 reads · openenergymonitor/emonhub@4a9b26b · GitHub).
It seems that the serial port software gets stuck perhaps after receiving corrupted data.
I am also wondering if I should call the following after every request, which might avoid the issue in the first place?
ser.flushInput()
ser.flushOutput()
I will test adding this in.