# 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: ```bash 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: ```json { ecowitt_host: "http://", password: "", mqtt_address: "", mqtt_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