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

giu1io/homebridge-ankuoo-rec-switch: Homebridge plugin that integrates with Anku ...

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

开源软件名称:

giu1io/homebridge-ankuoo-rec-switch

开源软件地址:

https://github.com/giu1io/homebridge-ankuoo-rec-switch

开源编程语言:

JavaScript 100.0%

开源软件介绍:

homebridge-ankuoo-rec-switch

Homebridge plugin that integrates with Ankuoo Rec Switch

Update 2021-07-24

This package has been deprecated and the repository will be archived. I don't own a working Ankuoo Rec Switch anymore so I can't continue the development of this plugin. See the update below for more information and a possible path forward.

Update 2019-03-07

The correct decryption key has been found by ljalves (see this issue). If I can I will update the plugin to incorporate their work. In the meantime I advise you to take a look to the custom firmware that they developed for the switch that includes additional functionality like MQTT. That would make for a better integration with homebridge if you decide to use it.

Installation

  1. Install homebridge: npm install -g homebridge
  2. Install homebridge-rcswitch-gpiomem: npm install -g homebridge-ankuoo-rec-switch
  3. Update your homebridge configuration file.

Configuration

See sample-config.json

All fields are required.To determine the onCode and offCode for your switch you have to sniff the packets transmitted from the mobile app to the switch (protocol UDP, port 18530) when you turn on and off the switch. The packet content (hex) will have the following structure:

  • 0144 <- 2 bytes, constant
  • accf23xxxxxx <- 6 bytes, mac address of your device
  • 10 <- 1 byte, 10, length in bytes of the decrypted payload that follows
  • fd344f402a3f6299b530xxxxxxxxxxxx <- encrypted payload, 16 bytes this is your on/off code.

Fields:

  • accessory: Must be AnkuooRecSwitch (case sensitive)
  • name :: string :: What you want to call the switch. Keep in mind that Siri will prefer anything other than your homebridge switch if there's any confusion, so name it something unique
  • mac :: string :: the mac address of your switch
  • ip :: string :: the ip address of your switch (use a static ip)
  • onCode, offCode :: string :: see instruction above on how to find your codes.

FAQ

Can I use this plugin with more than one Ankuoo switch?

In theory it should work, however I haven't tested it because I only own one switch. If you find any issues please let me know I will try to fix them.

The switch is 'on' but my iPhone says it's 'off' (or vice versa)

With the knowledge I have right now (see next question) there's is not a reliable way to determine the switch status. The plugin assumes that all your switches are off when you start homebridge, then uses broadcast packets sent by the switch to keep track of the on/off status. If one of this packets gets lost or if the switch was on when you started homebridge, then the status will be inconsistent. To fix this turn off your switch and then restart homebridge.

Why do I have to sniff the packets to find the on/off codes?

The packet structure is known (source), because it's basically the same for all the manufactures that use yunext.com as a platform. However, the AES 128bit key used to encrypt the payload it's not the same ("0123456789abcdef"). If you find the key used to encrypt the payload please let me know and I will gladly update my plugin to not require this codes anymore. I would even rewrite it as a platform so you have to only set username and password and it does the rest by itself.

I'm not convinced of your explanation...

There is a post on my blog explaining everything that I have tried to get this to work. If you see something that I've missed, please let me know.




鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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