I have 4 PV inverters AC coupled on ACin that I’d like to include in the CerboGX ecosystem.
For several years these inverters are being measured by a single c.t. connected to an OEM emonCMS logger. The emonCMS publishes the total wattage using its MQTT broker on the same LAN as the Cerbo.
I’ve been unable to find any step-by-step instructions how to get the readings integrated into the Victron system.
Can someone get me started please.
Many thanks, David.
Moved to nodered, have a dig around here for virtual devices, particularly virtual PV inverters. You should find your way from there, all the required info is lurking here somewhere ![]()
Thank you Nick.
I’ve made some progress but being a NodeRed novice I’m pretty stumped with how to respond to the NodeRed error message given “Invalid payload type: string. Expected: JavaScript object with at least one property/value”.
Here’s my basic flow. The debug2 node shows the ACsolar wattage as a plain integer only. I can see the virtual device in the Cerbo Console, but the wattage values are not being received.
Is there a tutorial on how to link these two devices, and if so where can I find it?
[
{
"id": "475899af42e471e4",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "e354554183a5d226",
"type": "mqtt in",
"z": "475899af42e471e4",
"name": "",
"topic": "ACsolar",
"qos": "1",
"datatype": "utf8",
"broker": "25db1785a2718eb6",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 210,
"y": 140,
"wires": [
[
"bae42a4df8b41908",
"07be587c70c3aafa"
]
]
},
{
"id": "bae42a4df8b41908",
"type": "victron-virtual",
"z": "475899af42e471e4",
"name": "V_PVinverter",
"outputs": 1,
"device": "pvinverter",
"default_values": true,
"acload_nrofphases": 1,
"enable_s2support": false,
"battery_capacity": 25,
"include_battery_temperature": false,
"battery_voltage_preset": "24",
"battery_voltage_custom": 24,
"generator_type": "ac",
"generator_nrofphases": 1,
"include_engine_hours": false,
"include_starter_voltage": false,
"include_history_energy": false,
"grid_nrofphases": 1,
"include_motor_temp": false,
"include_controller_temp": false,
"include_coolant_temp": false,
"include_motor_rpm": true,
"include_motor_direction": true,
"position": 0,
"pvinverter_nrofphases": 1,
"switch_1_type": 1,
"switch_1_min": 0,
"switch_1_max": "",
"switch_1_initial": 0,
"switch_1_label": "",
"switch_1_unit": "",
"switch_1_step": 1,
"switch_1_customname": "",
"switch_1_group": "",
"switch_1_include_measurement": false,
"switch_1_rgb_color_wheel": false,
"switch_1_cct_wheel": false,
"switch_1_rgb_white_dimmer": false,
"fluid_type": 0,
"include_tank_battery": false,
"include_tank_temperature": false,
"tank_battery_voltage": 3.3,
"tank_capacity": 0.2,
"temperature_type": 2,
"include_humidity": false,
"include_pressure": false,
"include_temp_battery": false,
"temp_battery_voltage": 3.3,
"x": 430,
"y": 140,
"wires": [
[]
]
},
{
"id": "07be587c70c3aafa",
"type": "debug",
"z": "475899af42e471e4",
"name": "debug 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 360,
"y": 80,
"wires": []
},
{
"id": "25db1785a2718eb6",
"type": "mqtt-broker",
"name": "emonPi",
"broker": "192.168.178.46",
"port": 1883,
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": 60,
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "1d335695973ed724",
"type": "global-config",
"env": [],
"modules": {
"@victronenergy/node-red-contrib-victron": "1.6.64"
}
}
]
I’m afraid I couldn’t find any tutorials how to achieve the connection so I asked the Ecosia AI for some help and it was able to tell me that a function node is required between the emonCMS input and the Victron virtual Inverter output.
The AI transform code was too complicated for the emonCMS input which seems to be simply an integer number rather than a key:value pair. So I simplified the function to:
// Parse string payload from emonCMS
let data = msg.payload;
// Format for Victron Virtual PV Inverter
msg.payload = {
“/Ac/L1/Power”: parseFloat(data)
};
return msg;
I now see a PVinverter object in the Cerbo and VRM dashboards showing the current generation wattage.
Here is my current flow. Any suggestions for correction/improvement are very welcome.
[
{
"id": "e354554183a5d226",
"type": "mqtt in",
"z": "475899af42e471e4",
"name": "emonCMS.ACsolar",
"topic": "ACsolar",
"qos": "1",
"datatype": "utf8",
"broker": "25db1785a2718eb6",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 250,
"y": 140,
"wires": [
[
"07be587c70c3aafa",
"600b4c1a135e5201"
]
]
},
{
"id": "bae42a4df8b41908",
"type": "victron-virtual",
"z": "475899af42e471e4",
"name": "V_PVinverter",
"outputs": 1,
"device": "pvinverter",
"default_values": true,
"acload_nrofphases": 1,
"enable_s2support": false,
"battery_capacity": 25,
"include_battery_temperature": false,
"battery_voltage_preset": "24",
"battery_voltage_custom": 24,
"generator_type": "ac",
"generator_nrofphases": 1,
"include_engine_hours": false,
"include_starter_voltage": false,
"include_history_energy": false,
"grid_nrofphases": 1,
"include_motor_temp": false,
"include_controller_temp": false,
"include_coolant_temp": false,
"include_motor_rpm": true,
"include_motor_direction": true,
"position": 0,
"pvinverter_nrofphases": 1,
"switch_1_type": 1,
"switch_1_min": 0,
"switch_1_max": "",
"switch_1_initial": 0,
"switch_1_label": "",
"switch_1_unit": "",
"switch_1_step": 1,
"switch_1_customname": "",
"switch_1_group": "",
"switch_1_include_measurement": false,
"switch_1_rgb_color_wheel": false,
"switch_1_cct_wheel": false,
"switch_1_rgb_white_dimmer": false,
"fluid_type": 0,
"include_tank_battery": false,
"include_tank_temperature": false,
"tank_battery_voltage": 3.3,
"tank_capacity": 0.2,
"temperature_type": 2,
"include_humidity": false,
"include_pressure": false,
"include_temp_battery": false,
"temp_battery_voltage": 3.3,
"x": 790,
"y": 140,
"wires": [
[
"d7558f8477b271b0"
]
]
},
{
"id": "07be587c70c3aafa",
"type": "debug",
"z": "475899af42e471e4",
"name": "debug 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 360,
"y": 80,
"wires": []
},
{
"id": "600b4c1a135e5201",
"type": "function",
"z": "475899af42e471e4",
"name": "function 1",
"func": "// Parse string payload from emonCMS\nlet data = msg.payload;\n\n\n// Format for Victron Virtual PV Inverter\nmsg.payload = {\n \"/Ac/L1/Power\": parseFloat(data)\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 500,
"y": 140,
"wires": [
[
"bae42a4df8b41908",
"717647d7d603ad96"
]
]
},
{
"id": "d7558f8477b271b0",
"type": "debug",
"z": "475899af42e471e4",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": true,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 910,
"y": 80,
"wires": []
},
{
"id": "717647d7d603ad96",
"type": "debug",
"z": "475899af42e471e4",
"name": "debug 4",
"active": true,
"tosidebar": true,
"console": true,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 590,
"y": 80,
"wires": []
},
{
"id": "25db1785a2718eb6",
"type": "mqtt-broker",
"name": "emonPi",
"broker": "192.168.178.46",
"port": 1883,
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": 60,
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "9c165646c50ad123",
"type": "global-config",
"env": [],
"modules": {
"@victronenergy/node-red-contrib-victron": "1.6.64"
}
}
]

