This plugin integrates with Homebridge to create a switch that can automate other accessories and platforms.
libpcap-devis installed on your system
Installation is via npm.
npm install -g homebridge-dash
If you encounter an error you may need to run the following command instead.
sudo npm install -g --unsafe-perm homebridge
config-sample.json for an example on how to configure the plugin. You can configure as many buttons as you wish.
Homebridge must be run with elevated privileges to work correctly i.e. sudo or root.
If this freezes the wlan on your Raspberry Pi you may need to use a different Wi-Fi dongle. I've had success with this one.