article

daba avatar image
daba posted

How to controll Soyo GTI from Multiplus GX

I implemented the control of a Soyo GTI via Multiplus GX.

The Multiplus gets grid consumption via EM24 grid meter thus he can control another battery inverter.

A node red node calculates an sends commands to the Soyo inverter to set power setpoint via RS485.

The RS485 link was implemented via FTDI converter, which was programmed to be ID_MODEL="SOYO" via FTProg.

Then this:

ACTION=="add", ENV{ID_BUS}=="usb", ENV{ID_MODEL}=="SOYO", ENV{VE_SERVICE}="ignore"

was added to the /etc/udev/rules.d/serial-starter.rules file.

The node-red-node-serialport was used for communication on tty/USBx port.

The function used for transmitting according to SOYO protocoll, ist like:

[
{
"id": "3ce8390c2e58649f",
"type": "function",
"z": "859318d230bf3b3e",
"name": "Calculate 485 string",
"func": "var string = [];\nvar PwrCtrlSoyo =msg.payload;\nvar byte5 = 0x00;\nvar byte6 = 0x00;\nvar byte8 = 0x00;\nvar upper;\nvar lower;\n\nconst byte1 = 0x24;\nconst byte2 = 0x56;\nconst byte3 = 0x00;\nconst byte4 = 0x21;\nconst byte7 = 0x80;\n\n\nbyte5 = ((PwrCtrlSoyo >> 8)&0xFF);\nbyte6 = (PwrCtrlSoyo & 0x00FF);\n\n\nupper = PwrCtrlSoyo >> 8;\nlower = PwrCtrlSoyo & 0xFF;\nbyte8 = ((264 - upper - lower)&0xFF);\n\nstring[0]=byte1; \nstring[1]=byte2; \nstring[2]=byte3;\nstring[3]=byte4; \nstring[4]=byte5; \nstring[5]=byte6;\nstring[6]=byte7; \nstring[7]=byte8;\n\n\nmsg.payload = string;\n\nmsg.arraylength = string.length;\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 160,
"y": 380,
"wires": [
[
"5362c44a7b111fd6"
]
]
}
]

regards.

Node-RED
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.

gjones84 avatar image gjones84 commented ·

Hi,


I am trying to do the same thing.

Just as a test im injection 100 and -100 and getting these responses. Wondering if I have it configured correctly?

1692516802945.png



1692516697739.png



0 Likes 0 ·
1692516697739.png (103.5 KiB)
1692516802945.png (99.7 KiB)

Article

Contributors

daba contributed to this article