Skip to content

(RPi) Add additional Light accessory to HAP NodeJS

Amruth Pabba edited this page Apr 8, 2017 · 2 revisions

Hey, welcome to the additional Light Accessory tutorial!

This page has instructions on how to add a second (third, fourth, etc) Light file.


The first command you want to run is: cd /home/pi/HAP-NodeJS/accessories

This command returns you to HAP-NodeJS accessories folder.


The second command you want to run is: sudo wget https://goo.gl/Zgjpwx -O Light2_accessory.js

This command downloads a second Light Accessory file so that you can have a second light accessory. Change Light2 to Light3, Light4, etc. if you are doing this for a 3rd, 4th, etc setup.


Next you want to run this command: sudo nano Light2_accessory.js

This will open nano to edit the file to change the file to indicate the new relay pin. Change Light2 to Light3, Light4, etc. if you are doing this for a 3rd, 4th, etc setup.


Next you want scroll down to line 7.

Change the number 16 to whatever pin your new relay is on. Make sure the number is the physical pin number, not BCM pin number.


Completing these steps finishes the process of adding another light accessory to your pi. Hope that helps!