Closed ceisserer closed 1 year ago
hi @ceisserer , can you add some pictures of your setup please ? Cheers
Hi @Frankkkkk:
Thanks a lot for taking a look. Currently the setup is rather simple (normally turned on of course ;) ), just the two PINS (7&8 from the cable) connected to A and B of the RS485 module. The other cables are un-insulated from former tests, also I tried a 120 Ohm termination resistor between A and B which didn't help:
With the following Code: p = pylontech.Pylontech('/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0', 9600) print(p.get_values())
I get the following output:
[root@localhost tech]# python pylon_nomqtt.py
Traceback (most recent call last):
File "/home/ce/Privat/Haus/Akku/tech/pylon_nomqtt.py", line 9, in
So again it seems like communication problems - even at 9600 baud :/ Also it doesn't seem to be caused by parasitic/capacitic currents, I gave it a try with my notebook which was running on battery - same result.
also I have to appologize - I initially used another (more complex) library ('PylontechStack') and the error messages in the first post were from the former library, but I have to admit I like this one more because of its simplicity :)
Hi @ceisserer , Thanks for the info. From what I can see on the picture, your DIP1 is off, which (unless I'm mistaken) means that the RS485 baudrate is 115200. Thus:
If it still doesn't work:
Cheers
The problem was so simple and stupid, it never crossed my mind it could actually be such an easy-to-fix problem. The source for all the issues observed was a systemd unit file I had created a few weeks before and had forgotten. so when i manually started the script to work on it again after that break one instance was already running and both were reading/writing to the serial device file. i always disliked windows' file locking, but I have to admit in this case it would have saved a lot of time and RJ45 cables I cut open and soldered ;)
Sorry for the noise and thanks a lot for all your help, time and suggestions.
Hi @ceisserer thanks for the follow up. I've released v0.3.3 which asks for exclusive access to the serial port so that the issue doesn't arise :-) Cheers
Awesome, thanks a lot!
I guess this is not an actual bug with the library but with my setup, yet since I didn't find forum to ask related questions, please be kind. I really don't know what else I could try / how to debug this issue further.
When reading the values of my US5000 with an RPI3 it sometimes works (first it failed, with a shorter cable it worked fine for a day and now I am back at the error state) and sometimes I only get:
I already tried:
I am really out of options. Could it be some parasitic voltage caused by the switching power supply of the Raspberry? Any ideas what to try next?