-
Notifications
You must be signed in to change notification settings - Fork 40
(RPi) Add additional Sonoffs to HAP NodeJS HomeKit
This page has instructions on how to add a second (third, fourth, etc) sonoff to your HomeKit setup.
Make sure the Sonoff has the Tasmota firmware installed and has MQTT settings configured already. Topic has to be unique for each Sonoff. Follow this part of the video to configure each Sonoff properly.
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 cp SonoffMQTT_accessory.js SonoffMQTT2_accessory.js
This command downloads a second Light Accessory file so that you can have a second light accessory.
Change SonoffMQTT2 to SonoffMQTT3, SonoffMQTT4, etc. if you are doing this for a 3rd, 4th, etc setup.
Run this command: sudo nano SonoffMQTT2_accessory.js
This will open nano to edit the file to change the file to indicate the new MQTT topic and as well as name, etc.
Change SonoffMQTT2 to SonoffMQTT3, SonoffMQTT4, etc. if you are doing this for a 3rd, 4th, etc setup
Next, scroll down to line 10.
Change the 'name' to what you would like to see the Sonoff as in HomeKit
Next, scroll down to line 11.
Change the 'sonoffUUID' to something different than any of your other accessories
I usually just add the name of this accessory to the end along with one random number, does the job.
(OPTIONAL STEP UNLESS YOU USE CORE.JS) Next, scroll down to line 12.
Change the 'sonoffUsername' to something different than any of your other accessories. Change a number or letter to make it different.
Completing these steps finishes the process of adding another Sonoff to your HomeKit setup. Hope that helps!