Skip to main content

Hoymiles (OpenDTU) smart home integration, free and open source

Hoymiles (OpenDTU) integration for Gladys Assistant

Unofficial connector: Hoymiles micro-inverters through OpenDTU, solar production, power limit.

Unofficial connector, not affiliated with Hoymiles nor with the OpenDTU project. It brings your Hoymiles micro-inverters into Gladys through OpenDTU, the open-source gateway (an ESP32 with an NRF24 or CMT2300A radio module) that talks to the inverters. Everything stays on your local network: no cloud, no account. Hoymiles is a trademark of Hoymiles Power Electronics Inc.

What you need​

  • An OpenDTU that already shows your inverters in its own web interface (HM, HMS and HMT series). AhoyDTU, the other open firmware, is not supported yet.
  • Its IP address on your network. Give it a fixed address in your router (DHCP reservation) so it does not move.
  • Optional: the OpenDTU admin password (the one of its web interface, user admin), to change the power limit and turn an inverter on or off.

What you get​

SurfaceContent
One device per invertersolar power (W), the power of each panel named as in OpenDTU, the energy of the day (kWh), the lifetime energy (kWh) for the energy monitoring, grid voltage and frequency, inverter temperature, efficiency, power limit, on/off
Scene triggersproduction started (morning), production stopped (evening, with the energy of the day), inverter alarm (grid overvoltage, over temperature…)
Scene actionsset the power limit (watts or percent), solar production (power, energy of the day and lifetime, of one inverter or all of them)
Dashboard widgetSolar production: power now, today, lifetime, each panel, the limit, and whether the inverter sleeps

Setup​

  1. Install the integration and type the OpenDTU address (for example 192.168.1.50). Its OpenDTU-xxxxxx name only works if your router's DNS knows it: the integration runs in a container that does not see the mDNS names of the network.
  2. Optional: type the admin password. Without it the integration only reads. If you turned off "Allow read-only access" in OpenDTU (Settings → Security), the password is needed to read as well.
  3. Press Test OpenDTU: it lists your inverters and checks the password.
  4. Open Discovery and add your inverters. Put the Solar production widget on a dashboard.

OpenDTU is read every 15 seconds (option Refresh interval, 5 seconds at least: OpenDTU itself polls the inverters every 5 seconds).

The night is not an error​

A micro-inverter is powered by its panels: without sun it switches off and OpenDTU no longer reaches it. The integration then shows a power of 0 W, keeps the energy indexes, marks the inverter "sleeping (night)" and reads OpenDTU once a minute until an inverter wakes up. The status of the integration stays green. After midnight, the energy of the day reads 0 until the inverter wakes up.

Energy monitoring​

The lifetime energy feature is a production index: Gladys turns it into a 30-minute production (the "Lifetime energy (30-minute production)" feature, which Gladys fills itself) for its energy screens. The index never goes back: if OpenDTU restarts and has not read the inverter yet, the integration waits for the real value.

Power limit and on/off​

The limit is temporary (non-persistent): the inverter forgets it when it restarts, at the latest the next morning. A persistent limit is never sent, because it is written to the inverter's memory, which wears out. Use the slider of the device, a scene, or the set the power limit action (in watts or in percent of the maximum power). Both commands need the admin password and an inverter that is awake: at night OpenDTU cannot reach it and would drop the command. Turning an inverter off stops its production until you turn it back on.

Scenes​

  • Production started: the inverter has produced for 5 minutes after a pause. The flicker of dawn fires nothing: once a day as a rule.
  • Production stopped: no production for 15 minutes. {{triggerEvent.data.energy_today}} holds the energy of the day, for an evening summary.
  • Inverter alarm: a new entry in the inverter's event log, with {{triggerEvent.data.alarm}} (the message in English) and {{triggerEvent.data.code}}. The daily entries (start, "no input" at dusk) are left out.

Leave the inverter empty to react to any of them. The solar production action gives power, energy_today, energy_total, producing and sleeping for a message or a condition. The following actions of the scene find them in their variable list (written {{<step>.<action>.<key>}}, for instance {{0.0.power}} when this action is the first of the scene).

Troubleshooting​

  • "OpenDTU does not answer": check the address in a browser on the same network; the Gladys host must be able to reach it (same LAN or a route).
  • "OpenDTU refused the access": "Allow read-only access" is off in OpenDTU and the password is missing or wrong.
  • A panel is missing: the inverter was added while OpenDTU could not give its inputs; open Discovery again and press Update on the device.
  • A command fails with "sleeping": try again while the inverter produces.
  • Logs: the integration's log level is set with the LOG_LEVEL variable.

Privacy​

The integration talks to your OpenDTU only, on your local network. The password is sent to OpenDTU and nowhere else; it is never logged.

Configuration settings​

These are the settings Hoymiles (OpenDTU) asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Hoymiles through OpenDTUsectionNoUnofficial connector, not affiliated with Hoymiles nor with the OpenDTU project. It reads OpenDTU, the open-source gateway (an ESP32 with an NRF24 or CMT2300A radio) that talks to Hoymiles micro-inverters, on your local network, no cloud: one device per inverter with its power, the power of each panel, the energy of the day and a lifetime index for the energy monitoring, the temperature, the power limit and an on/off switch. At night the inverters sleep: the power reads 0, that is not an error. Scene triggers when production starts or stops and on an inverter alarm, and a dashboard widget. AhoyDTU is not supported.
OpenDTU addressstringYesThe IP address of OpenDTU on your network (a fixed DHCP lease helps), optionally with a port. Its "OpenDTU-xxxxxx" name only works if your DNS knows it: the integration runs in a container that does not see mDNS.
OpenDTU admin passwordsecretNoThe password of the OpenDTU web interface (user "admin"). Needed to change the power limit and to turn an inverter on or off, and to read when "Allow read-only access" is off in OpenDTU. Leave empty to only read. Sent to OpenDTU only, stored encrypted by Gladys.
Refresh interval (s)numberNoHow often OpenDTU is read during the day. OpenDTU itself polls the inverters every 5 s at best; at night (every inverter asleep) the integration reads it once a minute.

How to install Hoymiles (OpenDTU) in Gladys​

  1. In Gladys, open Integrations: Hoymiles (OpenDTU) appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/lm1lc3n7/gladys-hoymiles:0.1.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/LM1LC3N7/gladys-hoymiles.

Hoymiles (OpenDTU) requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Hoymiles (OpenDTU) is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by LM1LC3N7, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