- Fetch the sensor values and tweet them.
- Fetch the sensor values via PLANEX API.
- Convert the time to Japanese local time (JST).
- Tweet the latest values.
$ pip3 install python-dotenv pytz python-dateutil twitter
- Set API keys in
.env
file.
TW_CONSUMER_KEY=...
TW_CONSUMER_SECRET=...
TW_TOKEN=...
TW_TOKEN_SECRET=...
SENSOR_MAC=...
SENSOR_TOKEN=...
- Call the command below.
$ python3 main.py
- Example output:
Time:2020-02-16T11:48:02+09:00, Temperature:25.47 degrees, Humidity:49.1%, Air pressure:1007.37hPa
- xxx
- xxx
- 2023/05/06 Support Twitter API v2.
- Copyright © 2020-2023 yusami
- Licensed under the Apache License, Version 2.0