MindFreeze / dalybms

Scripts for interfacing with Daly Smart BMS
MIT License
17 stars 8 forks source link

Connect UART direct to Raspi GPIO #5

Open Tabaluga0815 opened 1 year ago

Tabaluga0815 commented 1 year ago

Hi, I connected the UART connector from BMS directly to my Raspi GPIO ports , and can read the data via /dev/ttyS0 . But no luck to use your script to send the data via mqtt to my mqtt iobroker on my windows server. I would apriciate for some help. Best wishes Ralf

MindFreeze commented 1 year ago

Sorry but I've only used it through USB. No idea how it would work through gpio pins

Tabaluga0815 commented 1 year ago

Do you have an idea ?

ralle@raspi-ahoy:~/dalybms $ ./run.sh Starting BMS monitor... Traceback (most recent call last): File "/home/ralle/.local/lib/python3.9/site-packages/serial/serialposix.py", line 322, in open self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK) FileNotFoundError: [Errno 2] No such file or directory: 'null'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/ralle/dalybms/./monitor.py", line 15, in ser = serial.Serial(os.environ['DEVICE']) # open serial port File "/home/ralle/.local/lib/python3.9/site-packages/serial/serialutil.py", line 244, in init self.open() File "/home/ralle/.local/lib/python3.9/site-packages/serial/serialposix.py", line 325, in open raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg)) serial.serialutil.SerialException: [Errno 2] could not open port null: [Errno 2] No such file or directory: 'null'