DiscordにSwitchBot 温湿度計の温度と湿度を送信するbot
poetry install
poetry run python main.py
-
DISCORD_TOKEN
Discordのトークン
-
SWITCHBOT_TOKEN
SwitchBotのトークン
SwitchBotアプリの
アプリバージョン
を10回連打すると出現する開発者向けオプション
から発行可能 -
SWITCHBOT_DEVICE_ID
SwitchBot 温湿度計のデバイスID 以下のコマンドで取得可能
curl --request GET 'https://api.switch-bot.com/v1.0/devices' \ --header 'Authorization: {SWITCHBOT_TOKEN}' \ --header 'Content-Type: application/json; charset=utf8'