This repository contains the source code to build a small example ACAP version 4 (native) application that overlays wind information from FindWind on Axis camera video streams.
The build process uses the ACAP SDK build container and Docker or Podman.
The Docker and Podman commands are integrated in the Makefile, so if you have Docker or Podman and make on your computer all you need to do is:
make dockerbuildor
make podmanbuildor perhaps build in parallel:
make -j dockerbuildalternatively
make -j podmanbuildIf you do have Docker but no make on your system:
# 32-bit ARM, e.g. ARTPEC-6- and ARTPEC-7-based devices
DOCKER_BUILDKIT=1 docker build --build-arg ARCH=armv7hf -o type=local,dest=. .
# 64-bit ARM, e.g. ARTPEC-8 and ARTPEC-9-based devices
DOCKER_BUILDKIT=1 docker build --build-arg ARCH=aarch64 -o type=local,dest=. .If you do have Podman but no make on your system:
# 32-bit ARM, e.g. ARTPEC-6- and ARTPEC-7-based devices
podman build --build-arg ARCH=armv7hf -o type=local,dest=. .
# 64-bit ARM, e.g. ARTPEC-8 and ARTPEC-9-based devices
podman build --build-arg ARCH=aarch64 -o type=local,dest=. .Important
Changes to the application settings will take effect during the next scheduled forecast update. If you want them to apply immediately, you will need to restart the application.
Upload the ACAP application file (the file with the .eap extension for the camera's architecture) through the camera's web UI: Apps->Add app
When installed, start the application.
Open the application's settings dialog in the web interface by clicking the three vertical dots button.
In the settings page you can configure the FindWind spot ID, style, opacity, and position of the overlay.
Important
If you use a custom position (and none of the predefined topLeft/topRight/bottomLeft/bottomRight), the anchor point is the overlay's upper left corner. The coordinates range from (-1.0, -1.0), being the upper left corner of the screen, and (1.0, 1.0) being the bottom right corner of the screen.
Use the camera's applications/upload.cgi to upload the ACAP application file (the file with the .eap extension for the camera's architecture):
curl -k --anyauth -u root:<password> \
-F packfil=@findwind_<version>_<architecture>.eap \
https://<camera hostname/ip>/axis-cgi/applications/upload.cgiTo start (or stop/restart/remove) the application, you can make a call like this:
curl -k --anyauth -u root:<password> \
'https://<camera hostname/ip>/axis-cgi/applications/control.cgi?package=findwind&action=start'Use the camera's param.cgi to set the parameters.
The call
curl -k --anyauth -u root:<password> \
'https://<camera hostname/ip>/axis-cgi/param.cgi?action=list&group=root.findwind'will list the current settings:
root.findwind.FindwindSpotID=301
root.findwind.Style=1A
root.findwind.Opacity=0.7
root.findwind.Position=topLeft
root.findwind.CustomPositionX=0
root.findwind.CustomPositionY=0Tip
The Style value follows FindWind definitions:
1A = Round corners with border
1B = Round corners no border
1C = Square corners with border
Valid values for Position are topLeft/topRight/bottomLeft/bottomRight/custom and CustomPositionX and CustomPositionY must be within the range -1.0 to 1.0.
If you want to set the opacity to e.g. 0.8:
curl -k --anyauth -u root:<password> \
'https://<camera hostname/ip>/axis-cgi/param.cgi?action=update&root.findwind.Opacity=0.8'Once configured and running, the application will overlay wind information on the camera's video stream. The overlay updates periodically (default every 120 seconds) with the latest data from FindWind.
The application will also log status in the camera's syslog and can trigger events in the camera's event system.



