Allows to set Netatmo Energy away/schedule mode. Created for Homebridge hosted on Raspberry Pi.
- Create an app in https://dev.netatmo.com/apps
- Clone repository to directory /home/pi
- Enter your credentials in
credentials.json
- Install Homebridge to your Raspberry Pi https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Raspbian
- Set homebridge user as directory owner:
sudo chown homebridge /home/pi/rpi-homekit-hub -R
- Install homebridge-script2 plugin https://github.com/pponce/homebridge-script2#readme
- Add this configuration to your homebridge-script2 plugin in Homebridge interface:
{ "accessory": "Script2", "name": "Netatmo \"away\" state", "on": "cd /home/pi/rpi-homekit-hub && npm run --silent set-on", "off": "cd /home/pi/rpi-homekit-hub && npm run --silent set-off", "state": "cd /home/pi/rpi-homekit-hub && npm run --silent status", "fileState": "/home/pi/rpi-homekit-hub/script.flag", "on_value": "ON" }
- Scan QR code in Homebridge
http://{raspberry_ip_address}:8581
- You're all set!
- Get state
npm run status
- Set "away" mode ON
npm run set-on
- Set "away" mode OFF
npm run set-off