homebridge-http-mqtt-motion
This plugin allows HTTP requests to trigger homebridge-camera-ffmpeg motion alerts.
Note that this plugin itself does not expose any devices to HomeKit.
Installation
- Install Homebridge using the official instructions.
- Install homebridge-camera-ffmpeg using
sudo npm install -g homebridge-camera-ffmpeg --unsafe-perm
. - Install this plugin using
sudo npm install -g homebridge-http-mqtt-motion
. - Update your configuration file. See configuration sample below.
Usage
Make an HTTP request to the server with the path starting as either motion
or reset
to trigger or clear the motion respectively, and the next segment of the path being your URL encoded camera name, as configured in homebridge-camera-ffmpeg.
http://raspberrypi.local:8080/motion/Cat%20%Food%20Camera
will send a motion alert to the camera 'Cat Food Camera'.
http://raspberrypi.local:8080/reset/Cat%20%Food%20Camera
will clear the motion alert to the camera 'Cat Food Camera'.
Configuration
Edit your config.json
accordingly. Configuration sample:
"platforms": [
{
"platform": "httpMqttMotion",
"mqtt_server": "10.0.1.190",
"mqtt_port": 1883,
"mqtt_topic": "homebridge/motion",
"http_port": 8080
}
]
Fields | Description | Required |
---|
platform | Must always be httpMqttMotion . | Yes |
mqtt_server | The address of your MQTT server. (Default: 127.0.0.1) | No |
mqtt_port | The port of your MQTT server. (Default: 1883) | No |
mqtt_topic | MQTT topic that homebridge-camera-ffmpeg is subscribed to. (Default: homebridge/motion) | No |
http_port | The port to listen to HTTP requests on. (Default: 8080) | No |