Hello!
I’ve currently got an ever expanding file in this format which is a constant print out from a serial port.
This is one line:
{'FW': '0308', 'SOC': '999', 'Relay': 'OFF', 'PID': '0x203', 'H10': '3', 'BMV': '700', 'TTG': '1692', 'H12': '0', 'H18': '690', 'I': '-6216', 'H11': '0', 'Alarm': 'OFF', 'CE': '-143', 'H17': '578', 'P': '-73', 'AR': '0', 'V': '11759', 'H8': '15632', 'H9': '93', 'H2': '-145', 'H3': '-62393', 'H1': '-68223', 'H6': '-478196', 'H7': '4', 'H4': '3', 'H5': '0'}
As I think the lines dont always get printed in complete sections. Hassio file sensor has problems setting sensors up on boot.
I need to read and print complete lines of this to a file, maybe once every 10 seconds. So HA has a chance to read and setup file sensors.
Can anyone supply me with a script that can do this?
The current serial printed script resides at:
/usr/share/hassio/homeassistant/vedirect-bmv/bmv700.txt
The new parsed file can also print to this folder.
Any help greatly appreciated!