noah-mqtt
is a standalone application designed to retrieve data and metrics from your Growatt NOAH 2000 home battery used in balcony power plants. It publishes this information to an MQTT broker, making it easily accessible for Home Assistant or other applications.
The application features Home Assistant auto-discovery, allowing your NOAH devices to be automatically recognized and integrated with Home Assistant via the MQTT integration.
🌟 If you find my project helpful, please consider giving me a star on GitHub! Your support motivates me to improve and delve deeper into enhancing the project. Thank you!
noah-mqtt
with DockerTo run the latest version of noah-mqtt
using Docker, follow these steps:
Install Docker: Ensure Docker is installed on your system. You can download Docker Desktop from Docker’s official website.
Open a Terminal:
Execute the Docker Command: Run the following command, replacing the placeholders with your actual values:
docker run --name noah-mqtt -e GROWATT_USERNAME=myusername -e GROWATT_PASSWORD=mypassword -e MQTT_HOST=localhost -e MQTT_PORT=1883 ghcr.io/mtrossbach/noah-mqtt:latest
The application will connect to your MQTT broker and retrieve all metrics and data for your NOAH devices.
If you prefer not to compile the binary yourself, you can download a prebuilt version:
Download the Binary: Go to the Releases page of the repository and download the prebuilt binary for your operating system and system architecture.
Extract the Binary: If the binary is compressed (e.g., in a zip or tar file), extract it to a directory of your choice.
Run the Application: Open a terminal in the directory containing the binary and run it using the appropriate command for your OS, setting the necessary environment variables:
Windows (Command Prompt):
set GROWATT_USERNAME=myusername
set GROWATT_PASSWORD=mypassword
set MQTT_HOST=localhost
set MQTT_PORT=1883
noah-mqtt.exe
Windows (PowerShell):
$env:GROWATT_USERNAME=„myusername“
$env:GROWATT_PASSWORD=„mypassword“
$env:MQTT_HOST=„localhost“
$env:MQTT_PORT=„1883“
.\noah-mqtt.exe
Linux/macOS:
GROWATT_USERNAME=myusername GROWATT_PASSWORD=mypassword MQTT_HOST=localhost MQTT_PORT=1883 ./noah-mqtt
Again, replace myusername
, mypassword
, localhost
, and 1883
with your actual Growatt account details and MQTT broker information.
To compile the binary yourself, ensure you have Go installed on your machine:
Install Go: Download and install the latest version of Go from the official Go website.
Clone the Repository: Open a terminal and run the following command to clone the repository:
git clone https://github.com/mtrossbach/noah-mqtt.git
cd noah-mqtt
Build the application:
go build -o noah-mqtt cmd/noah-mqtt/main.go
Afterwards follow the instructions for running the application from option 2.
noah-mqtt
interacts with Home Assistant by publishing data from your Growatt NOAH 2000 home battery to an MQTT broker. This setup allows Home Assistant to subscribe to and integrate this data seamlessly into its ecosystem.
If you’re already using MQTT with other integrations like zigbee2mqtt or AhoyDTU, you already have the MQTT integration configured and active. In this case, you can skip step 1 and 2 as your existing setup should work with noah-mqtt
.
The following integration process for noah-mqtt
with Home Assistant works for all installation methods, regardless of how Home Assistant is installed—whether it’s through Home Assistant OS, Home Assistant Supervised, or Home Assistant Container.
Set Up an MQTT Broker:
Ensure you have an MQTT broker running, such as Mosquitto, and that it’s accessible from both Noah-mqtt and Home Assistant.
Check MQTT Integration in Home Assistant:
Run noah-mqtt:
Start noah-mqtt
using the appropriate configuration for your MQTT broker.
Verify Device Discovery:
Check Devices and Entities under Settings > Devices & Services in Home Assistant to confirm that your Noah devices are automatically discovered.
By following these steps, noah-mqtt
will communicate with Home Assistant via your MQTT broker, also supporting automatic device discovery. If you already have MQTT set up, it should integrate seamlessly with your existing configuration.
If you are using Home Assistant OS or Home Assistant Supervised you can run noah-mqtt
as a Home Assistant add-on, which provides seamless integration with your Home Assistant setup.
This option leverages the add-on system to manage and run noah-mqtt
directly on your Home Assistant instance.
Prerequisite:
Add the Repository:
https://github.com/mtrossbach/hassio-addons
.Install the Add-on:
noah-mqtt
add-on within the Add-on Store.Configure the Add-on:
Start the Add-on:
noah-mqtt
add-on.The Home Assistant add-on provides an easy and integrated way to run noah-mqtt
, allowing you to manage it directly from the Home Assistant interface.
For more detailed information and updates, visit the repository.
You can configure noah-mqtt
using the following environment variables:
Environment Variable | Description | Default |
---|---|---|
LOG_LEVEL |
Sets the logging level of the application | INFO |
POLLING_INTERVAL |
Time in seconds between fetching new status data | 10 |
BATTERY_DETAILS_POLLING_INTERVAL |
Time in seconds between fetching battery details (per battery SoC & temperature). | 60 |
PARAMETER_POLLING_INTERVAL |
Time in seconds between fetching parameter data (system-output-power, charging limits). | 60 |
GROWATT_USERNAME |
Your Growatt account username (required) | - |
GROWATT_PASSWORD |
Your Growatt account password (required) | - |
MQTT_HOST |
Address of your MQTT broker (required) | - |
MQTT_PORT |
Port number of your MQTT broker | 1883 |
MQTT_CLIENT_ID |
Identifier for the MQTT client | noah-mqtt |
MQTT_USERNAME |
Username for connecting to your MQTT broker | - |
MQTT_PASSWORD |
Password for connecting to your MQTT broker | - |
MQTT_TOPIC_PREFIX |
Prefix for MQTT topics used by Noah-mqtt | noah2mqtt |
HOMEASSISTANT_TOPIC_PREFIX |
Prefix for topics used by Home Assistant | homeassistant |
Adjust these settings to fit your environment and requirements.
The following MQTT topics are used by noah-mqtt
to publish data:
noah2mqtt/{DEVICE_SERIAL}
noah2mqtt/0ABC00AA15AA00AA
{
"output_w": 398, // current output power in watts
"solar_w": 102, // current solar generation power in watts
"soc": 40, // current state of charge of the whole appliance
"charge_w": 0, // current charging power in watts
"discharge_w": 314, // current discharge power in watts
"battery_num": 2, // number of batteries
"generation_total_kwh": 319.8, // total energy generation
"generation_today_kwh": 3.1, // engery generation today
"work_mode": "load_first", // current work mode: load_first or battery_first
"status": "online" // connectivity status: online or offline
}
noah2mqtt/{DEVICE_SERIAL}/BAT{BAT_NR}
{BAT_NR}
with the battery number (e.g., BAT0, BAT1, BAT2, etc.).noah2mqtt/0ABC00AA15AA00AA/BAT0
{
"serial": "0ABC00AA15AA00AA", // battery serial number
"soc": 42, // current state of charge of this battery
"temp": 26 // current temperatur of this battery
}
noah2mqtt/{DEVICE_SERIAL}/parameters
noah2mqtt/0ABC00AA15AA00AA/parameters
{
"charging_limit": 100, // battery charging limit in percent, between 70 and 100
"discharge_limit": 9, // battery discharge limit in percent, between 0 and 30
"output_power_w": 800 // system output power in watts, between 0 and 800
}
You can update the device's configuration settings by posting a message to the following topic:
noah2mqtt/{DEVICE_SERIAL}/parameters/set
charging_limit
and discharge_limit
. noah2mqtt/1234567890/parameters/set
{
"charging_limit": 100, // battery charging limit in percent, between 70 and 100
"discharge_limit": 9, // battery discharge limit in percent, between 0 and 30
"output_power_w": 800 // system output power in watts, between 0 and 800
}