Automating ModbusTCP and Static IP Configuration on Victron from ESP32 + W5500

Hello Victron Community,

I am working on integrating an ESP32 module with a W5500 Ethernet interface to communicate with a Victron system using ModbusTCP. So far, I have successfully read the Modbus map and retrieved data from the system.

However, before I can communicate via ModbusTCP, I first need to manually configure the ModbusTCP service and set a static IP address by connecting an Ethernet cable to my laptop and accessing the settings via venus.local.

I would like to automate this process so that my ESP32 can:

  1. Enable the ModbusTCP service on the Victron system.
  2. Set a static IP address dynamically from the ESP32.

From my research, I see that Venus OS exposes a WebSocket API, but implementing WebSockets on the ESP32 is quite complex.

Questions:

  1. Is there any API or simpler method to configure ModbusTCP and network settings directly from the ESP32?
  2. Can this be done via HTTP, MQTT, or any other protocol that the Venus OS supports?
  3. Has anyone successfully implemented WebSockets on ESP32 to configure Victron settings? If so, do you have any guidance or examples?

My goal is to seamlessly plug my ESP32 + W5500 module, directly connecting throgh eth port into the Victron system without requiring manual configuration via the web interface.

Any help or pointers would be greatly appreciated! Thanks in advance. :blush:

1 Like