-
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
Problem using RS485-Ethernet gateway #25
Comments
Hi, |
Could you explain how you have wired your cable and maybe attach a picture of the rj45 connector ? Is it plugged into the rs485 port ? Maybe a picture of the pylontech battery(es) ? Are they powered on ? |
Yes. As I've said, I've tried two diferent thing. The first one is the RS485-ethernet gateway. This is my battery bms (connected to two batterie modules): From there, I take the RS485 wire. The wire I'm using is the one that brings the battery BMS pack: I take the wire to an adaptor to have the two wires in the air without cutting the original wire: Then, I take the two wires into the gateway, then connect the gateway to a router. Finally, I connect the router to my raspberry and using the IP, the port and the virtual serial point, I run the script. The other option I've tried is using the rs485-usb adapter instead of the gateway: Then, I connect it directly to the raspberry pi. And yes, I've checked all the hardware and it is okey. Also I've tried to communicate with the batteries using a CERBO GX in the middle and it works perfectly. |
On the 4th picture, are the yellow/white wires attached to the 7/8 pins of the converter ? Is the rj45 cable straight (same wire color on both ends) ? |
Yes and yes :) |
In that case, I'd either propose you to simplify your setup (i.e. cut the rj45 cable and wire it directly to the usb converter using the last two strands (brown-white/brown). And if not, then hook up an oscilloscope :-) |
Hi again. I've managed to solve the problem. If I run the command p.get_values_single(2) instead of p.get_values for some reason it returns me all the data without any error. I've run the rest of the commands and all of them works perfecly except p.get_management_info(), which returns: raise exception (Dont touch this for now). I don't know the reason for this. Anyway, thanks Frank for the attention and for the great work you've done with the script :) |
Hi @Jschz99 thanks for the follow up. I'll try to add a disclamer on the readme for the future users. Cheers ! |
Hi everyone. My name is Jesús, I'm a junior engineer. First of all, thanks for your contribution with the python-pylontech lib, it is a great help. I'm using it to connect my force L1 Pylontech to my RaspBerry Pi and I have a problem with it. If you had time and could answer me, I would appreciate it.
My case is the next one: I'm using a R-485 to Ethernet adapter (RSETHER). I run the next command:
The problem is that I'm not sure what part of the code I've to change. I've change the next line from the pylontech.py file:
And I've changed it into:
(Thats the rute to my virtual serial port) Then I run the script and I get the next fails:
Traceback (most recent call last):
File "/home/jesus/Desktop/GitHun/python-pylontech-master/pylontech/PRUEBA.py", line 3,
print(p.get_values())
File "/home/jesus/Desktop/GitHun/python-pylontech-master/pylontech/pylontech.py", line 269, in get_values
f = self.read_frame()
File "/home/jesus/Desktop/GitHun/python-pylontech-master/pylontech/pylontech.py", line 199, in read_frame
f = self._decode_hw_frame(raw_frame=raw_frame)
File "/home/jesus/Desktop/GitHun/python-pylontech-master/pylontech/pylontech.py", line 181, in_decode_hw_frame
assert got_frame_checksum == int(frame_chksum, 16)
Value: invalid literal for int() with base 16: b''
PRUEBA is the name of my script. And thats everything. I don't understand the problem it is reporting, I don't know if I have to change anything else from the lib. And I think it is not a wiring problem, as I've check continuity and everything is ok.
Again, I would be very grateful with any answer.
Best Regards
The text was updated successfully, but these errors were encountered: