question

cbscpe avatar image
cbscpe asked

Can I use the RS485 of the Waveshare CAN/RS485 HAT to connect to the energy meter ET112?

I have installed Venus OS 2.92 on a Raspberry Pi 3B+ and use the combined Single CAN Bus and RS485 Hat from Waveshare. I have successfully connected the Pylontech Battery via the CAN Bus and now I need to connect the ET112 Energy Meter to the Venus OS and I was asking myself if I can use the RS485 that comes with the Waveshare hat or if I need to use an USB->RS485 Adapter.

Venus OSEnergy Meter
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

7 Answers
awalkerinuk avatar image
awalkerinuk answered ·

I reckon you can, I would give it a try.

There might be an issue with drivers depending how the Venus OS software deals with the RS485 being on the waveshare shield and not on a USB > RS485.

But I would not have thought you cant do any damage by try it. Worst case it just will not show up!



2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

cbscpe avatar image
cbscpe answered ·

It just does not show up. However, as the RS485 on the Hat ist just using the UART on Pin 8 and 10 of the Expansion Port it definitively has a device name in Linux and by modifying the serial-starter.rules in /etc/udev/rules.d it should be possible to trigger the RS-485 task for it. I did not try it, because I found a USB to RS-485 Adapter in my toolbox with the required FT232R chip and that did work out of the box, however I will give it a try with the RS485 on the Hat has this would be very convenient and save one of the spare USB ports.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

cbscpe avatar image
cbscpe answered ·

Just found out, you probably cannot, the serial interface on the GPIO has been reused for the bluetooth since Rapsberry PI 3 and the serial interface on the GPIO is no longer a hardware UART. So it is not worth to try it as most likely Venus OS does not provide this driver. In any case, I have a working setup and most likely will have to use a USB-Hub with enough ports.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bindpe avatar image
bindpe answered ·

Hi

can you tell me which USB to RS-485 do you use to operate "out of box"

I want to read out my smart meter via HAGER EHZ001K to the Venus OS, to build up an ESS


is this possible`?

thank you


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

kds avatar image
kds answered ·

Actually, you can deactivate the bluetooth to enable UART connection, on AMA0 port (config.txt). You’ll have to disable the console as well (command.txt).

I did that with success without the HAT in order to read periodically data from my meter via OBIS / optical interface. But with the HAT plugged I couldn’t manage to use this port, via HAT extension pins.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Christian Schindler avatar image
Christian Schindler answered ·

Ich hatte anfangs das gleiche Problem da ich mir das
Waveshare Isolated RS485 CAN HAT (B) geholt habe welches 2 RS485 und ein CAN Bus hat. Beim rpi4 musst du wie oben erwähnt das bluetooth ausschalten. Und eine udev Regel erstellen dann ging der Controller bei mir ohne Probleme.


ergänzungen in der /u-boot/config.txt

>

dtoverlay=disable-bt

dtparam=spi=on

dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25,,spimaxfrequency=1000000

dtoverlay=sc16is752-spi1,int_pin=24

>

folgende Datei erstellt /etc/udev/rules.d/gpio.rules

>

ACTION=="add", SUBSYSTEM=="tty", SUBSYSTEMS=="platform|usb-serial", SYMLINK+="serial-starter/%k"

ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttySC0", ENV{VE_PRODUCT}="6001", ENV{VE_SERVICE}="rs485:default"

ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttySC1", ENV{VE_PRODUCT}="6001", ENV{VE_SERVICE}="rs485:default"

>

reboot

bildschirmfoto-2023-12-06-um-210811.pngrs.jpegbildschirmfoto-2023-12-06-um-184724.png


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

wawibu avatar image
wawibu answered ·

Wie bekommst Du denn dann das Modbus RS485 Gerät in Venus OS hinzugefügt? Da scheitere ich aktuell

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

wawibu avatar image wawibu commented ·
Hat sich erledigt, habe es hinbekommen :)
0 Likes 0 ·