Name | switchbot-utility JSON |
Version |
0.4
JSON |
| download |
home_page | |
Summary | Python Switchbot utilities |
upload_time | 2023-04-28 06:38:25 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.6 |
license | |
keywords |
iot
switchbot
switchbot api
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![PyPI -
Downloads](https://img.shields.io/pypi/dm/switchbot-utility?style=plastic)](https://pypi.org/project/switchbot-utility/)
[![PyPI](https://img.shields.io/pypi/v/switchbot-utility?style=plastic)](https://pypi.org/project/switchbot-utility/)
[![PyPI -
License](https://img.shields.io/pypi/l/switchbot-utility?style=plastic)](https://pypi.org/project/switchbot-utility/)
# Switchbot_utility
Python Switchbot Utilities using Switchbot API.
## Installing
```plain
pip install switchbot-utility
```
## Getting start
Get token and secret,
1. Download the SwitchBot app on App Store or Google Play Store
2. Register a SwitchBot account and log in into your account
3. Generate an Open Token within the app
a) Go to Profile > Preference
b) Tap App Version 10 times. Developer Options will show up
c) Tap Developer Options
d) Copy token and secret
create `settings.json` file, and fill token and secret.
```python
{
"token": "",
"secret": ""
}
```
Run example script.
```python
from switchbot_utility.switchbot import Switchbot
switchbot = Switchbot()
switchbot.devicelist()
```
Scripts makes `deviceList.txt`. You can manipulate device using diviceId in this file.
## Other Example
### Get temperature from SwitchbotMeter
```python
from switchbot_utility.switchbot_meter import SwitchbotMeter
meter = SwitchbotMeter("meterDeviceId")
print(meter.get_temperature())
```
### Unlock SwitchbotLock
```python
from switchbot_utility.switchbot_lock import SwitchbotLock
lock = SwitchbotLock("lockDeviceId")
lock.unlock()
```
## Commands reference
[Read the document](https://icarrot0605.github.io/switchbot_utility_docs/)
## Supported divice
| Term | Description |Tested |
| ---------------------------- | ------------------------------------------------------------ | ------ |
| Hub | Generally referred to these devices, SwitchBot Hub Model No. SwitchBot Hub S1/SwitchBot Hub Mini Model No. W0202200/SwitchBot Hub Plus Model No. SwitchBot Hub S1 | No |
| Hub Mini | Short for SwitchBot Hub Mini Model No. W0202200 | Yes |
| Hub Plus | Short for SwitchBot Hub Plus Model No. SwitchBot Hub S1 | No |
| Bot | Short for SwitchBot Bot Model No. SwitchBot S1 | Yes |
| Curtain | Short for SwitchBot Curtain Model No. W0701600 | Yes |
| Plug | Short for SwitchBot Plug Model No. SP11. Currently only available in Japan | Yes |
| Meter | Short for SwitchBot Thermometer and Hygrometer Model No. SwitchBot MeterTH S1 | Yes |
| Meter Plus (JP) | Short for SwitchBot Thermometer and Hygrometer Plus (JP) Model No. W2201500 | Yes |
| Meter Plus (US) | Short for SwitchBot Thermometer and Hygrometer Plus (US) Model No. W2301500 | No |
| Motion Sensor | Short for SwitchBot Motion Sensor Model No. W1101500 | No |
| Contact Sensor | Short for SwitchBot Contact Sensor Model No. W1201500 | Yes |
| Color Bulb | Short for SwitchBot Color Bulb Model No. W1401400 | Yes |
| Strip Light | Short for SwitchBot LED Strip Light Model No. W1701100 | No |
| Plug Mini (US) | Short for SwitchBot Plug Mini (US) Model No. W1901400 and W1901401 | No |
| Plug Mini (JP) | Short for SwitchBot Plug Mini (JP) Model No. W2001400 and W2001401 | Yes |
| Lock | Short for SwitchBot Lock Model No. W1601700 | Yes |
| Keypad | Short for SwitchBot Lock Model No. W2500010 | No |
| Keypad Touch | Short for SwitchBot Lock Model No. W2500020 | Yes |
| Robot Vacuum Cleaner S1 | Short for SwitchBot Robot Vacuum Cleaner S1 Model No. W3011000. Currently only available in Japan. | No |
| Robot Vacuum Cleaner S1 Plus | Short for SwitchBot Robot Vacuum Cleaner S1 Plus Model No. W3011010. Currently only available in Japan. | No |
| Ceiling Light | Short for SwitchBot Ceiling Light Model No. W2612230 and W2612240. Currently only available in Japan. | No |
| Ceiling Light Pro | Short for SwitchBot Ceiling Light Pro Model No. W2612210 and W2612220. Currently only available in Japan. | No |
| Indoor Cam | Short for SwitchBot Indoor Cam Model No. W1301200 | No |
| Pan/Tilt Cam | Short for SwitchBot Pan/Tilt Cam Model No. W1801200 | No |
| Pan/Tilt Cam 2K | Short for SwitchBot Pan/Tilt Cam 2K Model No. W3101100 | No |
| Blind Tilt | Short for SwitchBot Blind Tilt Model No. W2701600 | No |
Raw data
{
"_id": null,
"home_page": "",
"name": "switchbot-utility",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "IoT,Switchbot,Switchbot API",
"author": "",
"author_email": "MATSUMURA Hidetoshi <icarrot@mac.com>",
"download_url": "https://files.pythonhosted.org/packages/24/7c/c3bf55cc8d5186ea21029c3cd2f26eccd3c4c16c15253b70a9b6305bf985/switchbot_utility-0.4.tar.gz",
"platform": null,
"description": "[![PyPI -\nDownloads](https://img.shields.io/pypi/dm/switchbot-utility?style=plastic)](https://pypi.org/project/switchbot-utility/)\n[![PyPI](https://img.shields.io/pypi/v/switchbot-utility?style=plastic)](https://pypi.org/project/switchbot-utility/)\n[![PyPI -\nLicense](https://img.shields.io/pypi/l/switchbot-utility?style=plastic)](https://pypi.org/project/switchbot-utility/)\n\n# Switchbot_utility\n\nPython Switchbot Utilities using Switchbot API.\n\n## Installing\n\n```plain\npip install switchbot-utility\n```\n\n## Getting start\n\nGet token and secret,\n\n1. Download the SwitchBot app on App Store or Google Play Store\n2. Register a SwitchBot account and log in into your account\n3. Generate an Open Token within the app\na) Go to Profile > Preference\nb) Tap App Version 10 times. Developer Options will show up\nc) Tap Developer Options\nd) Copy token and secret\n\ncreate `settings.json` file, and fill token and secret.\n\n```python\n{\n \"token\": \"\",\n \"secret\": \"\"\n}\n```\n\nRun example script.\n\n```python\nfrom switchbot_utility.switchbot import Switchbot\n\nswitchbot = Switchbot()\nswitchbot.devicelist()\n```\n\nScripts makes `deviceList.txt`. You can manipulate device using diviceId in this file.\n\n## Other Example\n\n### Get temperature from SwitchbotMeter\n\n```python\nfrom switchbot_utility.switchbot_meter import SwitchbotMeter\n\nmeter = SwitchbotMeter(\"meterDeviceId\")\nprint(meter.get_temperature())\n```\n\n### Unlock SwitchbotLock\n\n```python\nfrom switchbot_utility.switchbot_lock import SwitchbotLock\n\nlock = SwitchbotLock(\"lockDeviceId\")\nlock.unlock()\n```\n\n## Commands reference\n\n[Read the document](https://icarrot0605.github.io/switchbot_utility_docs/)\n\n## Supported divice\n\n| Term | Description |Tested |\n| ---------------------------- | ------------------------------------------------------------ | ------ |\n| Hub | Generally referred to these devices, SwitchBot Hub Model No. SwitchBot Hub S1/SwitchBot Hub Mini Model No. W0202200/SwitchBot Hub Plus Model No. SwitchBot Hub S1 | No |\n| Hub Mini | Short for SwitchBot Hub Mini Model No. W0202200 | Yes |\n| Hub Plus | Short for SwitchBot Hub Plus Model No. SwitchBot Hub S1 | No |\n| Bot | Short for SwitchBot Bot Model No. SwitchBot S1 | Yes |\n| Curtain | Short for SwitchBot Curtain Model No. W0701600 | Yes |\n| Plug | Short for SwitchBot Plug Model No. SP11. Currently only available in Japan | Yes |\n| Meter | Short for SwitchBot Thermometer and Hygrometer Model No. SwitchBot MeterTH S1 | Yes |\n| Meter Plus (JP) | Short for SwitchBot Thermometer and Hygrometer Plus (JP) Model No. W2201500 | Yes |\n| Meter Plus (US) | Short for SwitchBot Thermometer and Hygrometer Plus (US) Model No. W2301500 | No |\n| Motion Sensor | Short for SwitchBot Motion Sensor Model No. W1101500 | No |\n| Contact Sensor | Short for SwitchBot Contact Sensor Model No. W1201500 | Yes |\n| Color Bulb | Short for SwitchBot Color Bulb Model No. W1401400 | Yes |\n| Strip Light | Short for SwitchBot LED Strip Light Model No. W1701100 | No |\n| Plug Mini (US) | Short for SwitchBot Plug Mini (US) Model No. W1901400 and W1901401 | No |\n| Plug Mini (JP) | Short for SwitchBot Plug Mini (JP) Model No. W2001400 and W2001401 | Yes |\n| Lock | Short for SwitchBot Lock Model No. W1601700 | Yes |\n| Keypad | Short for SwitchBot Lock Model No. W2500010 | No |\n| Keypad Touch | Short for SwitchBot Lock Model No. W2500020 | Yes |\n| Robot Vacuum Cleaner S1 | Short for SwitchBot Robot Vacuum Cleaner S1 Model No. W3011000. Currently only available in Japan. | No |\n| Robot Vacuum Cleaner S1 Plus | Short for SwitchBot Robot Vacuum Cleaner S1 Plus Model No. W3011010. Currently only available in Japan. | No |\n| Ceiling Light | Short for SwitchBot Ceiling Light Model No. W2612230 and W2612240. Currently only available in Japan. | No |\n| Ceiling Light Pro | Short for SwitchBot Ceiling Light Pro Model No. W2612210 and W2612220. Currently only available in Japan. | No |\n| Indoor Cam | Short for SwitchBot Indoor Cam Model No. W1301200 | No |\n| Pan/Tilt Cam | Short for SwitchBot Pan/Tilt Cam Model No. W1801200 | No |\n| Pan/Tilt Cam 2K | Short for SwitchBot Pan/Tilt Cam 2K Model No. W3101100 | No |\n| Blind Tilt | Short for SwitchBot Blind Tilt Model No. W2701600 | No |\n",
"bugtrack_url": null,
"license": "",
"summary": "Python Switchbot utilities",
"version": "0.4",
"split_keywords": [
"iot",
"switchbot",
"switchbot api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "898dd328426d9d0f039cf0347c7774c5e28b0b19596e4e9a4f172ee8b1a756ea",
"md5": "7ea0f6abbbc4d165615dce02b796b725",
"sha256": "d9c57c45047497c52c212056f26aa9c160f3bbb06e1308a145c7ee8883371352"
},
"downloads": -1,
"filename": "switchbot_utility-0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7ea0f6abbbc4d165615dce02b796b725",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 21808,
"upload_time": "2023-04-28T06:38:22",
"upload_time_iso_8601": "2023-04-28T06:38:22.687470Z",
"url": "https://files.pythonhosted.org/packages/89/8d/d328426d9d0f039cf0347c7774c5e28b0b19596e4e9a4f172ee8b1a756ea/switchbot_utility-0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "247cc3bf55cc8d5186ea21029c3cd2f26eccd3c4c16c15253b70a9b6305bf985",
"md5": "3a0f420cc00a8ccd78cb7b9894f6caa0",
"sha256": "8f343085daa860f6129a5a934a1f61b26efdcabc65827e757df7a2f1f69a5f4f"
},
"downloads": -1,
"filename": "switchbot_utility-0.4.tar.gz",
"has_sig": false,
"md5_digest": "3a0f420cc00a8ccd78cb7b9894f6caa0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 11085,
"upload_time": "2023-04-28T06:38:25",
"upload_time_iso_8601": "2023-04-28T06:38:25.854187Z",
"url": "https://files.pythonhosted.org/packages/24/7c/c3bf55cc8d5186ea21029c3cd2f26eccd3c4c16c15253b70a9b6305bf985/switchbot_utility-0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-28 06:38:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "switchbot-utility"
}