- Setup
- docker/docker-compose installation instructions
- Clone repo / Pull docker images
- Start heimdall using RTSP / MQTT / TCP-Socket Camera
- RTSP cameras (e.g. Surveillance Cameras)
- TCP cameras (e.g. Raspberry PI)
- MQTT cameras
- Open Webinterface
- Setup Android App
- (Optional) Installation instructions for Low-Energy Camera developed at the Bonn-Rhein-Sieg University)
- Start heimdall using the low-energy camera
- Useful Commands for debugging/testing/development
- System was tested on XUbuntu 16.04.3 - It took me around 30 minutes to install XUbuntu as well as heimdall on an Intel NUC Computer. Installing and setting up the camera may take some more time.
- Run
installDocker.sh
file from the root of the heimdall project or follow the installation instructions on docs.docker.com
sudo groupadd docker
sudo usermod -aG docker $USER # Add sudo to group docker
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "/home/$USER/.docker" -R
reboot
cd /home/heimdall/Desktop
git clone --recursive https://github.com/David-Development/heimdall.git
docker pull luhmer/opencv-python3
docker pull luhmer/heimdall-backend
docker pull luhmer/heimdall-frontend
docker pull luhmer/emqtt
sudo nano /etc/rc.local
- Append the following code snippet (before the
exit 0
line)
sh /home/heimdall/Desktop/heimdall/startHeimdall.sh > /home/heimdall/Desktop/heimdall-log.txt 2>&1 &
exit 0
After starting the docker-containers (as shown below) you can view the log files by opening the heimdall-log.txt
tail -f -n 100 heimdall-log.txt
Beside the low-enery camera developed at the Bonn-Rhein-Sieg University, Heimdall also supports RTSP, MQTT as well as TCP-Socket cameras.
Almost all modern IP Surveillance Cameras support the RTSP Protocol. Those cameras can be used in the Heimdall system to perform facial recognition. To setup heimdall, you'll have to edit the docker-compose.yaml
file. Adjust the RTSP_HOST
variable accordingly to your environment (in the heimdall-camera-rtsp
service definition).
# Change into the directory where you downloaded heimdall to
cd /home/heimdall/Desktop/heimdall
# Start all required docker containers
docker-compose up heimdall-backend heimdall-frontend heimdall-proxy heimdall-camera-rtsp
The System is able to handle all kinds TCP cameras (such as the one developed at the Bonn-Rhein-Sieg University). It also supports Raspberry PI based cameras. I created a small script which can be found along with the installation instructions on the raspberry pi project page: https://github.com/David-Development/heimdall-raspberry
# Change into the directory where you downloaded heimdall to
cd /home/heimdall/Desktop/heimdall
# Start all required docker containers
docker-compose up heimdall-backend heimdall-frontend heimdall-proxy heimdall-camera-proxy
Connect your MQTT based camera to the provided MQTT Broker (host-ip:1883). Publish images on the channel: camera
# Change into the directory where you downloaded heimdall to
cd /home/heimdall/Desktop/heimdall
# Start all required docker containers
docker-compose up heimdall-backend heimdall-frontend heimdall-proxy
The Webinterface will be available on your computer on Port 80. You can access it by using http://localhost or http://127.0.0.1 or by using your IP address.
The Android App supports to automatically turn on the screen when a person is detected. It'll shut off the screen after some time to save energy. You can download the app here: https://github.com/David-Development/heimdall-android. After installing the app, click on Settings and Type in your IP Address of your computer. After pressing "save", the app should connect to the Backend using MQTT.
The App was tested on Android 4.0 (Samsung Tablet). There might be some issues on newer devices due to some strict energy saving features of Android 7+ (However I didn't run any long term tests yet).
- Camera has a fixed IP adress:
192.168.1.177
- Commands to get information about Wifi Devices:
nmcli device
# List of Network Devicesnmcli device wifi
# List of Wifi Devices (inkl. )nmcli device show
- Run the commands below - Replace
<wifi_device_id>
with the correct identifier of your wifi card that you want to use
sudo apt-get install isc-dhcp-server
sudo nano /etc/default/isc-dhcp-server
Add <wifi_device_id> to ipv4 interface
sudo nano /etc/dhcp/dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.1 192.168.1.254;
option subnet-mask 255.255.255.0;
option routers 192.168.1.177;
default-lease-time 600;
max-lease-time 7200;
}
sudo service isc-dhcp-server restart
Start docker containers:
cd /home/heimdall/Desktop/heimdall
sudo nano startHeimdall.sh # replace the WIFI_DEVICE_ID with your wifi hotspot device id and set the WIFI_SSID as well as the WIFI_PASSWORD variable accordingly.
sh startHeimdall.sh # Test installation (make sure everything starts without error messages)
sudo nano /etc/sysctl.conf
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
sudo sysctl -p # load
cat /proc/sys/net/ipv6/conf/all/disable_ipv6 # check
arp -an
sudo netstat -tulpn
sudo sh installTeamviewer.sh
- Set default password
- disable wayland support
sudo nano /etc/gdm3/custom.conf
WaylandEnable=false
- Install Dummy Screen
sudo apt-get install xserver-xorg-video-dummy
sudo nano /usr/share/x11/xorg.conf.d/xorg.conf
- https://askubuntu.com/a/463000
- Download Visual Studio Code from Microsoft Website
sudo dpkg -i code_1.19.1-1513676564_amd64.deb
sudo apt-get -f install
git pull
git submodule init
git submodule update --recursive --remote
sudo docker-compose stop heimdall-frontend
sudo docker-compose rm heimdall-frontend
socat TCP-LISTEN:9000,fork TCP:127.0.0.1:9002
socat -d -d tcp4-listen:9000,fork tcp4:127.0.0.1:9002
socat tcp4-listen:9000,fork tcp4:127.0.0.1:9002