Skip to main content

MQTT client reporting measurements of FT017TH wireless thermo/hygrometers

Project description

wireless-sensor-mqtt 🌡

Code style: black CI Pipeline Status Coverage Status Last Release Compatible Python Versions DOI

MQTT client reporting measurements of FT017TH wireless thermo/hygrometers

Requirements

Setup

$ pip3 install --user --upgrade wireless-sensor-mqtt

Usage

$ 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.

MQTT via TLS

TLS is enabled by default. Run wireless-sensor-mqtt --mqtt-disable-tls … to disable TLS.

MQTT Authentication

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 🏡

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).

homeassistant: discovered sensors

When using a custom discovery_prefix, run wireless-sensor-mqtt --homeassistant-discovery-prefix custom-prefix ….

Docker 🐳

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

Docker Compose 🐙

  1. Clone this repository.
  2. Edit docker-compose.yml.
  3. sudo docker-compose up --build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wireless-sensor-mqtt-1.0.0a1.tar.gz (98.3 kB view details)

Uploaded Source

Built Distribution

wireless_sensor_mqtt-1.0.0a1-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file wireless-sensor-mqtt-1.0.0a1.tar.gz.

File metadata

File hashes

Hashes for wireless-sensor-mqtt-1.0.0a1.tar.gz
Algorithm Hash digest
SHA256 a839e71362de9dcc14727bec3b040b563c2a4c511d55a11187d83fa3be3fcda7
MD5 c34957d0e288af2deb24293009394509
BLAKE2b-256 067d41e223db9646fe6986cb01820486220c9db2f21df68e8aa750d4d4ee7b17

See more details on using hashes here.

File details

Details for the file wireless_sensor_mqtt-1.0.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for wireless_sensor_mqtt-1.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 718002eb624af5a850e5b44ee5d05cd70eb3af2fa713bdb86d42a09c1dbb8ddf
MD5 737f33edcab7dbe1925bab0628a1da8d
BLAKE2b-256 dc31c61c719655f128fbb0edafca2c289ab50cbcf66918e8daf78b6f184b74a1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page