# wireless-sensor-mqtt 🌡
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![CI Pipeline Status](https://github.com/fphammerle/wireless-sensor-mqtt/workflows/tests/badge.svg)](https://github.com/fphammerle/wireless-sensor-mqtt/actions)
[![Coverage Status](https://coveralls.io/repos/github/fphammerle/wireless-sensor-mqtt/badge.svg?branch=master)](https://coveralls.io/github/fphammerle/wireless-sensor-mqtt?branch=master)
[![Last Release](https://img.shields.io/pypi/v/wireless-sensor-mqtt.svg)](https://pypi.org/project/wireless-sensor-mqtt/#history)
[![Compatible Python Versions](https://img.shields.io/pypi/pyversions/wireless-sensor-mqtt.svg)](https://pypi.org/project/wireless-sensor-mqtt/)
[![DOI](https://zenodo.org/badge/319636053.svg)](https://zenodo.org/badge/latestdoi/319636053)
MQTT client reporting measurements of FT017TH wireless thermo/hygrometers
## Requirements
* MQTT broker
* [FT017TH](https://github.com/fphammerle/FT017TH-wireless-thermometer-hygrometer-signal#product-details) sensor
* [CC1101 transceiver](https://www.ti.com/product/CC1101)
* Linux machine with CC1101 connected to SPI port
([wiring instructions](https://github.com/fphammerle/python-cc1101#wiring-raspberry-pi)
for raspberry pi)
## Setup
```sh
$ pip3 install --user --upgrade wireless-sensor-mqtt
```
## Usage
```sh
$ wireless-sensor-mqtt --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
```sh
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](https://www.home-assistant.io/) will detect two new sensors automatically,
if connected to the same MQTT broker
and [MQTT discovery](https://www.home-assistant.io/docs/mqtt/discovery/) is enabled
(enabled by default since version [0.117.0](https://github.com/home-assistant/core/commit/306ee305747a4f7ba758352503f99f221f0ad85a)).
![homeassistant: discovered sensors](docs/homeassistant/developer-tools-states-v0.117.5-20201208.png)
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
```sh
$ sudo docker run --name wireless_sensor_mqtt \
--device /dev/spidev0.0 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`
Raw data
{
"_id": null,
"home_page": "https://github.com/fphammerle/wireless-sensor-mqtt",
"name": "wireless-sensor-mqtt",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "FT017TH,IoT,automation,climate,home-assistant,home-automation,humidity,hygrometer,mqtt,raspberry-pi,sensor,thermometer,wireless",
"author": "Fabian Peter Hammerle",
"author_email": "fabian@hammerle.me",
"download_url": "https://files.pythonhosted.org/packages/9d/70/bcbc24dc397146a398e8732f3075be9dd10ec76f4c4d50e0aaaf05add1a4/wireless-sensor-mqtt-0.3.0.tar.gz",
"platform": "",
"description": "# wireless-sensor-mqtt \ud83c\udf21\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![CI Pipeline Status](https://github.com/fphammerle/wireless-sensor-mqtt/workflows/tests/badge.svg)](https://github.com/fphammerle/wireless-sensor-mqtt/actions)\n[![Coverage Status](https://coveralls.io/repos/github/fphammerle/wireless-sensor-mqtt/badge.svg?branch=master)](https://coveralls.io/github/fphammerle/wireless-sensor-mqtt?branch=master)\n[![Last Release](https://img.shields.io/pypi/v/wireless-sensor-mqtt.svg)](https://pypi.org/project/wireless-sensor-mqtt/#history)\n[![Compatible Python Versions](https://img.shields.io/pypi/pyversions/wireless-sensor-mqtt.svg)](https://pypi.org/project/wireless-sensor-mqtt/)\n[![DOI](https://zenodo.org/badge/319636053.svg)](https://zenodo.org/badge/latestdoi/319636053)\n\nMQTT client reporting measurements of FT017TH wireless thermo/hygrometers\n\n## Requirements\n\n* MQTT broker\n* [FT017TH](https://github.com/fphammerle/FT017TH-wireless-thermometer-hygrometer-signal#product-details) sensor\n* [CC1101 transceiver](https://www.ti.com/product/CC1101)\n* Linux machine with CC1101 connected to SPI port\n ([wiring instructions](https://github.com/fphammerle/python-cc1101#wiring-raspberry-pi)\n for raspberry pi)\n\n## Setup\n\n```sh\n$ pip3 install --user --upgrade wireless-sensor-mqtt\n```\n\n## Usage\n\n```sh\n$ wireless-sensor-mqtt --mqtt-host HOSTNAME_OR_IP_ADDRESS \\\n --mqtt-topic-prefix MQTT_TOPIC_PREFIX\n```\n\nMeasurements will be published on topics\n`MQTT_TOPIC_PREFIX/temperature-degrees-celsius`\nand `MQTT_TOPIC_PREFIX/relative-humidity-percent`\n(e.g., `living-room/temperature-degrees-celsius`\nwith `--mqtt-topic-prefix living-room`).\n\nAdd `--debug` to get debug logs.\n\n### MQTT via TLS\n\nTLS is enabled by default.\nRun `wireless-sensor-mqtt --mqtt-disable-tls \u2026` to disable TLS.\n\n### MQTT Authentication\n\n```sh\nwireless-sensor-mqtt --mqtt-username me --mqtt-password secret \u2026\n# or\nwireless-sensor-mqtt --mqtt-username me --mqtt-password-file /var/lib/secrets/mqtt/password \u2026\n```\n\n## Home Assistant \ud83c\udfe1\n\n[Home Assistant](https://www.home-assistant.io/) will detect two new sensors automatically,\nif connected to the same MQTT broker\nand [MQTT discovery](https://www.home-assistant.io/docs/mqtt/discovery/) is enabled\n(enabled by default since version [0.117.0](https://github.com/home-assistant/core/commit/306ee305747a4f7ba758352503f99f221f0ad85a)).\n\n![homeassistant: discovered sensors](docs/homeassistant/developer-tools-states-v0.117.5-20201208.png)\n\nWhen using a custom `discovery_prefix`, run `wireless-sensor-mqtt --homeassistant-discovery-prefix custom-prefix \u2026`.\n\n## Docker \ud83d\udc33\n\nPre-built docker images are available at https://hub.docker.com/r/fphammerle/wireless-sensor-mqtt/tags\n\n```sh\n$ sudo docker run --name wireless_sensor_mqtt \\\n --device /dev/spidev0.0 fphammerle/wireless-sensor-mqtt \\\n wireless-sensor-mqtt --mqtt-host HOSTNAME_OR_IP_ADDRESS \u2026\n```\n\nOptionally add `--read-only --cap-drop ALL --security-opt no-new-privileges` before image specifier.\n\nAnnotation of signed tags `docker/*` contains docker image digests: https://github.com/fphammerle/wireless-sensor-mqtt/tags\n\n### Docker Compose \ud83d\udc19\n\n1. Clone this repository.\n2. Edit `docker-compose.yml`.\n3. `sudo docker-compose up --build`\n\n\n",
"bugtrack_url": null,
"license": "GPLv3+",
"summary": "MQTT client reporting measurements of FT017TH wireless thermo/hygrometers",
"version": "0.3.0",
"project_urls": {
"Changelog": "https://github.com/fphammerle/wireless-sensor-mqtt/blob/master/CHANGELOG.md",
"Homepage": "https://github.com/fphammerle/wireless-sensor-mqtt"
},
"split_keywords": [
"ft017th",
"iot",
"automation",
"climate",
"home-assistant",
"home-automation",
"humidity",
"hygrometer",
"mqtt",
"raspberry-pi",
"sensor",
"thermometer",
"wireless"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e26fb1e49462f4257f823e553348c790b9ae54fbdc7031c05104ff1a99e8f731",
"md5": "6e98d510e85d5a546b2167250f25ed6b",
"sha256": "4f332606ecec2772d23aa8e6fb7ea87d6c06ba9747b5fa48cb3b76abf0f784b8"
},
"downloads": -1,
"filename": "wireless_sensor_mqtt-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6e98d510e85d5a546b2167250f25ed6b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 20694,
"upload_time": "2020-12-13T14:59:53",
"upload_time_iso_8601": "2020-12-13T14:59:53.726238Z",
"url": "https://files.pythonhosted.org/packages/e2/6f/b1e49462f4257f823e553348c790b9ae54fbdc7031c05104ff1a99e8f731/wireless_sensor_mqtt-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9d70bcbc24dc397146a398e8732f3075be9dd10ec76f4c4d50e0aaaf05add1a4",
"md5": "4855b0aa28c57aff36b6c4101e725ece",
"sha256": "7f4c14cf39baa00827581b45783d17890cc2985dc8059033981cb18bfc3663dc"
},
"downloads": -1,
"filename": "wireless-sensor-mqtt-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "4855b0aa28c57aff36b6c4101e725ece",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 98368,
"upload_time": "2020-12-13T15:00:05",
"upload_time_iso_8601": "2020-12-13T15:00:05.366197Z",
"url": "https://files.pythonhosted.org/packages/9d/70/bcbc24dc397146a398e8732f3075be9dd10ec76f4c4d50e0aaaf05add1a4/wireless-sensor-mqtt-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-12-13 15:00:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fphammerle",
"github_project": "wireless-sensor-mqtt",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "wireless-sensor-mqtt"
}