• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

newbishme/homebridge-switchbot-ble

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

newbishme/homebridge-switchbot-ble

开源软件地址:

https://github.com/newbishme/homebridge-switchbot-ble

开源编程语言:

TypeScript 100.0%

开源软件介绍:

@switchbot/homebridge-switchbot-ble

npm version npm downloads

The @switchbot/homebridge-switchbot-bleswitchbot is a nodejs module , and also a homebridge plug-in that directly controls SwitchBot products via BLE.

Now supports:

Installation

Installing bluetooth libraries

Ubuntu, Debian, Raspbian
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

See the document of the @abandonware/noble for other operating systems details.

Installing package

sudo npm install -g @switchbot/homebridge-switchbot-ble

You can also install it on the homebridge plugins page. homebridge-plugins-search

Configuration

Add this to your homebridge config.json file

"platforms": [
    {
        "platform": "SwitchBotPlatform",
        "name": "SwitchBotPlatform"
    }
]

If it work, add devices.

"platforms": [
    {
        "platform": "SwitchBotPlatform",
        "name": "SwitchBotPlatform",
        "devices": [
            {
                "type": "bot",
                "name": "Bot 2c",
                "bleMac": "d4:cc:43:97:ae:2c"
            },
            {
                "type": "bot",
                "name": "Bot 51",
                "bleMac": "e7:4d:36:cf:9e:51",
                "scanDuration": 2000
            },
            {
                "type": "curtain",
                "name": "Curtain 11",
                "bleMac": "ec:58:c5:d0:01:11",
                "scanDuration": 2000,
                "reverseDir": false
            }
        ]
    }
]

Requird Settings

  • devices - SwitchBot devices list.
  • type - Device type. Currently only supports bot and curtain.
  • name - Device name.
  • bleMac - Device mac address. You can find it in App settings.

Optional Settings

  • scanDuration - Scan timeout. BLE Central must first scan the advertising. Default is 1000(unit: ms). Longer time to ensure device discovery but slower response.
  • reverseDir - Set to true to exchange the "opened" and "closed" directions of Curtain after calibration. Default is false. So you can swap the directions without recalibration.

Please note that:

  1. The device name cannot be the same.
  2. Restart HomeBridge after updating the config file.
  3. The "opened" and "closed" directions of HomeKit are the same as those in Curtain and SwitchBot APP, but the percentage definitions are different. "Closed" is 0% in HomeKit but 100% in Curtain and APP.

Release Note

  • v1.2.0 (2020-11-6)
    • Add option for inverted curtain position. (Thanks to @whatUwant)
    • Fixed HomeKit control direction reversal issue.
  • v1.1.0 (2020-10-29)
    • Add support for Curtain.
  • v1.0.1 (2020-10-22)
    • First public release, supports Bot.

Community




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap