Ahh… Thanks @alexpescaru It wasn’t clear to me, but now it is:
vreg is for VE.CAN (The -n option is required to specify the device on the bus) vregd is for VE.Direct
For vreg, you can do a ‘vreg -c ?’ and get output like this:
The following gateways were found:
--------------------------------------------------------------
socketcan:can0 can0
--------------------------------------------------------------
But for vregd, doing a ‘vregd -c ?’ gives you this:
000.000 ERR.serial: could not open com-port
000.000 ERR.task: failed to open serial port!
How do I know to which /dev/ttyxxxx it is connected ?
When looking at dmesg | grep ttyU I don’t see anything. But looking at dmesg | grep ttyS I’ll see I have a ttyS0. Is the VE.Direct on a Cerbo connected to the Serial port ?
When you specify the ? on the -c switch is considered an error and the program is showing your available options.
Your approach is quite unusual… But solves the problem.
How is your MPPT connected to the Cerbo? Directly on a VE.Direct port?
Usually, by default, the VE.Direct ports used on Cerbo are mapped to ttyS5, ttyS6 and ttyS7.
How is your MPPT connected to the Cerbo? Directly on a VE.Direct port?
Yes. Directly to a VE. Direct port.
On the other two VE.Direct ports, there is a Phoenix inverter and a Smart Shunt.
Because the installation is remote and I don’t remember exactly to which VE.Direct is is connected, I tried them all and to see the different error messages, I am trying from ttyS3 - ttyS8.
(note that 0x010B = [string32] Model name - ASCIIZ representation of the model name )
vregd -c /dev/ttyS3 -g 0x010B 000.000 ERR.serial: could not open com-port 000.000 ERR.task: failed to open serial port!
vregd -c /dev/ttyS4 -g 0x010B # Error no response received!
vregd -c /dev/ttyS5 -g 0x010B # Error no response received!
vregd -c /dev/ttyS7 -g 0x010B # Error no response received!
vregd -c /dev/ttyS8 -g 0x010B 000.000 ERR.serial: could not open com-port 000.000 ERR.task: failed to open serial port!
So we know that somewhere between ttyS4 and ttyS7 it is connected, which is indeed what you say: “VE.Direct ports are connected on ttyS5, ttyS6 and ttyS7”.
However, only the Phoenix Inverter gives a response, not the SmartShunt or the SmartSolar MPPT 100/20. Is that normal behavior?
Even though I don’t have a BlueSolar but a SmartSolar MPPT 100/20 48V, the registers in the document you provide do work! In fact, I was using a wrong document.
For devices
Document
Link
VE.Direct with SmartSolar & BlueSolar:
VE.Direct Protocol - BlueSolar and SmartSolar MPPT chargers - Rev18