-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
US2000: works perfectly. US2000C: no communication at all #23
Comments
Additional question: Can I disable anything so that everything which is received is displayed to check if hardware connection is working at all? The above error messages are identical if I call a serial port which does not exist. The adaptor is a CH340 one which works in a setup of US2000 (without C) perfectly. |
@df8oe Do you have real battery? Could you help with providing logs from battery? 52 => 7E 30 30 35 32 34 36 34 46 30 30 30 30 46 44 39 35 0D This software do the same requests but with different addresses. I don't have real battery but accrding to pylontech specifications this software generate incorrect address. |
I do not have this battery by myself, but I do have access to a "real one". Can you please point me to a CLI version for raw requests? Software is running on a rpi3b+ without GUI - I am accessing via ssh. |
@df8oe in console you can do it with next step: switch to another terminal and execute next commands line by line: switch to terminal 1 and get result Replace /dev/ttyxxx with real serial port |
Thanks. I will do this next time. The battery is owned by a friend and I must contact him to work on it. I will start this today hope his is not on holidays. I will keep you tracked because I am much interested in a solution to access the newer batteries. Thanks for your pointing me to a simple and fast testing environment. |
Morning, I get no output on that command, but picocom works fine on the dev on 115200 for standard text. Guess I've enabled the admin console, no idea how to exit the admin console. pylon>info 2 etc |
@eperdeme for 115200 you should set right speed in stty -F /dev/ttyxxx 9600 command. Did you try with 9600 or 115200? |
I can confirm that there is absolutely no output if I send the echoes to the device. I have tried the above commands and I get no output at all on the US2000C. Then I have tried on my own system with US2000 (without 'C' which works perfectly with pylontech) and there is no output, too. I think there is an issue in the procedure. Because "cat" delivers only the output of the time I started it and then ends I have tried 'tail -f /dev/ttyUSBxxx' but no output, too. |
My testing was invalid as I was using the wrong USB device as I have both USB1 - console(232) + USB0 - RS485 connected.I can't get any response on the 485 but to validate my cable I'll drag a windows laptop up and use another app. |
I used the correct device (in my case /dev/ttyUSB1) and the correct speed. pylontech works in this setup for US2000 (without 'C') perfectly, with US2000C it seems that pylontech gets no communication at all(??) Systems are running on RPI3B+ with Archlinux, pylontech is installed via pip. |
Any idea how to step forward? I have instantly access to an US2000C now. |
Inserting of the print(raw_frame) gives no other informations. There seems to be no communication at all. Dip switch (speed) is set to 115200 baud, I tried connecting RS485-USB-adaptor to both RJ45 (RS485 and CAN) because I have found informations on the web that RS485 connections of CAN work but not at RS485 plug, but no results at all. I think I must start at the absolute beginning:
|
Just to throw it in there because I made that mistake. The input of the RJ45 plug changed between the 2000 and 2000C, on the 2000C it supported RS485 on both pins 1,2 AND 7,8 on the 2000C it only supports on 7,8 And yes, it seems you are correct that the ports are now identical on the 2000C whereas on the 2000 they had different functionality |
Yes, I have noticed this. I have connected 7/8 to RS485 and 6 to GND. I tried both connections (CAN/RS485) but it looks like US2000C does not answer, maybe it does not accept the command at all. I am looking for debug this. |
@df8oe did you manage to get any further with this ? I seem to have the same problem with US5000 and note that the wiring of the RJ45 pin port posted above is the same for US5000 and US2000C so likely the same problem. When I follow @Frankkkkk step of printing the frame I always get back |
I have not made any progress. Same here. I do have access to two friends US2000C connected via RS485-USB-adaptor to RPI. None of them answers to any commands. There is no difference if they are connected or not. Hardware is working fine: When I attach an US2000 everything works like a charm. I played around with communication speed without success. |
Thanks @df8oe, @Frankkkkk any ideas ? |
I found informations under this link: https://www.photovoltaikforum.com/thread/172547-daten-von-pylontech-kompatiblem-akku-auslesen-rs485/ (post from Mattes33 12/29/2022) and will give it a try when I do have time... |
Moin, I am able to communicate with the US2000C ... _>>> import pylontech and _>>> print(p.get_values_single(3)) // get values from second US2000C Container: ...so it is working, thanks to Frankkkkk |
@strom-peter thanks !!!! You have found the solution. Pylontech.get_values() doesn't appear to work because the starting address is as you say 2. Once I got this error I hadn't tried any of the other commands doh ! So I record the full solution for three US5000 packs I have connected in parallel.
(3) Connect RJ45 connector to US5000 port B/RS485 on the master module
|
Nice solution @strom-peter I can confirm that the solution is working for US2000C, too. Nice idea. This is a perfect hotfix, but for a perfect solution we should investigate why the other queries get checksum errors. In my view the script should be able to identify if US2000 or 2000C (and compatible) is connected... |
...or it is possible to use a parameter for select the address in the Function. I think we got a checksum errors because there are no responds data.
|
@df8oe it appears that they do all work providing you force them to look at an address > 1, currently they default to 0.
now get the manufacturer info with dev_id >=2
|
As title says: has anyone successfully communicated with US2000C? When talking to US2000C I only get
File "/usr/lib/python3.10/site-packages/pylontech/pylontech.py", line 270, in get_values f = self.read_frame() File "/usr/lib/python3.10/site-packages/pylontech/pylontech.py", line 200, in read_frame f = self._decode_hw_frame(raw_frame=raw_frame) File "/usr/lib/python3.10/site-packages/pylontech/pylontech.py", line 181, in _decode_hw_frame assert got_frame_checksum == int(frame_chksum, 16) ValueError: invalid literal for int() with base 16: b''
Tested with two different setups (RPI, batteries) - same result...
The text was updated successfully, but these errors were encountered: