Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ reviews:
- Use `pathlib` instead of `os.path` for platform portability in Python
- If the project contains Python files, ensure there's a GitHub Actions workflow called
`project-<project-dir-name>-python-quality.yml`
- path: "project-*/**/*.sh"
instructions: >-
Shell scripts should be written in portable shell (/bin/sh) syntax since bash is not
installed on the Axis devices. Since `local` is not supported in all cameras (like
AXIS OS 9.80), it should be avoided unless the AXIS OS limitations are explicitly
mentioned. If not using `local`, it can be good to use a function specific prefix
for the variable names to avoid conflicts with other variables.
Clearly document in the head of the file which environment variables they expect
and if they are optional or required.
It's normally good to use `set -eu` for stricter error handling, but `-o pipefail`
is not supported in the Axis devices' shell.
- path: "**/*.md"
instructions: >-
Documentation files should clearly communicate the dual audience: (1) server-side
Expand Down
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This repository provides resources for the [FixedIT Data Agent ACAP](https://fix
- [Edge Device Customization Examples](#edge-device-customization-examples)
- [Older Examples](#older-examples)
- [Hello, World!](#hello-world)
- [Visualizing a GitHub Workflow Status with an Axis Strobe](#visualizing-a-github-workflow-status-with-an-axis-strobe)
- [Creating a Timelapse with AWS S3 Upload](#creating-a-timelapse-with-aws-s3-upload)

<!-- tocstop -->
Expand Down Expand Up @@ -58,6 +59,61 @@ flowchart TD
style C fill:#ffebee,stroke:#e53935
```

### Visualizing a GitHub Workflow Status with an Axis Strobe

The [Strobe Color From GitHub Workflow](./project-strobe-color-from-github-workflow) project demonstrates real-time CI/CD status visualization by automatically controlling an Axis strobe light based on GitHub Actions workflow results. When your workflow succeeds, the strobe glows green; when it fails, it turns red; and yellow indicates tests are running. The FixedIT Data Agent should be running on the Axis strobe device, since this will poll the GitHub API, no other infrastructure is required.

![Axis strobe with green color](./project-strobe-color-from-github-workflow/.images/strobe.jpg)

The following diagram shows the data flow of the "Strobe Color From GitHub Workflow" project. For more details see the [README](./project-strobe-color-from-github-workflow/README.md) in the `project-strobe-color-from-github-workflow` directory.

```mermaid
flowchart TD
XAgent["config_agent.conf:<br/>Agent Configuration<br/>interval=5s, collection_jitter=1s"] --> A
XDebug["TELEGRAF_DEBUG"] --> XAgent

A["📡 config_input_github.conf:<br/>Fetch GitHub Actions API<br/>Get recent workflow runs"] -->|github_workflow| B["🔍 config_process_filter_by_name.conf:<br/>Filter by workflow name<br/>Keep only target workflow"]

XGithubCreds["GITHUB_TOKEN<br/>GITHUB_USER<br/>GITHUB_REPO<br/>GITHUB_BRANCH"] --> A
XWorkflowName["GITHUB_WORKFLOW"] --> B

B -->|github_workflow_filtered| C1

subgraph SelectLatest ["config_process_select_latest.conf:<br/>Select Latest Workflow Run"]
C1{"Compare run_number<br/>with state"}
C1 -->|"run_number ≥ latest"| C2["Update state<br/>latest_run_number = run_number"]
C1 -->|"run_number < latest"| C3["Drop older run"]
C2 --> C4["Pass through metric"]

C2 -.->|"💾 Persistent state"| CX["state.latest_run_number"]
CX -.-> C1
end

C4 -->|github_workflow_latest| D["🎨 config_process_status_to_color.conf:<br/>Map workflow conclusion to color<br/>success → green<br/>failure → red<br/>running → yellow"]

D -->|workflow_color| E["🚨 config_output_strobe.conf:<br/>Execute trigger_strobe.sh script<br/>Enable target color profile<br/>Disable other profiles"]

XVapix["HELPER_FILES_DIR<br/>VAPIX_USERNAME<br/>VAPIX_PASSWORD<br/>VAPIX_IP"] --> E

style XAgent fill:#f5f5f5,stroke:#9e9e9e
style XDebug fill:#f5f5f5,stroke:#9e9e9e
style XGithubCreds fill:#f5f5f5,stroke:#9e9e9e
style XWorkflowName fill:#f5f5f5,stroke:#9e9e9e
style XVapix fill:#f5f5f5,stroke:#9e9e9e
style A fill:#e8f5e9,stroke:#43a047
style B fill:#f3e5f5,stroke:#8e24aa
style SelectLatest fill:#f3e5f5,stroke:#8e24aa
style C1 fill:#ffffff,stroke:#673ab7
style C2 fill:#ffffff,stroke:#673ab7
style C3 fill:#ffffff,stroke:#673ab7
style C4 fill:#ffffff,stroke:#673ab7
style CX fill:#fff3e0,stroke:#fb8c00
style D fill:#f3e5f5,stroke:#8e24aa
style E fill:#ffebee,stroke:#e53935
```

This example showcases how simple configuration files and shell scripts can create powerful edge intelligence in your Axis strobes without traditional embedded development complexity. The project could easily be adapted to work together with other APIs to visualize statuses such as server health monitoring, weather warnings (like high wind alerts), IoT sensor data (temperature, moisture, etc.), security system states, or any REST API (or most other APIs) that provides status information.

### Creating a Timelapse with AWS S3 Upload

The [Timelapse with AWS S3 Upload](./project-timelapse-s3) project demonstrates automated timelapse video creation using the FixedIT Data Agent. This solution captures images at regular intervals from an AXIS device and uploads them to AWS S3 with timestamped filenames, creating a chronological sequence perfect for timelapse generation. Perfect for construction sites, environmental monitoring, safety applications, or any scenario requiring periodic visual documentation.
Expand Down
2 changes: 2 additions & 0 deletions project-strobe-color-from-github-workflow/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vars.*
token.txt
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions project-strobe-color-from-github-workflow/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2025 FixedIT Consulting AB

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading