6 releases (3 breaking)
0.4.0 | Aug 19, 2024 |
---|---|
0.3.1 | Aug 18, 2024 |
0.2.1 | Aug 15, 2024 |
0.1.0 | Aug 15, 2024 |
#99 in Hardware support
37KB
714 lines
ecowitt-mqtt
This is a rust program that will read data from an ecowitt weather station and soil moisture sensor and send it to an MQTT broker for Home Assistant to consume.
This only is known to work on the GW1000 and Soil sensor as these are the only devices I have access to. It does not support connecting to MQTT via TLS.
Why
The current Ecowitt integration requires that the Ecowitt device has access to the same network that Home Assistant is running on. As I am running this on a separate VLAN, I needed something that I trusted running on the same VLAN as Home Assistant but could read the data from Ecowitt.
Usage
Configuration can be done via environment variables. The following are the available environment variables:
export ECOWITT_HOST=http://[ ip address to ecowitt device ]
export MQTT_ADDRESS=[ip address of your MQTT broker]
export MQTT_PORT=[port your mqtt broker is listening on]
export MQTT_USER=[username, optional]
export MQTT_PASS=[password, optional]
./ecowitt-mqtt
You can also specify the configuration in a file named config.json in the same directory as the binary:
{
ecowitt_host: "http://<ecowitt ip",
username: "<username, or omit for no username>",
password: "<password, or omit for no password>",
mqtt_address: "<mqtt broker ip>",
mqtt_port: <mqtt broker port>
}
Building
This project is built using cargo. You can build it by running cargo build --release
. The binary will be in the target/release directory.
License
This projects is licenced under the AGPL-3.0 license. See the COPYING file for more information.
Copyright (c) 2024, Todd Kennedy
Dependencies
~15–27MB
~410K SLoC