Qilowatt integration for Home Assistant
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗This guide provides a comprehensive walkthrough for installing, configuring, and using the Qilowatt Home Assistant integration. It is designed for users who want to connect their Home Assistant-controlled energy system to the Qilowatt platform for services like the mFRR balancing market, without using a physical Qilowatt hardware device.
This document is a community effort, based on the collective knowledge and best practices shared within the official Qilowatt Discord channels.
Before you begin, ensure you have the following:
The qilowatt-ha integration relies on existing HA integrations to discover and read data from your inverter. Supported integrations include:
The integration communicates with Qilowatt's servers via MQTT. You will need unique credentials for this.
app. subdomain, not the Qilowatt e-shop.app.qilowatt.it.Integrations, click the three dots in the top-right corner, and select Custom repositories.https://github.com/qilowatt/qilowatt-haIntegration and click Add.Settings > Devices & Services and click Add Integration.This step is essential. If you skip it, the sensors in Home Assistant will remain in an "Unknown" state.
Hardware Type to MQTT.00:00 to 23:59 with the mode set to Normal. Save and activate it.After a few minutes, your Qilowatt sensors in Home Assistant should start showing data.
The Qilowatt integration does not directly control your inverter. It provides a set of sensors that reflect the commands sent by Qilowatt. You must create your own automations in Home Assistant to act on these sensor changes.
sensor.qw_mode: The current command (normal, buy, sell, frrup, etc.).sensor.qw_source: The origin of the command (timer, fusebox, optimizer).sensor.qw_powerlimit: The target power in Watts (always a positive value).binary_sensor.qw_connected: Shows the status of the MQTT connection to Qilowatt. Use this to build failsafe automations (e.g., revert to a safe mode if the connection is lost).Sending multiple commands to an inverter in quick succession can cause some to be missed. The community has developed a robust pattern using HA helpers to ensure reliability.
The Logic:
helpers: For each inverter setting you need to control (work mode, charge current, etc.), create a corresponding helper in HA (e.g., input_select.deye_desired_work_mode, input_number.deye_desired_charge_current).qw_mode changes should only modify the state of these helpers, not the inverter directly.This pattern ensures that commands are persistent and will be re-sent until the inverter correctly reports the desired state.
Complete worked example (Deye): examples/deye-workmode-control/ contains a full, production-tested implementation of this pattern — helpers, mode-dispatch automation covering every WORKMODE mode, the desired-state reconciler, and a connection-lost failsafe. Start there and replace the entity IDs with your own.
Older community examples (replace entity IDs with your own):
Use the following information from the official README to build your automation logic.
normal: Self-use mode. PV powers the load and charges the battery. The battery is used if PV is insufficient. Excess PV is exported to the grid if the battery is full.savebattery: PV powers the load and can charge the battery, but the battery will not discharge. The grid is used if PV is insufficient.pvsell: PV powers the load, and all excess is exported to the grid. The battery is not used.sell: Both PV and the Battery are used to power the load and export to the grid. In this mode set battery max discharge current in accordance to PowerLimit.frrup: In this mode you need to set your grid max sell power to PowerLimit and battery output power to max.frrdown: In this mode you need to take energy from grid set by PowerLimit. For Deye, use Grid Peak Shaving for this. Set max battery and grid charge currents to max.buy: Grid and PV are used to charge the battery and power the load. In this mode set battery max charge and grid charge currents in accordance to PowerLimit.limitexport: Limits export to the grid, even if the battery is full (useful for negative NPS prices).nobattery: Disables battery usage completely.kratt / fusebox: A command from the mFRR market. These commands are mandatory and have the highest priority.Q: A command generated by Qilowatt optimizing the battery SOC for better FRR market participation opportunitiesmanual: A command triggered manually from the Qilowatt UI.optimizer: An AI-managed command from the Qilowatt Optimizer.timer: A command from a manually created timer in the Qilowatt UI.entity_ids in your automations. Implement the "Desired State" pattern for reliability. Some Deye inverters occasionally require a physical restart to resolve communication issues.template sensor in HA that multiplies your battery power entity by -1 and use that template sensor in the Qilowatt integration setup.