homebridge-velux-kfx210
v2.0.3
Published
A Homebridge plugin integrating with a Velux KFX 210 control panel via RaspberryPi + Pimoroni Automation HAT.
Maintainers
Readme
homebridge-velux-KFX210
A Homebridge plugin integrating with a Velux Smoke Vent KFX 210 control panel via RaspberryPi + Pimoroni Automation HAT.
Aim
Provides:
- contact sensor for alarm state
- contact sensor for error state
- open/close switch for comfort mode
The Pimoroni Automation HAT is controlled via the provided Python API with some extremely simple Python scripts which are spawned as required by this NodeJS plugin.
The KFX 210 control panel does not provide the ability to sense the current open/close comfort state of the smoke vent. The state for this plugin defaults to closed on startup, so if you ensure the vent is indeed closed at this point AND only use this plugin to open/close, the state will remain in sync.
Otherwise, you can use a separate Homekit sensor to maintain track of the vent comfort state.
Installation
- Install Homebridge on the Raspberry PI: https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Raspbian
- Install this plugin using:
sudo hb-service add homebridge-velux-kfx210 - Ensure
python. - Install automation hat support:
https://github.com/pimoroni/automation-hatas a user with sudo access (to allow system install):git clone https://github.com/pimoroni/automation-hatcd automation-hat./install.sh
- ALSO install automation hat support running in the
homebridgeuser shell (to allow homebridge access to the virtual environment):sudo -u homebridge -H bashand then:cd /home/homebridgegit clone https://github.com/pimoroni/automation-hatcd automation-hat./install.sh(ctrl-c the steps requiring sudo access as these were done in the last step)
- Update the
homebridge-velux-kfx210plugin configuration See a sampleconfig.jsonsnippet below.- NOTE: Make sure to set the
homebridge-velux-kfx210pluginpython_pathproperty to usepimoronivirtual environment python installation (see example below).
- NOTE: Make sure to set the
Configuration
Example config.json entry:
"platforms": [
{
"platform": "KFX210",
"state_poll_interval": 3,
"comfort_switch_time": 0.5,
"python_path": "/home/homebridge/.virtualenvs/pimoroni/bin/python"
}
]Where:
state_poll_intervalis the polling interval in seconds for thealarmanderrorstates. Default is3.comfort_switch_timeis the time in seconds for the comfort open or close relay to be switched on. Default is0.5.python_pathis the path to python for invoking automation HAT API. This should point to the virtual environment created by the Pimoroni automation hat installer when running as thehomebridgeuser. Default is/usr/bin/python.
NOTE: The comfort_switch_time should be set to 0.5 seconds to simulate a momentary push of a comfort button.
Any longer and it will be treated as a button hold and therefore should be set to several seconds.
Velux Integration
The pinout for the Automation HAT is available here
The installation manual for Velux control panel (PDF) provides connector block information.
- Connect 5V from Automation HAT to the Common Terminals on Alarm (terminal 4) and Error (terminal 2) Velux connector blocks.
- Connect Alarm output (terminal 5) on Alarm Velux connector block to Buffered Input 1 on the Automation HAT.
- Connect Error output (terminal 3) on Error Velux connector block to Buffered Input 2 on the Automation HAT.
- Connect terminal 1 on Comfort Velux connector block to Normally Open Relay 1 on the Automation HAT.
- Connect terminal 2 on Comfort Velux connector block to Normally Open Relay 2 on the Automation HAT.
- Connect terminal 3 on Comfort Velux connector block to Common on Relay 1 and Relay 2 on the Automation HAT.
