在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:krvarma/HomeKit-and-Particle-Photon开源软件地址:https://github.com/krvarma/HomeKit-and-Particle-Photon开源编程语言:C++ 67.4%开源软件介绍:HomeKit and Particle Photon integrationIntroduction After viewing this great example by Nikita Leonov, I too decided to work on HomeKit and Particle Photon. I decided to simulate Temperature, Humidity and Luminosity sensor and one Light. Here is the sample I completed. Here in this sample, I am using Homebridge and HAP-NodeJS to emulate HomeKit API. Homebridge is a shim around HAP-NodeJS. HAP-NodeJS is a Node.js implementation of HomeKit Accessory Server. Homebridge supports 2 types of shims, accessory and platforms. Accessory is a single or multiple accessory device. Platform a bridge to another system. In HAP-Node-JS each accessory has require Characteristics which must be implemented by the Accessory and some optional Characteristics which is optional. For this sample I created an accessory which emulates 4 devices, Temperature Sensor, Humidity Sensor, Luminosity Sensor and a Light. The Light supports brightness and hue characteristics. My Homebridge app is running on my Macbook Pro (you can Raspberry Pi or any Linux system also, I tried to compile Homebridge under Cygwin but failed). DHT22 sensor is used to read Temperature and Humidity, TSL2561 sensor is used for luminosity. To simulate light I am using a simple RGB Led. The Photon firmware reads Temperature, Humidity and Luminosity sensor values and publish an event at every 5 seconds. The Particle Accessory listens for this events and whenever it is received, update the Characteristics. To control the light, the accessory calls Photon exposed functions to turn on/off, adjust brightness and set hue. Wiring
How to run
Screenshots Demo Video Controlling a Light using HomeKit application https://www.youtube.com/watch?v=WPh9WSYANxc Using Siri to control light https://www.youtube.com/watch?v=XW9OVdhOnjU |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论