Crates.io | ecowitt-mqtt |
lib.rs | ecowitt-mqtt |
version | 0.4.0 |
source | src |
created_at | 2024-08-15 02:41:39.061493 |
updated_at | 2024-08-19 00:36:31.042011 |
description | Update Homeassistant with data from your Ecowitt device |
homepage | https://git.sr.ht/~toddself/ecowitt-mqtt |
repository | https://git.sr.ht/~toddself/ecowitt-mqtt |
max_upload_size | |
id | 1338239 |
size | 116,711 |
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.
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.
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>
}
This project is built using cargo. You can build it by running cargo build --release
. The binary will be in the target/release directory.
This projects is licenced under the AGPL-3.0 license. See the COPYING file for more information.
Copyright (c) 2024, Todd Kennedy