Skip to content

Command-line tool & python library to receive & decode signals of FT017TH wireless thermo/hygrometers 🌡

License

Notifications You must be signed in to change notification settings

fphammerle/wireless-sensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wireless-sensor 🌡

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

Command-line tool & python library to receive & decode signals of FT017TH wireless thermo/hygrometers

Requirements

Setup

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

Usage

Command-line

$ wireless-sensor-receive
2020-12-07T10:40:16+0100 23.9°C 46.9%
2020-12-07T10:41:04+0100 23.9°C 46.9%
2020-12-07T10:42:01+0100 23.8°C 47.0%

Python Library

import wireless_sensor

sensor = wireless_sensor.FT017TH(gdo0_gpio_line_name=b'GPIO24')
for measurement in sensor.receive(timeout_seconds=600):
    if not measurement:
        print("invalid packet or timeout")
        continue
    print(
        measurement.decoding_timestamp,
        measurement.temperature_degrees_celsius,
        measurement.relative_humidity,
    )