Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.
Additional context
I hooked up an old alarm system which has a serial "printer" port, that "prints" strings to the serial port.
When someone uses a badge or opens a door, the alarm system output it to the serial port.
The strings that mqtt-io reads are incomplete, They should be something like:
"4560 21:23:37 10/07/23 Access granted on Door 3 for user 2 Donald"
In 5 of 10 cases this is working as expected, but most of the time the string received is a part of it like:
"ess granted on Door 3 for user 2 Donald"
First of all thanks for your time and great code.
Describe the bug The string that comes from the serial port is sometimes incomplete.
Expected behavior A complete string
Error messages and traceback
Config
Hardware
System:
Additional context I hooked up an old alarm system which has a serial "printer" port, that "prints" strings to the serial port. When someone uses a badge or opens a door, the alarm system output it to the serial port.
The strings that mqtt-io reads are incomplete, They should be something like: "4560 21:23:37 10/07/23 Access granted on Door 3 for user 2 Donald"
In 5 of 10 cases this is working as expected, but most of the time the string received is a part of it like: "ess granted on Door 3 for user 2 Donald"
I tried different versions of mqtt-io.
I tried using different read_interval for the stream_modules, from 0.1 to 2.0
I read through: https://mqtt-io.app/2.2.9/#/config/reference/stream_modules/ https://github.com/flyte/mqtt-io/blob/develop/mqtt_io/modules/stream/serial.py to find other options like buffering but could not find it.
I tried cleanup: false and cleanup: true It doesn't make any difference, what else can I try?
What could be the problem? it seems like a buffer issue to me, but I don't know for sure.
Best Regards, Donald.