An esp8266 powered ac toggle controller with HomeKit support powered by Homebridge.
This project uses PlatformIO to manage dependencies and build process. See https://platformio.org/platformio-ide for installation instructions.
Setup:
- Create an
auth.h
file based on thesrc/auth.h-template
file and define a secure alphanumeric username and password. - Review the GPIO pins defined in
src/settings.h
and adjust as required.
Build:
pio run
Upload
pio run -t upload
Monitor Serial
pio device monitor
You may need to adjust the upload_port
and monitor_port
in the platformio.ini
file. You can list the available devices using:
pio device list
If you just want to install the plugin, search for and install @oznu/homebridge-esp8266-ac-toggle.
sudo npm install -g @oznu/homebridge-esp8266-ac-toggle
The Homebridge plugin is located in the ./homebridge
directory.
cd homebridge
TypeScript needs to be compiled into JavaScript before it can run. The following command will compile the contents of your src
directory and put the resulting code into the dist
folder.
npm run build
Run this command so your global install of Homebridge can discover the plugin in your development environment:
npm link
You can now start Homebridge, use the -D
flag so you can see debug log messages in your plugin:
homebridge -D
If you want to have your code compile automatically as you make changes, and restart Homebridge automatically between changes you can run:
npm run watch