Shelly Plus 1PM is in the device list, but I can’t select it as a PV inverter

Hello,

I previously integrated a Shelly into Victron using a script.

Unfortunately, the display occasionally disappears, meaning that the Shelly is no longer visualised. The only thing that helps then is restarting all Victron components.

That’s too unprofessional for me. Victron has now enabled the option to integrate Shellys directly without a script.

I’ve now used this option. In the Shelly Cloud, I connected the Shelly directly to Victron via an outgoing WebSocket.

The Victron now also appears in the device list, but I can’t set it as an inverter or energy meter; I can only set it as an AC load. Unfortunately, it doesn’t appear in the overview or under the PV inverters either. However, the device list does show the PV output. How can I visualise it as a PV inverter without using a script?

Has anyone had any experience with this?

Thanks

Yes, but only with Node-RED can you install the Shelly as a virtual PV inverter.

Here is my flow for a Shelly 1PMGen3 on the BKW inverter. Note that, in my case, the energy yield is not output as a cumulative meter reading since the Shelly was set up, but rather as the daily yield.

[
    {
        "id": "9b8d5eacacb78531",
        "type": "tab",
        "label": "TomsBKW",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "c16a0bfd8dee5cea",
        "type": "victron-virtual",
        "z": "9b8d5eacacb78531",
        "name": "TomsBKW",
        "outputs": 1,
        "device": "pvinverter",
        "default_values": true,
        "battery_capacity": 25,
        "include_battery_temperature": 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": "1",
        "pvinverter_nrofphases": 1,
        "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": 120,
        "y": 60,
        "wires": [
            []
        ]
    },
    {
        "id": "35275ec1f27f2af7",
        "type": "victron-output-custom",
        "z": "9b8d5eacacb78531",
        "service": "com.victronenergy.pvinverter/101",
        "path": "/Ac/L1/Power",
        "serviceObj": {
            "service": "com.victronenergy.pvinverter/101",
            "name": "TomsBKW (101)"
        },
        "pathObj": {
            "path": "/Ac/L1/Power",
            "name": "/Ac/L1/Power",
            "type": "number",
            "value": 11.3
        },
        "name": "",
        "onlyChanges": false,
        "outputs": 0,
        "x": 790,
        "y": 360,
        "wires": []
    },
    {
        "id": "6a8d240e49b53320",
        "type": "inject",
        "z": "9b8d5eacacb78531",
        "name": "permanent",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "2",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 150,
        "y": 240,
        "wires": [
            [
                "042cf6a11932a8be"
            ]
        ]
    },
    {
        "id": "ce2636d2240cf373",
        "type": "victron-output-custom",
        "z": "9b8d5eacacb78531",
        "service": "com.victronenergy.pvinverter/101",
        "path": "/Ac/L1/Voltage",
        "serviceObj": {
            "service": "com.victronenergy.pvinverter/101",
            "name": "TomsBKW (101)"
        },
        "pathObj": {
            "path": "/Ac/L1/Voltage",
            "name": "/Ac/L1/Voltage",
            "type": "number",
            "value": 0
        },
        "name": "",
        "onlyChanges": false,
        "outputs": 0,
        "x": 800,
        "y": 240,
        "wires": []
    },
    {
        "id": "a7bfe9166a69cb9e",
        "type": "victron-output-custom",
        "z": "9b8d5eacacb78531",
        "service": "com.victronenergy.pvinverter/101",
        "path": "/Ac/L1/Current",
        "serviceObj": {
            "service": "com.victronenergy.pvinverter/101",
            "name": "TomsBKW (101)"
        },
        "pathObj": {
            "path": "/Ac/L1/Current",
            "name": "/Ac/L1/Current",
            "type": "number",
            "value": 0
        },
        "name": "",
        "onlyChanges": false,
        "outputs": 0,
        "x": 800,
        "y": 300,
        "wires": []
    },
    {
        "id": "6a9257942e76f89f",
        "type": "victron-output-custom",
        "z": "9b8d5eacacb78531",
        "service": "com.victronenergy.pvinverter/101",
        "path": "/Ac/Power",
        "serviceObj": {
            "service": "com.victronenergy.pvinverter/101",
            "name": "TomsBKW (101)"
        },
        "pathObj": {
            "path": "/Ac/Power",
            "name": "/Ac/Power",
            "type": "number",
            "value": 0
        },
        "name": "",
        "onlyChanges": false,
        "outputs": 0,
        "x": 780,
        "y": 420,
        "wires": []
    },
    {
        "id": "e5b35642815ff4c2",
        "type": "victron-output-custom",
        "z": "9b8d5eacacb78531",
        "service": "com.victronenergy.pvinverter/101",
        "path": "/Ac/Energy/Forward",
        "serviceObj": {
            "service": "com.victronenergy.pvinverter/101",
            "name": "TomsBKW (101)"
        },
        "pathObj": {
            "path": "/Ac/Energy/Forward",
            "name": "/Ac/Energy/Forward",
            "type": "number",
            "value": 0.025317999999999303
        },
        "name": "",
        "onlyChanges": false,
        "outputs": 0,
        "conditionalMode": false,
        "outputTrue": "",
        "outputFalse": "",
        "debounce": "",
        "x": 810,
        "y": 480,
        "wires": []
    },
    {
        "id": "b53fdec136fc0d9b",
        "type": "inject",
        "z": "9b8d5eacacb78531",
        "name": "atMidNight",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "01 00 * * *",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 150,
        "y": 160,
        "wires": [
            [
                "712dd5e3c5be2f7a"
            ]
        ]
    },
    {
        "id": "905529d86a6c8c30",
        "type": "change",
        "z": "9b8d5eacacb78531",
        "name": "EnergyMidNight",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload.switch0.aenergy.total",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 480,
        "y": 160,
        "wires": [
            [
                "9ab0ab5738569f61"
            ]
        ]
    },
    {
        "id": "9ab0ab5738569f61",
        "type": "change",
        "z": "9b8d5eacacb78531",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "dailystart",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 670,
        "y": 160,
        "wires": [
            []
        ]
    },
    {
        "id": "042cf6a11932a8be",
        "type": "shelly-gen2",
        "z": "9b8d5eacacb78531",
        "hostname": "192.168.1.98",
        "description": "TomsBKW",
        "mode": "polling",
        "verbose": false,
        "server": "",
        "outputmode": "event",
        "uploadretryinterval": 5000,
        "pollinginterval": 5000,
        "pollstatus": false,
        "getstatusoncommand": true,
        "devicetype": "S3SW-001P16EU",
        "devicetypemustmatchexactly": true,
        "captureblutooth": false,
        "outputs": 1,
        "x": 310,
        "y": 240,
        "wires": [
            [
                "5132accc2b308517"
            ]
        ]
    },
    {
        "id": "712dd5e3c5be2f7a",
        "type": "shelly-gen2",
        "z": "9b8d5eacacb78531",
        "hostname": "192.168.1.98",
        "description": "TomsBKW",
        "mode": "polling",
        "verbose": false,
        "server": "",
        "outputmode": "event",
        "uploadretryinterval": 5000,
        "pollinginterval": 5000,
        "pollstatus": false,
        "getstatusoncommand": true,
        "devicetype": "S3SW-001P16EU",
        "devicetypemustmatchexactly": true,
        "captureblutooth": false,
        "outputs": 1,
        "x": 310,
        "y": 160,
        "wires": [
            [
                "905529d86a6c8c30"
            ]
        ]
    },
    {
        "id": "5132accc2b308517",
        "type": "function",
        "z": "9b8d5eacacb78531",
        "name": "Split BKW data",
        "func": "let voltage = msg.payload.switch0.voltage;\nlet current = msg.payload.switch0.current;\nlet power = Math.abs(msg.payload.switch0.apower);\nlet energy = msg.payload.switch0.aenergy.total;\n\nlet startvalue = flow.get('dailystart') || 0;\nenergy = (energy - startvalue) / 1000.0;\n\nglobal.set ('pv_inverter', power);\n\nreturn [\n    {payload: voltage},\n    {payload: current},\n    {payload: power},\n    {payload: energy}\n];",
        "outputs": 4,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 320,
        "y": 400,
        "wires": [
            [
                "9553977e9932e6f1"
            ],
            [
                "a0d07accd66352e6"
            ],
            [
                "83bd7b882b32efca"
            ],
            [
                "677c58173e46c816"
            ]
        ]
    },
    {
        "id": "677c58173e46c816",
        "type": "rbe",
        "z": "9b8d5eacacb78531",
        "name": "",
        "func": "deadband",
        "gap": "0.001",
        "start": "",
        "inout": "out",
        "septopics": false,
        "property": "payload",
        "topi": "topic",
        "x": 560,
        "y": 480,
        "wires": [
            [
                "e5b35642815ff4c2"
            ]
        ]
    },
    {
        "id": "83bd7b882b32efca",
        "type": "rbe",
        "z": "9b8d5eacacb78531",
        "name": "",
        "func": "deadband",
        "gap": "1",
        "start": "",
        "inout": "out",
        "septopics": false,
        "property": "payload",
        "topi": "topic",
        "x": 560,
        "y": 360,
        "wires": [
            [
                "6a9257942e76f89f",
                "35275ec1f27f2af7"
            ]
        ]
    },
    {
        "id": "a0d07accd66352e6",
        "type": "rbe",
        "z": "9b8d5eacacb78531",
        "name": "",
        "func": "deadband",
        "gap": "0.1",
        "start": "",
        "inout": "out",
        "septopics": false,
        "property": "payload",
        "topi": "topic",
        "x": 560,
        "y": 300,
        "wires": [
            [
                "a7bfe9166a69cb9e"
            ]
        ]
    },
    {
        "id": "9553977e9932e6f1",
        "type": "rbe",
        "z": "9b8d5eacacb78531",
        "name": "",
        "func": "deadband",
        "gap": "1",
        "start": "",
        "inout": "out",
        "septopics": false,
        "property": "payload",
        "topi": "topic",
        "x": 560,
        "y": 240,
        "wires": [
            [
                "ce2636d2240cf373"
            ]
        ]
    },
    {
        "id": "7ae32ab0decc5a72",
        "type": "global-config",
        "env": [],
        "modules": {
            "@victronenergy/node-red-contrib-victron": "1.6.63",
            "node-red-contrib-shelly": "11.7.5"
        }
    }
]

Until recently, I also had an “old” Shelly Plus 1 PM (Gen2) integrated using a Halmand script. “Suddenly”—a little over a week ago—the script simply stopped at midday. The power reading just stayed at, say, 200 W. Restarting it fixed the problem temporarily, but in fact it only worked when the power was well below 200 W. Very strange behaviour, in other words. I reinstalled the script and so on, but nothing seemed to help, even though the values in the Shelly app were always displayed correctly and up to date.

So I also wanted to use the Victron support for Shelly that has since become available, even though I knew that Gen2 wasn’t actually supported.

But lo and behold, the Shelly was detected—but only as an AC load, just as you describe… I then got myself a Shelly Gen4 because I assumed the problem was due to the old Shelly hardware… Unfortunately not; here too, it could only be configured as an AC load.

So I’ve now switched to Node-RED as well, and lo and behold, it works without any problems and also as a PV inverter.

@TomBerger

Am I understanding your script correctly that you restart the flow shown every day at midnight? If so, why?

I’ve already answered that:

So nothing is restarted; instead, the Shelly’s counter reading is saved in a flow variable at midnight. When the energy yield is calculated, it doesn’t display the uninteresting counter reading, but the daily yield — that is, the current counter reading minus the midnight counter reading. That is then displayed:

There are quite a few posts on this forum about how to integrate a Shelly into a virtual device.

