在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:seydx/homebridge-xiaomi-alarmswitch开源软件地址:https://github.com/seydx/homebridge-xiaomi-alarmswitch开源编程语言:JavaScript 100.0%开源软件介绍:homebridge-xiaomi-alarmswitch v2.1Homebridge dynamic platform plugin for Xiaomi Aqara Switches with morse code functionality This homebridge plugin exposes Xiaomi Aqara switches setted in config.json as switch accessory to HomeKit with morse code functionality! What means 'morse code'?Well, i'm using this switch for activating/deactivating my house alarm. Normally i need to single click the button for activating the alarm and double click for deactivating. But this seems not to be secure. Because of this, i have created this plugin to give these switches a special functionality!. Compatible switchesToken and switch/device IDIn order to work without any problems, this plugin uses the miio module for discovering and storing the gateway information in your persist folder. Because of this, it is not temporarely important to set the ip adress and/or token in the config.json file. But it is recommended if you have multiple gateways to choose a specific gateway! Installation instructionsAfter Homebridge has been installed:
Basic configurationTo use the plugin, add the following basic configuration to your config.json that configures homebridge in the platforms section:
After you've saved your config.json you can go ahead and launch homebridge and observe the logs. First runWith the above configuration homebridge will print the following logs:
Now, the plugin have stored all necessary information into your persist folder. To expose your switch, just copy the example config from your output and paste it into your config.json. If you want to enhance multiple switches, try the Advanced config.json below. Advanced config.json (for multiple switches)
See Example Config for more details. Functionality of the morse code
TypesThere are 3 types of accessories which can be assigned to the switches in the config.json.
Note: All types except type 3 are directly connected with the gateway alarm system. That means, if you "long click" the button you have assigned in the config.json the alarm will trigger on. If you give the morse code setted in config.json in right order and confirm it with a long click the alarm will trigger off. Type 3 (Programmable switch) uses the morse functionality, too. But it is not connected to the gateway alarm sytem. You can assign the single taps and double taps different automations or scenes in Apple HomeKit. But keep in mind, to activate the event on "single tap" you have to "long lick" the switch and for activating the "double tap" event you have to give the morse code and confirm it with a "long click". The advantage of type 3 is, it's up to you what you want to control with it. Options
See Example Config for more details. Supported clientsThis plugin has been verified to work with the following apps on iOS 11.3.1:
Known issues / TODOIssues /// TODO
ContributingYou can contribute to this homebridge plugin in following ways:
Pull requests are accepted. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论