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

renssies/homebridge-am43-blinds: A homebridge plugin to control the AM43 based b ...

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

开源软件名称:

renssies/homebridge-am43-blinds

开源软件地址:

https://github.com/renssies/homebridge-am43-blinds

开源编程语言:

JavaScript 100.0%

开源软件介绍:

This plugin is considered a work in progress, it works, but it has some stability issues. See "Known Issues" and "Troubleshooting" below.

Homebridge AM43 Blinds

A homebridge plugin to control the AM43 based blind motors in HomeKit, these include the A-OK, Zemismart, Upndown and other blinds motors that use Bluetooth and the Blinds Engine app.

This Homebridge plugin uses the Bluetooth on your computer to search for, and connect to the AM43 blinds.

Requirements

This plugin requires Node version 10 or newer and Homebridge version 0.4.46 or newer. Homebridge version 1.0 is recommended.

It also requires that the machine that hosts Homebridge has a Bluetooth radio that supports the Bluetooth Low Energy (BLE) protocol. Most machines with Bluetooth 4.0 or newer support this protocol. This includes Macs (that support AirDrop) and Raspberry Pi version 3 or newer. Some systems might also work with an external Bluetooth 4.0 USB adapter. For compatibility check the noble package that is used by this plugin.

Bluetooth adapters with the CSR8510 chipset are supported by most systems, including Raspberry Pi with Raspberry Pi OS.

Installation

First make sure to set up the blinds using the blinds engine app, including the upper and lower limit. Kill the app after the setup is finished. Having the app open will make the blinds invisible to this plugin.


When running Homebridge on Debian, Ubuntu, or Raspberry Pi you will first need to follow the following steps. macOS Users can skip these steps.

  1. Install bluetooth packages: sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
  2. Give node/homebridge permission to use bluetooth: sudo setcap cap_net_raw+eip $(eval readlink -f $(which node))

Step 1 must be completed before you can continue with npm install.


The plugin can be installed using the homebridge-config-ui-x or by using the following command:

npm install -g homebridge-am43-blinds

If you have issues installing the plugin, add --unsafe-perm to the install command mentioned above.

After that you will need to enter the following details into the ~/.homebridge/config.json:

{
  "platforms":[
         {
             "platform": "am43-blinds",
             "allowed_devices": []
         }
     ]
 }

Now start or restart homebridge and watch the logs. Homebridge will report that any AM43 motors that have been found will not be usable until added to the allowed_devices array. The log will also tell you the identifier of the motor to use. After adding the identifier the config should look a little something like this:

     {
         "platform": "am43-blinds",
         "allowed_devices": ["02-86-68-35-3c-51"]
     }

Please note that the identifiers in allowed_devices might be different depending on the platform you're on. However, they should be the same between system reboots.

Debugging

Running homebridge with DEBUG=AM43 should cause motor-level debug logs to be output.

So to run homebridge in debug mode use the command DEBUG=AM43 homebridge -D to log debug messages of the AM43 plugin. Or DEBUG=* homebridge -D to log messages of all plugins.

The logs can be found in ~/.homebridge or any custom folder you've specified. They should also be available in the Homebridge Config UI (if homebridge-config-ui-x is installed)

Known Issues

  • The plugin hasn't been tested thoroughly but it does seem to work on most platforms that have Bluetooth 4.0.
  • When setting up the motor you have to enter a password, however, it doesn't seem to be used in the Bluetooth calls I use in this plugin. This might become an issue later.

Todo

  • Implement support for the Solar Panels light sensor, mine seems broken so I've ordered a new unit.

Troubleshooting

There are some issues with the plugin, but try the following tips before making an issue:

Move the homebridge device closer to the motor or use an external adapter.

Some devices have a very bad Bluetooth range. Some Raspberry Pi boards reportedly only have a range of 3 meters (10 feet). In some houses, the technical rooms or rooms with the incoming connections can also have a type of fireproofing which lowers the range of Bluetooth and wifi even more.

If moving the homebridge device closer isn't an option you can always use a compatible external Bluetooth dongle. Do make sure the dongle supports Bluetooth version 4.0 or newer. You can combine this with a USB extension cable to get the desired range. A Bluetooth dongle with the CSR8510 chipset is supported by most Linux distributions, including Raspberry Pi OS.

When using an external dongle on Linux (including Raspberry Pi) you will have to switch it manually. On Raspberry Pi you can follow these steps. For other linux platforms see here for more details. You will need to make sure the NOBLE_HCI_DEVICE_ID environment variable is set correctly before or when homebridge launches.

On Raspberry Pi you can disable the built-in bluetooth by placing dtoverlay=disable-bt inside /boot/config.txt on the root of the Raspberry Pi and rebooting the Raspberry Pi.

Some other device is using the blinds motor

The blinds motor only supports one connection. So before it can be found and used by homebridge you will have to force stop the blind engine app and make sure no other homebridge instance is connecting to the motor.

If this doesn't work turn off Bluetooth on the devices that use and have used the blind engine app.

The motor gets into the "No response" state after working before.

This is likely because your homebridge device has issues reconnecting to the device after it is disconnected to save power. You can add hap_interaction_timeout with a value of 0 to the config.json. However, this does mean the motor will use more power and it might deplete the battery faster than the solar panel can charge it.

Thanks

I have to thank buxtronix/am43, binsentsu/am43-ctrl and TheBazeman/A-OK-AM43-Blinds-Drive for the resources to get this plugin working.

Also thanks to these contributors:




鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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