NVR like user interface for RTSP capable cameras.
npm install infraspec.ui
sudo npm install -g camera.ui@latest
`
Documentation
- camera.ui
- Installation
- Documentation
- Configuration
- Defaults
- Usage
- Dashboard
- Cameras
- Camera
- Recordings
- Notifications
- Camview
- Log
- Config
- Utilization
- Settings
- HomeKit
- Motion detection
- Videoanalysis
- HTTP
- MQTT
- SMTP
- FTP
- Image Rekognition
- Notifications
- PWA
- Service Mode
- Supported clients
- Browser
- Supported Cameras
- Camera Settings
- API
- FAQ
- Contributing
- Troubleshooting
- Wiki
- License
- MIT License
Configuration
camera.ui installs itself in the user directory under ~/.camera.ui.
The database, recordings as well as config.json are stored locally in this folder and are never accessible to others. The settings can be changed directly with the help of an editor, or directly via the interface.
After the installation you can start camera.ui with the following command in the terminal
`
camera.ui
`
-D, --debug: Turn on debug level logging
-C, --no-color: Disable color in logging
-T, --no-timestamp: Do not issue timestamps in logging
--no-sudo: Disable sudo for updating through ui
--no-global: Disable global (-g) prefix for updating through ui
-S, --storage-path: Look for camera.ui files at [path] instead of the default location (~/.camera.ui)'
Defaults
Once you have installed and configured it you can access the interface via http://localhost:8081.
The default username is master and the default password is master. When you log in for the first time, camera.ui will ask you to change your username and password.
Usage
$3
The Dashboard is the main page of the interface and offers a variety of widgets to customize it as you like. The widgets will expand over time. At the moment the following widgets are available for the dashboard: Time, Weather, Uptime, Camera, Notifications, RSS Feed, Status, Charts (CPU Load, CPU Temperature, Memory Load), Shortcuts and Log
$3
Here are all cameras listed by room and show the current snapshot as a cover sheet
$3
If you select a camera you can watch the livestream directly in the browser. With the camera.ui player you can pause the stream, turn audio on/off or reload the stream.
$3
All images or videos recorded by motion are listed here. If AWS Rekognition is used, the label for the recording is also displayed, as well as the date and time. Using the filter function, the recordings can be filtered as desired
$3
All motion events as well as system messages can be viewed here. Each notification has one or more labels to better catagorize them. The filter function can also be used to filter the notifications as desired.
$3
Camview displays all camera streams in tiles, hiding everything unnecessary. Camview is great for giving a direct insight into the cameras. Also here the streams can be paused by the camera.ui video player, audio can be switched on/off, streams can be reloaded or viewed in full mode.
$3
All events that occur in the backend can be monitored via the built-in log. In addition, the log can be also be cleared or downloaded here.
$3
Using the built-in editor you can easily edit your config.json. In addition, any errors are immediately displayed and thus avoided to save a faulty config.json
$3
"Utilization" shows you a graphical overview of the system utilization. Here you can see in real time how high the CPU utilization is, how high the CPU temperature is and how much memory is still free.
$3
On the settings page you can make ALL settings regarding your config.json and database. All parameters defined in config.json are directly configurable from this page. If camera.ui runs via "Homebridge" you can also set Homebridge relevant parameters here.
HomeKit
The cameras that are included in camera.ui can easily be exposed to Apple Home via Homebridge.
To do this, please install homebridge-config-ui-x and search for the plugin homebridge-camera-ui and install it.
If you run camera.ui via Homebridge, then the interface will also be started automatically on every startup. An additional Service Mode is no longer needed.
If you have used camera.ui before WITHOUT Homebridge and then use it with Homebridge, then the database must be recreated and also the config is taken over by Homebridge. You have to add the cameras again to Homebridge. After restarting Homebridge, the cameras will be also available on camera.ui
Homebridge-config-ui-x offers some more config parameter to eg. enable HSV, motion sensors, motion switches and more. Please take a look at the example-config.json
_Note:_ homebridge-camera-ui >= v5.0.0 is compatible with camera.ui.
Motion detection
camera.ui offers a variety of options to detect and process motion.
$3
With this option camera.ui connects to the stream and compares frame by frame if there are changes. The zones and sensitivity can be set in the interface.
$3
If the HTTP server is enabled for motion detection, calling the link can easily trigger motion.
Example:
http://localhost:8123/motion?My+Camera
$3
If you have set up the MQTT client (Settings > System > MQTT), you can set the required parameters such as "Motion Topic", "Message" etc. via the interface (Settings > Cameras > MQTT).
Motion Topic: The MQTT topic to watch for motion alerts. The topic (prefix/suffix) should be unique, it will be used to assign the motion detected message to the desired camera.
Motion Message: The message to watch for to trigger motion alerts.
The message can be a simple "string" (e.g. "ON"/"OFF) or a JSON object. If the MQTT message is a JSON object like:
`json
{
"id": "test",
"event": {
"time": 1234567890,
"state": true
}
}
`
Then define the exact parameter under "Motion Message" so that camera.ui can read from it, eg:
`json
"motionMessage": {
"event": {
"state": true
}
}
`
$3
If the SMTP server is turned on and your camera is able to send an email when motion is detected, you can easily trigger motion through it, eg:
From: My+Camera@camera.ui
To: My+Camera@camera.ui
Please note that the camera.ui SMTP server is set in the camera settings (ip/port).
$3
If your camera is able to upload an image when motion is detected, then you can select the camera.ui FTP server as the destination. Very important here is. The path you enter via the camera's own settings page must be the camera name as defined in config.
Every time the camera tries to connect to the server, the camera.ui detects and takes the entered path to determine the camera.
Image Rekognition
camera.ui also uses image rekognition with Amazon Web Services to analyse, detect, remember and recognize objects, scenes, and faces in images. You can enable for each camera the image rekogniton and you can even set labels for each camera. For each object, scene, and concept the API returns one or more labels. Each label provides the object name. For example, suppose the input image has a lighthouse, the sea, and a rock. The response includes all three labels, one for each object.
This makes it possible to analyze every movement before this is stored or sent as a notification.
To use image rekognition, you need to set up a AWS account with an IAM user. More Infos: AWS Image Rekognition
Notifications
camera.ui supports numerous notification options. Each of them can be conveniently set via the interface.
Since push notifications only work conditionally for websites (see PWA), you can easily work around this via third-party providers.
These would be e.g.
- Telegram
- Webhook
- Alexa
- Third party providers that support Alexa
Via Telegram, you even have the option to send picture or video along with text messages.
PWA
camera.ui is a full-featured PWA (Progressive Web Application). The PWA offers several advantages over a normal web page. Via Windows/macOS/Android the browser can directly send you push notifications natively. The handling of the page becomes much faster and much more.
To "enable" PWA you need to run the page over HTTPS. In the config.json you can provide your own SSL key and certificate to run camera.ui over HTTPS.
Service Mode
To let camera.ui run permanently in the background, you can use it in Service Mode.
Create a new file named camera.ui.default and paste the following into it:
`
CAMERA_UI_OPTS=-D -C -T -S "/home/pi/Desktop/.camera.ui/"
CUI_STORAGE_PATH="/home/pi/Desktop/.camera.ui/"
DISABLE_OPENCOLLECTIVE=true
`
Please make sure to change the path if necessary. Put the camera.ui.default file to /etc/default/ folder
Then create another file named camera.ui.service and add the following:
`
[Unit]
Description=camera.ui
After=syslog.target network-online.target
[Service]
Type=simple
User=pi
EnvironmentFile=/etc/default/camera.ui
ExecStart=/home/pi/Desktop/camera.ui/bin/camera.ui.js $CAMERA_UI_OPTS
Restart=always
RestartSec=5
KillMode=process
[Install]
WantedBy=multi-user.target
`
Put the camera.ui.service file into /etc/systemd/system/ folder.
Type following commands to enable/start the service
1. sudo systemctl daemon-reload
2. sudo systemctl enable camera.ui
3. sudo systemctl start camera.ui
You can always watch the log with following command:
sudo journalctl -f -u camera.ui`