rahulmranjith / homekit

Homekit HAP-NodeJS - Integration of HAP-NodeJS with WS2812(NeoPixel) ,DHT11 ,SONOFF, Raspberry Pi Camera
MIT License
12 stars 0 forks source link
alexa-custom-skill alexa-skill camera hap-nodejs homekit humidity-sensor motion-sensor mqtt outlet rpi-camera sonoff

homekit with ESP8266 integration using MQTT - MRz

Homekit HAP-NodeJS - Integration of HAP-NodeJS with WS2812(NeoPixel) ,DHT11 Temperature/Humidity Sensor,SONOFF S20(ESP8266 based outlet)and PIR sensor.

This project uses existing HAP-NodeJS from HAP-NodeJS on Raspberry Pi.Changes are done for the following accessories :

These accessories are added as different file name with MRz added to the file/accessory.

RPi Setup :

MQTT Server using Mosca. forever installed for executing scripts in start up. MotionEye for RPi Camera . duckDNS used to access RPi remotely through port forwading.

Accessory Information :

HomeKit Installation The homekit installer downloads the HAP-NodeJS from the repository ,installs motion eye ,downloads the updated accesories, camera,accessory.js and updated HAPServer.js(fixed the notification unregistering problem),other npm modules

cd /home/pi/Desktop
sudo wget https://goo.gl/HZuiRI -O MRzInstaller
sudo sh MRzInstaller

This will take care of installing all the modules as required.

ESP8266 Integration

-For ESP8266 integration using the MQTT please do check ESP8266 MQTT MRz

Additional Changes :

sudo nano /etc/dhcpcd.conf

Add the following code to the last. This will set the IP of the pi as 192.168.1.99

interface eth0
static ip_address=192.168.1.199/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
interface wlan0
static ip_address=192.168.1.99/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

sudo nano /etc/modules

Add bcm2835-v4l2 to the end and reboot.

sudo nano /boot/config.txt

Add disable_camera_led=1 to the last line

sudo nano /etc/rc.local

Add

sudo forever start /home/pi/rmrz/HAP-NodeJS/CameraCore.js 
sudo forever start /home/pi/rmrz/duckdns.js

before exit 0