当前位置: 首页 > 软件库 > 其他开源 > 物联网 >

homebridge-switchbot-for-mac

授权协议 MIT License
开发语言 JavaScript
所属分类 其他开源、 物联网
软件类型 开源软件
地区 不详
投 递 者 萧波峻
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Homebridge SwitchBot

Homebridge SwitchBot is plugin for Homebridge that allows you to manage SwitchBot (the Bot) like a switch accessory on the Home app.

Supported SwitchBot devices

Supported OS versions

macOS

  • macOS version 10.15 or later
  • Install Xcode

Big Sur

Set to manually grant Bluetooth access in System Preferences UI for Security & Privacy -> Privacy to the node executable.The symlink part is important. If you installed node via homebrew, you cannot grant Bluetooth privileges to /usr/local/bin/node, but have to target /usr/local/Cellar/node/x.x.x/bin/node explicitly.

Raspbian(Linux-based OS)

  • Kernel version 3.6 or later
  • libbluetooth-dev
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

If @abandonware/noble is installed properly, this module might work well on other Linux-based OSes, such as Ubuntu, Debian and so on. See the document of the @abandonware/noble for details.

Dependencies

Installation

Install the npm package:

sudo npm install -g --unsafe-perm homebridge-switchbot-for-mac

How to Use

Find your SwitchBot's MAC address (BLE MAC) with the official iOS/Android app, and add an accessory definition to ~/.homebridge/config.json:

e.g. Use one SwitchBot

{
    "accessories": [
        {
            "accessory": "SwitchBot-For-Mac",
            "name": "Switch",
            "delay": 5000,
            "retries": 3,
            "macAddress": "01:23:45:67:89:AB",
            "ping": {
                "ipAddress": "127.0.0.1",
                "interval": 2000,
                "retries": 1,
                "timeout": 1000
            }
        }
    ]
}

e.g. Use two SwitchBots

{
    "accessories": [
        {
            "accessory": "SwitchBot-For-Mac",
            "name": "Switch",
            "delay": 5000,
            "retries": 3,
            "on": {
                "macAddress": "CD:E0:12:34:56:78"
            },
            "off": {
                "macAddress": "9A:BC:DE:01:23:45"
            },
            "ping": {
                "ipAddress": "127.0.0.1",
                "interval": 2000,
                "retries": 1,
                "timeout": 1000
            }
        }
    ]
}

Settings

Property Type Required Default Value Description
accessory String Required - This value is "SwitchBot-For-Mac"
name String Required - Set the name of the switch.
delay Integer Optional 0 Set a delay between 0 and 30000 milliseconds for waiting for Bluetooth initialization.
retries Integer Optional 3 Set the turn retry times to more than 0 times.

Use one SwitchBot Settings

Settings for switching on/off using one SwitchBot.

Property Type Required Default Value Description
macAddress String Required - Set the MAC address of the SwitchBot.

Use two SwitchBots Settings

Settings for switching on/off using two SwitchBots.

Property Type Required Default Value Description
on.macAddress String Required - Set the MAC address of the SwitchBot for on.
off.macAddress String Required - Set the MAC address of the SwitchBot for off.

Advanced - Ping Settings

Settings for update the status with ping communication.
You can only set it if you can using ping to determine if the device is on or off.
Otherwise, do not set it.

Property Type Required Default Value Description
ping.ipAddress String Required - Set the IP address of the target device.
ping.interval Integer Optional 2000 Set the ping interval to more than 2000 milliseconds.
ping.retries Integer Optional 1 Set the ping retry times to more than 0 times.
ping.timeout Integer Optional 1000 Set the ping timeout to less than interval / (retries + 1) milliseconds.
  • 导航 (返回顶部) 1. homebrew介绍 1.1 简介 1.2 争议 1.3 数据采集 2. 安装 2.1 Homebrew默认安装目录 2.2 官网安装脚本 2.3 国内安装脚本 2.4 使用科大源安装 3. 修改源 3.1 查看当前源 3.2 修改为阿里源 3.3 替换为清华源 3.4 替换为中科大源 3.5 腾讯源 3.6 重置为官方源 4. 使用homebrew 5. 软件列表 1.

  • Mac OS X El Capitan上安装Python自动化测试框架 1,查看当前系统默认的Python路径 which python ==> /usr/bin/python 2,查看当前python 版本 python ==> Python 2.7.10 (default, Oct 23 2015, 19:19:21) 3,安装 python 的包管理工具pip curl https://bo

  • 注意 我的环境是macOS Catalina Version 10.15.2。请注意时效性。 第一步,安装Command Line Tools 到 https://developer.apple.com/download/more/?=for%20Xcode 安装最新版的Command Line Tools。即使你装了最新版的Xcode,后续仍可能报错。 第二步,给pkg-config加权限 #

  • Homebrew官网 http://brew.sh/index_zh-cn.html 官网安装 Homebrew的安装很简单,mac自带ruby环境,只需在终端下输入如下指令即可完成Homebrew的安装,如果以下链接失效可以去官网看看新的链接: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/mas

  • 1、Homebrew (mac和linux均可使用的软件安装控制) 链接https://brew.idayer.com/guide 步骤 1、设置镜像 export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git" export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.us

  • 1. Homebrew国内如何自动安装(国内地址)(Mac & Linux) - 知乎 上述大佬直接集成了,在命令行中 复制粘贴下述一行代码直接下载安装homebrew: /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"  2. HomeBrew的用法:(下述官方文档) m

 相关资料
  • homebridge-switchbot The Homebridge SwitchBot OpenAPIplugin allows you to access your SwitchBot Device(s) from HomeKit with Homebridge. Installation Search for "SwitchBot" on the plugin screen of Home

  • @switchbot/homebridge-switchbot-ble The @switchbot/homebridge-switchbot-ble is a nodejs module , and also a homebridge plug-in that directly controls SwitchBot products via BLE. Now supports: SwitchBo

  • Homebridge SwitchBot OpenAPI Pleas visit homebridge-switchbot, the new switchbot plugin.

  • Homebridge SwitchBot Button Presser A Homebridge plugin for SwitchBot Button Presser. Requirements Currently only Linux is supported gatttool needs to be installed Installation Install the npm package

  • ffmpeg for homebridge This project provides static ffmpeg binaries for multiple platforms and architectures for use with Homebridge. Audio support using libfdk-aac Hardware decoding on the Raspberry P

  • Homebridge MacOS Homebridge plugin to track Mac OS events (screen on / off) Installation Install the plugin sudo npm install @eliottrobson/homebridge-macos -g --registry "https://npm.pkg.github.com"ln