Just search for it yourself :wink:

Hi,

Yes, thanks for the info.

I thought Victron had managed to make it work without Node-RED.

In that case, I’ll use Node-RED again. Thanks for the idea for the script.

Hi,

I have a Shelly PRO EM 50 to measure my balcony power station and would like to integrate it as a PV inverter.
I set up the WebSocket connection and then the Shelly also appeared as a device in Venus OS. I can configure it as a PV inverter, but unfortunately it doesn’t display any readings. Has anyone found a solution to this? Or is it simply not supported yet?

Thanks and best regards

Hi, I think my post is probably the wrong place for this :wink:

Try searching for Shelly integration — there are already plenty of solutions out there. But you can’t really avoid doing some programming.

Hello everyone, I’d like to continue the discussion here.

I’ve just put a Shelly Pro 1PM with a balcony solar system into operation as well.
After implementing three ESS systems (2×3-phase, 1×1-phase), I’d describe my current level of knowledge of the Victron ecosystem as quite solid.

I’m now facing the same problem: I can only configure the Shelly as an AC load.
However, the documentation says that this is possible:
“Configure the following in the settings:
Function – Select how the energy meter is used in the system:

  • AC output
  • PV inverter
  • Generator”

HOWEVER, under features it says:
“Using a dedicated EM (one without switching capabilities) with one of the following roles: Genset, AC load or PV Inverter. Note that the Grid role is not supported.”
Does this mean that only the “Shelly Pro 3EM (3 phase EM only)” can be used as a PV meter?
What’s the point of excluding all devices with relays here?

Without knowing for certain… presumably, a negative current flow isn’t supported by the Plug devices. The EM is connected with the current transformer terminals in the positive direction, which isn’t possible with the Plug devices.

The Pro 1PM comes with DIN-rail mounting. Here, an import with a negative sign is shown, so it is fundamentally detected correctly.
The Plug S devices also work with a “negative” current direction, insofar as that can be said for AC.

However, the option to set it as a PV meter in the setup menu is missing.

As far as I can remember off the top of my head, you can enter the Shelly’s IP address in a browser and it will bring up a configuration page. This is different from the app, and I was able to invert the measurement direction there.