https://github.com/robertklep/onvif2mqtt
ONVIF2MQTT — subscribe to ONVIF events and publish them to MQTT
https://github.com/robertklep/onvif2mqtt
Last synced: 9 months ago
JSON representation
ONVIF2MQTT — subscribe to ONVIF events and publish them to MQTT
- Host: GitHub
- URL: https://github.com/robertklep/onvif2mqtt
- Owner: robertklep
- Created: 2023-04-09T10:40:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-10T16:29:30.000Z (over 3 years ago)
- Last Synced: 2025-02-15T02:43:05.916Z (over 1 year ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ONVIF2MQTT
This project can be used to connect to IP-camera's supporting ONVIF events and publish all reported events to an MQTT broker.
## Installing and running
```shell
# clone repository
$ git clone https://github.com/robertklep/onvif2mqtt
$ cd onvif2mqtt
# create a configuration file from the provided example
$ cp config.example.yml config.yml
$ vi config.yml
# (optional) edit docker-compose.yml
$ vi docker-compose.yml
# create Docker image
$ docker-compose build
# start Docker container in detached mode
$ docker-compose up -d
```
For the first run and/or to test the configuration, enable the `DEBUG` environment variable in `docker-compose.yml` and run the container in attached mode (by not using `-d`).
## MQTT topics
MQTT topics used (assuming the default `onvif2mqtt` prefix):
* `onvif2mqtt/status`: retained message that holds the current online/offline status of ONVIF2MQTT
* `onvif2mqtt/camera/CAMERA/info`: published when connection to camera is established, contains device information
* `onvif2mqtt/camera/CAMERA/event/EVENT`: published when `EVENT` occurs on `CAMERA`. The name of the event, and its value, will be camera-dependent.
* `onvif2mqtt/camera/CAMERA/event`: JSON-string with event information
## Configuration
See `config.example.yml` for an example configuration file.