Skip to content

(CHIP) Start HAP on Reboot

Amruth Pabba edited this page Mar 30, 2016 · 1 revision

Hey, welcome to the HAP-NodeJS boot tutorial page!

This page has instructions on how to start HAP-NodeJS during boot, on your CHIP!

Ensure your HAP-NodeJS directory is /home/chip/HAP-NodeJS... If you used my video to install, you should be fine.


The first command you want to run is: cd ~

This command returns you to your home directory.


The second command you want to run is: sudo npm install forever -g

This command starts the installation process. This can take 5-10 minutes. If it takes longer, reboot your CHIP


The third command you want to run is: sudo nano /etc/rc.local

This command opens nano and allows you to edit the rc.local file


Now, you want to add code before the "exit 0" line. Add this line before "exit 0":

forever start /home/chip/HAP-NodeJS/BridgedCore.js

Be sure to change BridgedCore.js to Core.js if you are using Core.js. If you don't know what Core.js is, you can ignore this step. This tells CHIP to start HAP-NodeJS at startup


Save and exit the rc.local file once you are done. Then, reboot your CHIP and HAP-NodeJS should automatically start!

Learn more about forever here.