kzosabe / switchbot-client Goto Github PK
View Code? Open in Web Editor NEWA Python client library for SwitchBot API.
License: Apache License 2.0
A Python client library for SwitchBot API.
License: Apache License 2.0
https://github.com/OpenWonderLabs/SwitchBotAPI#about-the-new-version
Make the implementation of switchbot-client version 0.4 follow the latest specification of switchbot api v1.0
Create switchbot-client version 1.0 to conform to switchbot api v1.1 specifications
Address any incompatible changes that need to be made when updating to 1.0
air_conditioner.set_all(
temperature=25,
mode=AirConditioner.Parameters.MODE_DRY,
fan_speed=AirConditioner.Parameters.FAN_SPEED_AUTO,
power=AirConditioner.Parameters.POWER_ON
)
to
air_conditioner.set_temperature(25)
air_conditioner.set_mode(AirConditioner.Parameters.MODE_DRY)
status()
method which returns Status object including device specific columnsv1.0/webhook/setupWebhook
v1.0/webhook/queryWebhook
v1.0/webhook/updateWebhook
v1.0/webhook/deleteWebhook
https://docs.python.org/ja/3/library/tkinter.html
~/.config/switchbot-client/config.yml
api/devices
on launchThe latest available version is 0.4.1 and does not support the new two-key authentication system. I've seen some devs made to support this new API. Is a new version of this Python package planned?
Hello @kzosabe and thank you very much for open-sourcing this library. I would like to use it to read the current temperature and humidity of my Meter Plus devices but it always throws an error as soon as I call the SwitchBotClient.devices
method. The error is a TypeError
with the message invalid physical device object
.
Looking through the source, I see that you instantiate the device objects based on the deviceType
which is MeterPlus
in my case. Your DeviceType
does not have this value but a Meter Plus (US)
and a Meter Plus (JP)
. Just changing one of the Enum values to MeterPlus
makes it work perfectly.
Looking at the Meter Plus devices section in the SwitchBot API docs it seems to me that the current values Meter Plus (US)
and Meter Plus (JP)
are simply incorrect and you only need the MeterPlus
type like with Meter
, no separate MeterPlusUs
and MeterPlusJp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.