question

bkiesbauer avatar image
bkiesbauer asked

ET340 on Cerbo GX: Not detected

Hi community,


I am using Venus V2.93 (updated today).

I have a hard time to get the ET340 energy meter shown under Settings -> Energy Meters in CerboGX remote console.

I can communicate with the meter via pymodbus and the same USB RS485 adapter and read some registers.

The USB RS485 adapter I use is the following:

Bus 003 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0403 Future Technology Devices International, Ltd
idProduct 0x6001 FT232 Serial (UART) IC
bcdDevice 6.00
iManufacturer 1 FTDI
iProduct 2 USB-RS485-WE
iSerial 3 FT65QB7R

I am kinda confused that the CerboGX tries to use the serial device (/dev/ttyUSB0) as gps?

root@einstein:~# ps | grep ttyUSB
1370 root 1612 S supervise gps-dbus.ttyUSB0
1645 root 1624 S multilog t s25000 n4 /var/log/gps-dbus.ttyUSB0
2749 root 2692 S grep ttyUSB


If anyone can give me pointers to what might be going on, it would be highly appreciated.

cerbo gxEnergy 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.

8 Answers
Thomas avatar image
Thomas answered ·

Hi,

can you give me the output from "lsusb" and "ls -l /dev/serial/by-id". Seems to me the USB-RS485 is not detected by the venus os.

2 |3000

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

bkiesbauer avatar image
bkiesbauer answered ·

lsusb:

root@einstein:~# lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 0bda:b720 Realtek Semiconductor Corp.
Bus 005 Device 002: ID 0424:2422 Standard Microsystems Corp.
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@einstein:~# ls -l /dev/serial/by-id
lrwxrwxrwx 1 root root 13 Feb 25 09:37 usb-FTDI_USB-RS485-WE_FT65QB7R-if00-port0 -> ../../ttyUSB0

2 |3000

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

bkiesbauer avatar image
bkiesbauer answered ·

Hey, maybe I have the wrong meter?
I have a ET340-DIN AV2 3 X S1 X with CG ident code 345, should this be ok?

2 |3000

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

Thomas avatar image
Thomas answered ·

Hi,

i'm not sure if your RS485 cable will work. It has been detected by the linux os but i don't think it will be used by venus os to do RS485 communication.

Do you have a second RS485-USB converter? If yes, you can use a pc with a terminal program to check if the venus os is sending requests (9600 Baud 8 Bit). Data is not ASCII, the terminal program should be set to hex. Request are
"01 03 00 0B 00 01 F5 C8" - Slave-ID 1
"02 03 00 0B 00 01 F5 FB" - Slave-ID 2

If you have an Raspberry Pi with venus os installed i have more ideas to check the communication.

2 |3000

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

bkiesbauer avatar image
bkiesbauer answered ·

I added the cable to /etc/udev/rules.d/serial-starter.rules


ACTION=="add", ENV{ID_BUS}=="usb", ENV{ID_MODEL}=="USB-RS485-WE", ENV{VE_SERVICE}="rs485"


But that did not improve the situation. I can see the activity LED blinking after the cable is connected, but nothing after that.

And I do not have a 2nd RS485 cable to check.

Meanwhile I wrote my own driver for the ET340, which is pretty much a copy for the em24 driver written in python.

I am still at a loss why CerboGX can not detect that ET340 with that RS485-USB cable out of the box.

https://pastebin.com/F76F6FRt

One hast to add

import em340

to the start of

dbus-modbus-client.py to make this work.


Thanks for your help.

2 |3000

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

Thomas avatar image
Thomas answered ·

Change the ENV in the ACTION-Line in the /etc/udev/rules.d/serial-starter.rules.

ENV{ID_MODEL}=="USB-RS485-WE_FT65QB7R"

I remember i had some "try and error" to get my USB-RS485 converter with a HL-340 chipset to work.

But at least i got it to work. I build an SML-Decoder for my Gridmeter and it simulates an Modbus ernergymeter. The venus os on my Raspberry accepts the data.

1677327691246.png

1677327825312.png

1677327882207.png



1677327691246.png (15.0 KiB)
1677327825312.png (26.0 KiB)
1677327882207.png (21.2 KiB)
2 |3000

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

Henry Pearson avatar image
Henry Pearson answered ·

Hi,


I am having a similar issue, I wonder if I could jump on here for some help.

I have a waveshare 4 channel RS485 to USB adaptor. Currently just use 1 channel to connect a JK BMS to the cerbo (works well, in both channel 1 or channel 2). But I've tried connecting an ET340 and it just isn't showing up on the cerbo.

I've downloaded the UCS software and changed the modbus address to 12 and even that didn't help.

Any ideas?

Firnware V3.30~17

root@einstein:~# lsusb

Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 003 Device 002: ID 1a86:55d5 QinHeng Electronics USB Quad_Serial

Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 005 Device 002: ID 0bda:d723 Realtek Semiconductor Corp. 802.11n WLAN Adapter

Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@einstein:~# ls -l /dev/serial/by-id

lrwxrwxrwx 1 root root 13 Apr 20 17:00 usb-WCH.CN_USB_Quad_Serial_BC0481ABCD-if00 -> ../../ttyACM0

lrwxrwxrwx 1 root root 13 Apr 20 17:00 usb-WCH.CN_USB_Quad_Serial_BC0481ABCD-if02 -> ../../ttyACM1

lrwxrwxrwx 1 root root 13 Apr 20 17:00 usb-WCH.CN_USB_Quad_Serial_BC0481ABCD-if04 -> ../../ttyACM2

lrwxrwxrwx 1 root root 13 Apr 20 17:00 usb-WCH.CN_USB_Quad_Serial_BC0481ABCD-if06 -> ../../ttyACM3


2 |3000

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

Henry Pearson avatar image
Henry Pearson answered ·

Perhaps it is down to the fact I'm using a waveshare RS485-US adaptor. But surely a cerbo can cope with a non-victron adaptor for energy meters?!

It works just fine for connecting in my JK BMS over RS485.


1713731877722.png


1713731877722.png (243.1 KiB)
2 |3000

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