在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:shnhrrsn/homebridge-openzwave开源软件地址:https://github.com/shnhrrsn/homebridge-openzwave开源编程语言:TypeScript 99.0%开源软件介绍:homebridge-openzwaveOpenZWave platform for Homebridge. The main goal of this project is to map Z-Wave protocol command classes to HomeKit Accessories, Services, and Characteristics. Theoretically, it should make it support any Open Z-Wave device. This project was initially forked from velocityzen/homebridge-platform-zwave and has been completely rewritten in TypeScript. Supported Z-Wave Command Classes
Requirements
In addition to OpenZwave, be sure to install the ozw dev package: For Ubuntu/Debian: sudo apt install libopenzwave1.5-dev For Alpine: sudo apk --no-cache add openzwave-dev Installation
ConfigurationIn order to use this plugin, you’ll need to add the following JSON object to your Homebridge config file: {
"platform": "openzwave",
"name": "OpenZWave",
"zwave": {
"devicePath": "/dev/ttyACM0"
}
}
Finding Your DeviceTo locate your Z-Wave controller, try running If you’re unable to figure out the correct device, try unplugging it and running the commands above, after that, plug it back in and look for the additional device that wasn’t there before. AccessoriesThe accessories config object allows you to customize how your devices appear and behave within HomeKit. {
"platform": "openzwave",
"name": "Z-Wave Platform",
"zwave": {
"devicePath": "/dev/ttyACM0"
},
"accessories": {
"3": {
"name": "My Fan Control",
"classes": {
"ignored": [128],
"rewrite": [{ "from": 38, "to": 999001, "indexes": { "5": 0 } }]
},
"hints": ["fan"]
}
}
}
Excluding Accessories from HomeKitIf you have Z-Wave nodes you’d wish to exclude from HomeKit, you can hide them by setting the accessory to false: {
"platform": "openzwave",
"name": "Z-Wave Platform",
"zwave": {
"devicePath": "/dev/ttyACM0"
},
"accessories": {
"3": false
}
} Device Handlers
For more information on device handlers, see the README. DevelopmentEnvironmentAll development tooling dynamically configures OpenZWave through a A Tools
Emulated DevelopmentYou can run the testharness with a docker flag to launch an Z-Wave emulator with test devices. yarn testharness --docker Remote DevelopmentIf your Z-Wave Controller is plugged into a different machine, you can access it remotely via
To get started, run this on the machine that your Z-Wave Controller is plugged into: docker run --rm -ti --privileged -p 32375:32375 -v /dev:/host/dev \
alpine/socat -d -d tcp-l:32375,reuseaddr,fork file:/host/dev/ttyACM0,raw,nonblock,echo=0
Next, when launching the testharness on your local machine, pass through a yarn testharness --remote=$IP_OF_REMOTE_MACHINE:32375 The testharness will handle launching socat on your local machine and configuring |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论