This plugin enables Home Assistant to automatically discover all values published by the "Deye Solar Inverter MQTT Bridge".
Energy usage diagram provided by Home Assistant filled with data from a "Deye solar inverter MQTT bridge":
This integration can read and update the active power regulation feature's value if it's enabled. However, reading and updating the "time of use" (ToU) configuration has not been implemented yet.
-
Install Deye solar inverter MQTT bridge
-
Expand the Deye Solar Inverter MQTT Bridge configuration file
config.env
with a customized version of this section:# Home Assistant Integration # ========================== PLUGINS_ENABLED=deye_plugin_ha_discovery DEYE_HA_PLUGIN_HA_MQTT_PREFIX=homeassistant DEYE_HA_PLUGIN_INVERTER_MANUFACTURER=<your manufacturer> DEYE_HA_PLUGIN_INVERTER_MODEL=<your inverter> # Topics not published to HA # Use : as separator, supports Unix shell-style wildcards *, ?, [seq] and # [!seq] as implemented with Python fnmatch, DEYE_HA_PLUGIN_IGNORE_TOPIC_PATTERNS=uptime:*/pv[234]/*
-
Install the plugin from
plugins
directory as described in "How to start the docker container with custom plugins" and restart container to activate the changes inconfig.env
. -
Switch to the Home Assistant and install Utility Meter
-
Configure a Utility Meter helper to reset the daily production counter at midnight.
# Example configuration.yaml entry utility_meter: energy: name: "Production total (daily reset)" source: sensor.deye_inverter_mqtt_production_total cycle: daily
or graphically
- Deye solar inverter MQTT bridge version 2024.11.1 or newer
-
Ensure that the container
deye-mqtt
has the required minimum version -
Check if the plugin has been loaded.
docker logs deye-mqtt
When starting the container after loading this plugin, a message similar to the following line should appear in the container log.
DeyePluginLoader - INFO - Loading plugin: 'deye_plugin_ha_discovery'
If this line does not appear, you should check the installation of the plugin.
-
Check log of the
deye-mqtt
container for errors.On demand increase the detail of the logging in
config.env
toLOG_LEVEL=DEBUG
and restart the container. -
Checking the content published in the MQTT broker. You can use a graphical tool such as the MQTT Explorer for this.
- Add support for active power regulation
- Internal code changes
- Use new public API to create MQTT topic (requires Deye solar inverter MQTT bridge at least version 2024.11.1)
- Add device classes for total_energy_bought and daily_energy_sold
- Fix wrong unit for uptime sensor
- README extended
- All energy topics uses state class "total_increasing" now
- Add more MQTT topics
- first release
Check the project issue tracker for current open bugs. New bugs can be reported there also.
This project is licensed under the Apache 2.0 license.
Copyright (c) 2024 Carsten Grohmann, mail <add at here> carstengrohmann.de
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Enjoy!
Carsten Grohmann