A .NET 10 bridge that connects Ecowitt weather stations and IoT subdevices to MQTT, with native Home Assistant auto-discovery.
- Multi-gateway, multi-subdevice support
- Automatic discovery of new sensors and subdevices
- Bidirectional communication with subdevices (AC1100, WFC01, WFC02)
- Home Assistant MQTT discovery (devices, sensors, switches)
- Metric/imperial unit conversion
- Change-detection filtering to reduce MQTT noise
Gateways: GW3000, GW2000, GW1200, GW1100, WN1980, WS3800, WS39x0
Subdevices (require IoT-capable gateway like GW2000/GW1200):
- AC1100 — Smart plug with power monitoring
- WFC01 — Water timer with flow sensor and temperature
- WFC02 — Water valve with optional flow sensor
Weather Stations: Any Fine Offset compatible station (Ecowitt, Froggit, Ambient Weather, ...) that supports custom Ecowitt protocol uploads.
Prerequisites: A running MQTT broker (e.g. Mosquitto).
Create an appsettings.json. Minimal setup — just point it at your MQTT broker:
{
"mqtt": {
"host": "192.168.1.50"
}
}Full configuration with all options and their defaults:
{
"Serilog": {
"MinimumLevel": "Warning"
},
"mqtt": {
"host": "",
"user": "",
"password": "",
"port": 1883,
"basetopic": "ecowitt",
"clientId": "ecowitt-controller",
"reconnect": true,
"reconnectAttempts": 2,
"useMqtt311": false
},
"ecowitt": {
"pollingInterval": 30,
"calculateValues": true,
"retries": 2,
"gateways": [
{
"name": "weatherstation_01",
"ip": "192.168.1.101",
"subdevices": true
}
]
},
"controller": {
"precision": 2,
"unit": "metric",
"homeassistantdiscovery": true
}
}| Section | Key | Default | Description |
|---|---|---|---|
mqtt |
host |
— | MQTT broker address (required) |
mqtt |
port |
1883 |
MQTT broker port |
mqtt |
basetopic |
ecowitt |
Root MQTT topic prefix |
mqtt |
reconnect |
true |
Auto-reconnect on disconnect |
mqtt |
reconnectAttempts |
2 |
Reconnect retry count |
mqtt |
useMqtt311 |
false |
Use MQTT 3.1.1 instead of MQTT 5.0 |
ecowitt |
pollingInterval |
30 |
Subdevice polling interval (seconds) |
ecowitt |
calculateValues |
true |
Generate calculated sensor values |
ecowitt |
gateways |
[] |
Gateway definitions (name, ip, credentials, subdevices) |
ecowitt.gateways[] |
subdevices |
false |
Enable subdevice polling (only GW1200, GW2000, GW3000) |
controller |
precision |
2 |
Decimal places for floating-point values |
controller |
unit |
metric |
metric or imperial |
controller |
homeassistantdiscovery |
true |
Publish HA MQTT discovery messages |
Multi-architecture images (amd64, arm64) are available on Docker Hub. The container expects its configuration at /config/appsettings.json.
docker run -d --name ecowitt-controller \
-v /path/to/config:/config \
-p 8080:8080 \
--restart always \
mplogas/ecowitt-controller:latestPlace your appsettings.json in the host directory you bind-mount to /config.
services:
ecowitt-controller:
image: mplogas/ecowitt-controller:latest
container_name: ecowitt-controller
restart: always
volumes:
- type: bind
source: /path/to/config
target: /config
ports:
- "8080:8080"Port 8080 must be reachable by your Ecowitt gateway for weather data uploads. If your gateway is on a specific VLAN or subnet, bind to the appropriate interface IP (e.g. 192.168.1.10:8080:8080).
For Home Assistant OS / Supervised installations, Ecowitt Controller is available as a native add-on. This handles configuration, networking, and MQTT broker discovery automatically.
- Add the add-on repository to your HA instance:
https://github.com/mplogas/ha-addon-ecowitt-controller - Install Ecowitt Controller from the add-on store
- Configure your gateways in the add-on settings
- Start the add-on
The add-on runs on the host network and auto-discovers the Mosquitto broker if the official Mosquitto add-on is installed. See the add-on repository for full documentation.
cd src
dotnet run --project Ecowitt.Controller/Ecowitt.Controller.csproj -c Release- Open your gateway's WebUI or the WS View Plus app
- Go to weather services and enable the Customized upload
- Set protocol to Ecowitt, enter the controller's IP, path
/data/report, port8080 - Set the posting interval (e.g. 30 seconds)
With homeassistantdiscovery enabled (default), devices and sensors appear automatically in HA via MQTT discovery. Make sure your HA instance is connected to the same MQTT broker.
Tip: Running Home Assistant OS or Supervised? Use the HA add-on instead for a simpler setup.
Note: Gateways and their sensors only appear after the first data push from the Ecowitt device. This depends on the Upload Interval configured in your gateway's WebUI or the WS View Plus app (step 4 above). Subdevices are picked up on the next polling cycle after their parent gateway has reported in, so expect an additional delay of up to one
pollingInterval.
- Architecture — System design, data flow, and message bus topology
- HTTP API — Inbound weather data endpoint and outbound gateway polling
- MQTT Topics — Topic structure, payloads, and Home Assistant discovery
- ASP.NET Core Web API — HTTP endpoint for Ecowitt weather data
- MQTTnet — MQTT client
- SlimMessageBus — In-memory message bus connecting the services
- Serilog — Structured logging
- Polly — HTTP retry policies
Contributions welcome! Please read CONTRIBUTING.md for guidelines.
MIT — see LICENSE.