Hi all,
I would like to automate an Shelly 1PM Gen3 switch based on data from my Victron PV system (Quattro with Color Control GX), e.g., using the battery SoC and PV surplus. I am considering three approaches and would appreciate any guidance or feedback (since they might well be flawed):
Option 1: Purely Local – Modbus TCP
- Use Modbus TCP to read battery SoC and PV power directly from the CCGX.
- My Shelly should support Modbus TCP, so it should be able to directly read the registers from the Victron device and switch the heating based on defined thresholds (e.g., SoC > 80% or PV surplus > 1000W) programmed with simple rules in the Shelly.
- This would work locally without internet and even if VRM is down.
- However, it seems Modbus TCP settings can only be configured when I’m on the local network (which I am currently not) — remote access through Shelly Cloud doesn’t seem to expose these settings. That would make the system harder to maintain.
Option 2: Cloud-Based – MQTT
- The second option could be to use MQTT to communicate with the Shelly.
- This would work remotely over the internet, but I would need to run an MQTT broker on a Raspi or a home server, to run the automation rules
Option 3: Local or Cloud-Based – Node-RED
- Another option is to use Node-RED to pull data from Victron (via Modbus TCP or MQTT) and control the Shelly using its HTTP API.
- I believe Node-RED can be run locally (e.g. Raspi or NAS) or in the cloud (e.g., on a VPS).
- This could combine some benefits of Modbus and MQTT while allowing more flexible automation logic, at the price of an extra layer of complexity, and dependency on Node-RED.
Questions:
- Has anyone successfully set up direct Modbus TCP automation between a Victron and Shelly? (Note I am interested in passing information from Victron to Shelly - I have already seen solutions in this forum that address the opposite direction using the Shelly’s outbound websocket.)
- Any best practices?
My preference would be for a simple solution, avoiding programming and maintenance.
If option 1 works, it could be a simple stable setup, not requiring me to update servers etc.
Thanks for any insights!
Bernhard