MQTT client reporting measurements of FT017TH wireless thermo/hygrometers
- MQTT broker
- FT017TH sensor
- CC1101 transceiver
- Linux machine with CC1101 connected to SPI port &
GDO0
connected to some GPIO pin (wiring instructions for raspberry pi)
$ pip3 install --user --upgrade wireless-sensor-mqtt
$ wireless-sensor-mqtt \
--gdo0-gpio-line-name GPIO24 \
--mqtt-host HOSTNAME_OR_IP_ADDRESS \
--mqtt-topic-prefix MQTT_TOPIC_PREFIX
Measurements will be published on topics
MQTT_TOPIC_PREFIX/temperature-degrees-celsius
and MQTT_TOPIC_PREFIX/relative-humidity-percent
(e.g., living-room/temperature-degrees-celsius
with --mqtt-topic-prefix living-room
).
Add --debug
to get debug logs.
TLS is enabled by default.
Run wireless-sensor-mqtt --mqtt-disable-tls …
to disable TLS.
wireless-sensor-mqtt --mqtt-username me --mqtt-password secret …
# or
wireless-sensor-mqtt --mqtt-username me --mqtt-password-file /var/lib/secrets/mqtt/password …
Home Assistant will detect two new sensors automatically, if connected to the same MQTT broker and MQTT discovery is enabled (enabled by default since version 0.117.0).
When using a custom discovery_prefix
, run wireless-sensor-mqtt --homeassistant-discovery-prefix custom-prefix …
.
Pre-built docker images are available at https://hub.docker.com/r/fphammerle/wireless-sensor-mqtt/tags
$ sudo docker run --name wireless_sensor_mqtt \
--device /dev/spidev0.0 --device /dev/gpiochip0 \
fphammerle/wireless-sensor-mqtt \
wireless-sensor-mqtt --mqtt-host HOSTNAME_OR_IP_ADDRESS …
Optionally add --read-only --cap-drop ALL --security-opt no-new-privileges
before image specifier.
Annotation of signed tags docker/*
contains docker image digests: https://github.com/fphammerle/wireless-sensor-mqtt/tags
- Clone this repository.
- Edit
docker-compose.yml
. sudo docker-compose up --build