Skip to content

d97jro/findwind-acap

Repository files navigation

FindWind ACAP

Build ACAP packages GitHub Super-Linter

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.

Camera stream screenshot

Build

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 dockerbuild

or

make podmanbuild

or perhaps build in parallel:

make -j dockerbuild

alternatively

make -j podmanbuild

If 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=. .

Setup

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.

Manual installation and configuration

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.

Open settings menu screenshot

In the settings page you can configure the FindWind spot ID, style, opacity, and position of the overlay.

Settings screenshot, position topLeft

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.

Settings screenshot, custom position

Scripted installation and configuration

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.cgi

To 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=0

Tip

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'

Usage

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.

License

Apache 2.0

About

ACAP application that adds FindWind weather info as an overlay on Axis cameras and keeps it up to date

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors