Privatecoder / seplos-mqtt-remote-rs485

fetch data from one or multiple Seplos battery packs via (a) (remote) RS485 connection(s)
9 stars 3 forks source link

Question about cable and how to config wave share #1

Closed mworion closed 5 months ago

mworion commented 5 months ago

Privatecoder,

First, congrats to this excellent solution. Still I'm struggling with it as I need to config the waveshare device and need to do the wires. Could you give some help ? I really appreciate your work !

Michel

Privatecoder commented 5 months ago

Hi Michel,

I suggest you take a regular patch-cable and cut one of the connectors. Then you take the orange, orange-white and green-white wires, crimp a terminal onto them and connect them to the waveshare device like this:

This works for both, Masters via the splitter (Baud 9600) and Slaves to an empty RS485 port of the BMS (Baud 19200).

waveshare-pins

mworion commented 5 months ago

Hi Privatecoder, many thanks, did so, should work. Any ideas how to check if the waveshare receives the data ? I currently do not see the remote serial links in your source. You talk about a docker image. Is there any dependency about this ? And if, which one to use to use the remote RS-485 right. Michel

Privatecoder commented 5 months ago

When using VirCom in Windows, how do your settings look like? Can you provide a screenshot?

As for the remote serial-link question: The Docker image uses socat which is able to create a remote-tcp-serial to local virtual-com-port bridge, which is then used by the script. No other components are required in this case.

Privatecoder commented 5 months ago

..also waveshare provides a tool called sscom. If you open that and connect to your waveshare device via the TCPClient option you will see intra-pack-communication when running multiple packs in parallel (in my case, the waveshare device connected to the slaves in this example has IP 192.168.100.59).

image
mworion commented 5 months ago

As I'm on a Mac, Windows solutions do normally not match. I integrated this now in w windows machine: Bildschirmfoto 2024-01-28 um 14 34 29 Is it possible to rund it without a docker (as you are using the docker mainly for running socat to get the remote RS-485 ?

Privatecoder commented 5 months ago

I am also on a Mac using Windows in a vm. Click on "Device" and then of the two devices with their configs and post them.

mworion commented 5 months ago

Bildschirmfoto 2024-01-28 um 15 23 48 Bildschirmfoto 2024-01-28 um 15 24 11

Privatecoder commented 5 months ago

When connecting to a master via a splitter, set baud-rate in the waveshare-settings to 9600, if you are connecting to a slave, set it to 19200. Right now your baud-rate is set to 115200 from what I can see in the screenshot above.

mworion commented 5 months ago

Ok, trying. Many thanks so far. I need some more time to check and test. I'll come back. Michel

Privatecoder commented 5 months ago

Just to be sure – these are my settings for the waveshare device, wehere Seplos#1 is for the connection to the Master (pack-0) and Seplos#2 for the Slaves (pack-1-n):

SCR-20240128-plhw SCR-20240128-plmc
Privatecoder commented 5 months ago

also I see your device's firmware is old. consider checking this thread to update it.

mworion commented 5 months ago

OK, got it. There is one topic I do not understand: I use the same waveshare with two ports, but only get one device -> this might be the problem. Michel

mworion commented 5 months ago

Sorry missed your last message, I'll update the firmware as well.

Privatecoder commented 5 months ago

OK, got it. There is one topic I do not understand: I use the same waveshare with two ports, but only get one device -> this might be the problem. Michel

You will have two interfaces and two config options. The default IPs are 192.168.1.200 for the first and 192.168.1.201 for the second port.

In your screenshot

image

one of them is missing but this doesn't mean it is not there. Try to click multiple times (click and wait) on Auto search until it shows both. Then edit each one of them to have their own IP within your IP range, i.e. 192.168.2.70 and 192.168.2.71

Privatecoder commented 5 months ago

@mworion does this work for you know / can I close this issue? Also let me know what to put in the readme for others to not stumble upon similar issues.

Privatecoder commented 5 months ago

if there are any more issue please let me know.

mworion commented 5 months ago

Sorry being late, the important part so far was the hint of the update of the firmware. This helped. Now I'm testing around the usage etc. Thanks for all the help. Michel