Serial integration is unstable

I played about with serial for weeks, until in the end I accepted that it is just broke.
It had trouble handling the data I was sending to it and would just freeze.
You must only send standard text to it with /r/n to terminate the input. This was the best I could get it to work, but would still freeze up.
The port would just stop responding all together after x minutes and required rebooting to recover.
None of this was an issue in any other terminal programs.
I accepted that this wasn’t going to work, and so switched to an alternative method.
Now I get serial data into HA via serial through an ESP8266 and then onto HA via RESTful.
It was a pain, but works flawlessly now.

1 Like

Finally I found root cause for mine unstability - for folks with HassOS on VirtualBox having problem with USB ports - check:

  1. Use USB 3.0 xHCI. For 1.x and 2.x I had errorls like “failed to get modem status” or “error from flow control urb”.
  2. After automatic snapshot the USB device will die. You must disconnect and reconnect device, like:

“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” snapshot {591a8933-f0ef-4e8c-91c5-a079a383ecf9} edit “AutomaticBackup01” --name “AutomaticBackupOLD”
“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” snapshot {591a8933-f0ef-4e8c-91c5-a079a383ecf9} edit “AutomaticBackup02” --name “AutomaticBackup01”
“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” snapshot {591a8933-f0ef-4e8c-91c5-a079a383ecf9} edit “AutomaticBackup03” --name “AutomaticBackup02”
“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” snapshot {591a8933-f0ef-4e8c-91c5-a079a383ecf9} edit “AutomaticBackup04” --name “AutomaticBackup03”
“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” snapshot {591a8933-f0ef-4e8c-91c5-a079a383ecf9} edit “AutomaticBackup05” --name “AutomaticBackup04”
“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” controlvm {591a8933-f0ef-4e8c-91c5-a079a383ecf9} usbdetach {c72f6eca-9864-4255-8376-b48db6d5ddbb}
“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” snapshot {591a8933-f0ef-4e8c-91c5-a079a383ecf9} take “AutomaticBackup05”
“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” snapshot {591a8933-f0ef-4e8c-91c5-a079a383ecf9} delete “AutomaticBackupOLD”
“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” controlvm {591a8933-f0ef-4e8c-91c5-a079a383ecf9} usbattach {c72f6eca-9864-4255-8376-b48db6d5ddbb}