Best approach for MQTT lights in Venus OS switch pane — dbus-switch or alternative?

Hi everyone,

I’m developing a lightweight Python driver (dbus-mqtt-switch) that exposes MQTT-controlled lights from an ESP32 (ESPHome) in the Venus OS GUI v2 switch pane. It runs on a Cerbo GX MK1 (v3.72) — no Node-RED, as the Cerbo is already running Signal K and we want to keep the CPU load minimal.

The driver registers as com.victronenergy.switch and currently supports 5 switch types: toggle (1), dimmable (2), RGB (11), CCT (12), and RGBW (13). The ESP32 publishes light state via MQTT, the driver bridges it to dbus, and Venus OS discovers it in the switch pane. Bidirectional control works — color wheel, dimming slider, on/off all functional from the Cerbo GUI.

The issue: “Module state: Running”

Every com.victronenergy.switch device shows a “Module state” row in Settings → Devices, reading from the root /State path. The only “healthy” value is 0x100, which the GUI renders as “Running”.

For industrial switches and breakers, “Running” makes sense. But for lights, it’s confusing — users think the light is ON when it might be OFF.

Meanwhile, GX internal relays show a much cleaner display: just Off | Toggle > without any “Module state” row. But those use a different code path (com.victronenergy.system), not com.victronenergy.switch.

My questions:

  1. Is com.victronenergy.switch the correct service type for MQTT-controlled lights? Or does something like com.victronenergy.light exist that would render more appropriately?

  2. Would it be possible in a future Venus OS release to either:

    • Show “Connected” instead of “Running” — less confusing for non-industrial devices

    • Or allow the “Module state” row to hide when /State is not registered (like “Module Voltage” already does with preferredVisible)

  3. Ideally, the device page could show the actual light state (Off/On, dimming %, color) instead of “Module state” — similar to how temperature sensors show 25°C or batteries show 100% | 13.3V. Is there a recommended path structure for this?

The driver is based on mr-manuel’s dbus-mqtt pattern and plans to be open-sourced on GitHub once stable.

Thanks for any guidance!

1 Like

Following as I’d love to see my esphome switches in Venus.

Well its working now, read the Gide here:

you need to add mqtt on the ESPHome code, easy, and set this up on the Venus OS.

I have it working now and works perfectly

1 Like

The relevant part and examples for yaml esphome is here:

D-Bus switch.