HEX commands for Phoenix12/500 inverter

I wish to turn on and off my Phoenix inverter and in this installation I am not using Venus OS.

I have an RPi4 running Node-Red which is connected to the inverter via a Victron ve.direct cable.

Does any one have or can give me guidance on the HEX commands required and how they have sent them using Node-Red.

Am I right in thinking that HEX is the only way to control the inverter when not using Venus OS and not using a relay on the remote connector.

Thanks

Yes and the doc needed for study is this: https://www.victronenergy.com/upload/documents/VE.Direct-HEX-Protocol-Phoenix-Inverter.pdf

Thanks for that. I have read it already but need an example in Node-Red as I can’t get my head around the bytes and the NR node to use.

More help would be appreciated.

Which OS runs on that RPi4?

RPi4 64 bit OS Lite (headless). I’ve used Venus OS large for years but decided to revert to regular RPi as I would prefer to use influxdb and Grafana as this is a mobile setup and I only ever want to look at yesterday. Having dropped Venus OS and needing to control the inverter which runs my 3-way fridge controlled by SoC I need to send ON anf OFF commands to the inverter.

OK then.
That VE.Direct interface is connected to an USB port, but exposes a serial interface, right?
All you need to do is to send the HEX commands to that serial port and receive the answers.

Thanks for your patients.

For test purposes I am using an inject node connected to a VE.Direct USB Node, is the format for the data correct [“:451\n”] this should get the PID i believe, in my case I get nothing other than the normal ve.direct stream.

From the HEX-Protocol or the internet I don’t see (or understand) an example of sending ON or OFF to the inverter. Guidance / example would be appreciated.

Didn’t play with Node-Red.

Your payload above I suppose is binary from those 01/10 in front …
As the HEX protocol is a text protocol, you should send the ASCII representation of the command, all digits being in uppercase. And don’t forget the CRC.

You can play initially with the Linux built-in terminal/console application and send to that serial port where the USB to VE.Direct interface is the HEX commands.
Once all is OK and working, you worry about Node-RED. :slight_smile:

1 Like

To answer my own question, in a very basic way, here is what I’ve learnt as I can now send my Phoenix 12/500 into ON, ECO and OFF modes from Node-Red. The HEX codes can be gained from the VE.Direct-HEX-Protocol, this took me a little while to prove as I wasn’t sure if I had calculated the commands correctly or that the method I was trying to send from NR was correct. I did find a python script that allowed me to test each command.

To send a command it starts :8 follwed by the register, the flags the operation you want to send and the checksum. All bytes are sent lowest byte first. So to turn ON the inverter :800020002004900 the colon is the start identifier, 8 is to SET the register 0200, the flags are 00, 0002 is the Inverter ON command and 0049 is the checksum. To get the checksum add in HEX, 8 + 2 + 2 = C, subtract this from from 55 = 49, the checksum.

To send commands from NR place your code:

//OFF :800020004004700\n ECO :800020005004600\n
msg.payload = Buffer.from(“:800020002004900\n”);
return msg;

into a Function Node, the output goes to a Serial Node with a baud of 19200. I set the serial port like this /dev/serial/by-id/usb-VictronEnergy_BV_VE_Direct_cable_VE4PIC7J-if00-port0 which can be found in Linux using the terminal command ls /dev/serial/by-id/*

I did not require the :7 GET command as once the HEX command has been sent the VE.Direct returns to spitting out all data as normal which can be read easily.

Thanks to @alexpescaru for his thoughts.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.