Skip to content

This adapter allows you to control your all devices connected to you SwitchBot hub by cloud API

License

Notifications You must be signed in to change notification settings

senger1985/ioBroker.switchbot-hub

 
 

Repository files navigation

Logo

ioBroker.switchbot-hub

NPM version Downloads Number of Installations (latest) Number of Installations (stable) Dependency Status

NPM

Tests: Test and Release

SwitchBot-hub adapter for ioBroker

This adapter allows you to control your all devices connected to your SwitchBot hub by cloud API

**** Early Alpha status at 0.0.1, only install for development/testing purposes ! .

Getting Started

Please follow these steps to get your Open Token!

  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) Tap Get Token
  4. Provide you token in adapter settings

Known limitations

Request limit

The amount of API calls per day is limited to 1000 times, as a result of that we must limit the amount of API calls handled during one day (1000 / 24 / 60 = 0.7 calls at max per minute)

At adapter start we will first make 1 API call to get all devices + 1 API for each device to get all values. If u have 5 curtains for example, the adapter start will need 6 API calls to have all data complete.

Each position/value change will require 1 API call. To avoid reaching the limit to soon, proper intervall time must be defined during beta testing

ToDo

[ ] Code stability & optimization [ ] API error handling & messages [ ] Test all device Types, see list below [ ] Filter states not needed in device tree [ ] Ensure proper intervals for each device type (due to API request limit)

Support Physical devices

Device Type Supported Tested
Hub Yes No
Hub Plus Yes No
Hub Mini Yes Yes
Bot (MUST enable Cloud Service first) Yes No
Curtain (MUST enable Cloud Service first) Yes Yes
Plug Yes No
Meter Yes No
Humidifier Yes No
Smart Fan Yes No

Support Virtual infrared remote devices

Virtual infrared remote devices refer to virtual devices that are used to simulate infrared signals of a home appliance remote control. A SwitchBot Hub Plus / Hub Mini is required in order to be able to create these virtual devices within the app.

Not yet implemented

Changelog

Support me

If you like my work, please feel free to provide a personal donation
(this is an personal Donate link for DutchmanNL, no relation to the ioBroker Project !)
Donate

WORK IN PROGRESS

  • (Dutchman) Initial alpha release, Physical devices showing/updated
  • (Dutchman) Only curtains can be controlled

License

MIT License

Copyright (c) 2021 DutchmanNL [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

This adapter allows you to control your all devices connected to you SwitchBot hub by cloud API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.3%
  • HTML 7.8%
  • CSS 1.9%