From e8fb7206270cf917da6010a65860e39e8ef1c7ad Mon Sep 17 00:00:00 2001 From: Alby <30591904+Xayton@users.noreply.github.com> Date: Fri, 24 Oct 2025 15:21:16 +0200 Subject: [PATCH 1/2] Bump the examples version from 0.4.8 to 0.5.0 --- Taskfile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taskfile.yml b/Taskfile.yml index f55610be..1bcbe077 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -8,7 +8,7 @@ vars: GOLANGCI_LINT_VERSION: v2.4.0 GOIMPORTS_VERSION: v0.29.0 DPRINT_VERSION: 0.48.0 - EXAMPLE_VERSION: "0.4.8" + EXAMPLE_VERSION: "0.5.0" RUNNER_VERSION: "0.4.8" VERSION: # if version is not passed we hack the semver by encoding the commit as pre-release sh: echo "${VERSION:-0.0.0-$(git rev-parse --short HEAD)}" From bae92036567fc0f74f92e0396f33a9e558a17222 Mon Sep 17 00:00:00 2001 From: Xayton <30591904+Xayton@users.noreply.github.com> Date: Fri, 24 Oct 2025 15:29:03 +0200 Subject: [PATCH 2/2] Update the runner and the Taskfile --- Taskfile.yml | 4 +- .../app_bricks/air_quality_monitor/API.md | 192 ------------------ .../app_bricks/imageclassification/API.md | 71 ------- .../arduino/app_bricks/keyword_spotter/API.md | 63 ------ .../arduino/app_bricks/mood_detector/API.md | 39 ---- .../arduino/app_bricks/objectdetection/API.md | 77 ------- .../vibration_anomaly_detection/API.md | 59 ------ .../docs/arduino/mood_detector/README.md | 21 -- .../vibration_anomaly_detection/README.md | 85 -------- .../app_bricks/air_quality_monitoring/API.md | 0 .../arduino/app_bricks/arduino_cloud/API.md | 0 .../app_bricks/audio_classification/API.md | 0 .../app_bricks/camera_code_detection/API.md | 6 +- .../arduino/app_bricks/cloud_llm/API.md | 4 +- .../app_bricks/dbstorage_sqlstore/API.md | 20 +- .../app_bricks/dbstorage_tsstore/API.md | 26 +-- .../app_bricks/image_classification/API.md | 0 .../app_bricks/keyword_spotting/API.md | 14 +- .../arduino/app_bricks/mood_detector/API.md | 36 ++++ .../app_bricks/motion_detection/API.md | 3 +- .../api-docs/arduino/app_bricks/mqtt/API.md | 0 .../app_bricks/object_detection/API.md | 0 .../arduino/app_bricks/streamlit_ui/API.md | 0 .../vibration_anomaly_detection/API.md | 104 ++++++++++ .../video_imageclassification/API.md | 5 +- .../app_bricks/video_objectdetection/API.md | 2 +- .../visual_anomaly_detection/API.md | 0 .../app_bricks/weather_forecast/API.md | 0 .../api-docs/arduino/app_bricks/web_ui/API.md | 5 +- .../arduino/app_peripherals/microphone/API.md | 0 .../arduino/app_peripherals/speaker/API.md | 0 .../arduino/app_peripherals/usb_camera/API.md | 0 .../assets/{0.4.8 => 0.5.0}/bricks-list.yaml | 2 - .../audio_classification/brick_compose.yaml | 2 +- .../dbstorage_tsstore/brick_compose.yaml | 0 .../image_classification/brick_compose.yaml | 2 +- .../keyword_spotting/brick_compose.yaml | 2 +- .../motion_detection/brick_compose.yaml | 2 +- .../object_detection/brick_compose.yaml | 2 +- .../brick_compose.yaml | 2 +- .../brick_compose.yaml | 2 +- .../video_object_detection/brick_compose.yaml | 2 +- .../brick_compose.yaml | 2 +- .../docs/arduino/arduino_cloud/README.md | 0 .../arduino/audio_classification/README.md | 0 .../arduino/camera_code_detection/README.md | 0 .../docs/arduino/dbstorage_sqlstore/README.md | 0 .../docs/arduino/dbstorage_tsstore/README.md | 0 .../arduino/image_classification/README.md | 0 .../docs/arduino/keyword_spotting/README.md | 0 .../docs/arduino/mood_detector/README.md | 38 ++++ .../docs/arduino/motion_detection/README.md | 0 .../docs/arduino/object_detection/README.md | 0 .../docs/arduino/streamlit_ui/README.md | 0 .../vibration_anomaly_detection/README.md | 121 +++++++++++ .../video_image_classification/README.md | 0 .../arduino/video_object_detection/README.md | 0 .../visual_anomaly_detection/README.md | 0 .../docs/arduino/weather_forecast/README.md | 0 .../docs/arduino/web_ui/README.md | 0 .../arduino/arduino_cloud/1_led_blink.py | 1 + .../2_light_with_colors_monitor.py | 1 + .../3_light_with_colors_command.py | 10 +- .../1_glass_breaking_from_mic.py | 0 .../2_glass_breaking_from_file.py | 0 .../camera_code_detection/1_detection.py | 0 .../camera_code_detection/2_detection_list.py | 2 +- .../3_detection_with_overrides.py | 0 .../store_and_read_example.py | 0 .../arduino/dbstorage_tsstore/1_write_read.py | 0 .../dbstorage_tsstore/2_read_all_samples.py | 4 +- .../image_classification_example.py | 1 - .../arduino/keyword_spotting/1_hello_world.py | 0 .../object_detection_example.py | 1 - .../object_detection_example.py | 0 .../weather_forecast_by_city_example.py | 0 .../weather_forecast_by_coords_example.py | 0 .../examples/arduino/web_ui/1_serve_webapp.py | 0 .../arduino/web_ui/2_serve_webapp_and_api.py | 0 .../arduino/web_ui/3_connect_disconnect.py | 0 .../examples/arduino/web_ui/4_on_message.py | 0 .../examples/arduino/web_ui/5_send_message.py | 0 .../assets/{0.4.8 => 0.5.0}/models-list.yaml | 0 .../app_bricks/air_quality_monitor/API.md | 192 ------------------ .../app_bricks/imageclassification/API.md | 71 ------- .../arduino/app_bricks/keyword_spotter/API.md | 63 ------ .../arduino/app_bricks/mood_detector/API.md | 39 ---- .../arduino/app_bricks/objectdetection/API.md | 77 ------- .../vibration_anomaly_detection/API.md | 59 ------ .../docs/arduino/mood_detector/README.md | 21 -- .../vibration_anomaly_detection/README.md | 85 -------- .../app_bricks/air_quality_monitoring/API.md | 0 .../arduino/app_bricks/arduino_cloud/API.md | 0 .../app_bricks/audio_classification/API.md | 0 .../app_bricks/camera_code_detection/API.md | 6 +- .../arduino/app_bricks/cloud_llm/API.md | 4 +- .../app_bricks/dbstorage_sqlstore/API.md | 20 +- .../app_bricks/dbstorage_tsstore/API.md | 26 +-- .../app_bricks/image_classification/API.md | 0 .../app_bricks/keyword_spotting/API.md | 14 +- .../arduino/app_bricks/mood_detector/API.md | 36 ++++ .../app_bricks/motion_detection/API.md | 3 +- .../api-docs/arduino/app_bricks/mqtt/API.md | 0 .../app_bricks/object_detection/API.md | 0 .../arduino/app_bricks/streamlit_ui/API.md | 0 .../vibration_anomaly_detection/API.md | 104 ++++++++++ .../video_imageclassification/API.md | 5 +- .../app_bricks/video_objectdetection/API.md | 2 +- .../visual_anomaly_detection/API.md | 0 .../app_bricks/weather_forecast/API.md | 0 .../api-docs/arduino/app_bricks/web_ui/API.md | 5 +- .../arduino/app_peripherals/microphone/API.md | 0 .../arduino/app_peripherals/speaker/API.md | 0 .../arduino/app_peripherals/usb_camera/API.md | 0 .../assets/{0.4.8 => 0.5.0}/bricks-list.yaml | 2 - .../audio_classification/brick_compose.yaml | 2 +- .../dbstorage_tsstore/brick_compose.yaml | 0 .../image_classification/brick_compose.yaml | 2 +- .../keyword_spotting/brick_compose.yaml | 2 +- .../motion_detection/brick_compose.yaml | 2 +- .../object_detection/brick_compose.yaml | 2 +- .../brick_compose.yaml | 2 +- .../brick_compose.yaml | 2 +- .../video_object_detection/brick_compose.yaml | 2 +- .../brick_compose.yaml | 2 +- .../docs/arduino/arduino_cloud/README.md | 0 .../arduino/audio_classification/README.md | 0 .../arduino/camera_code_detection/README.md | 0 .../docs/arduino/dbstorage_sqlstore/README.md | 0 .../docs/arduino/dbstorage_tsstore/README.md | 0 .../arduino/image_classification/README.md | 0 .../docs/arduino/keyword_spotting/README.md | 0 .../docs/arduino/mood_detector/README.md | 38 ++++ .../docs/arduino/motion_detection/README.md | 0 .../docs/arduino/object_detection/README.md | 0 .../docs/arduino/streamlit_ui/README.md | 0 .../vibration_anomaly_detection/README.md | 121 +++++++++++ .../video_image_classification/README.md | 0 .../arduino/video_object_detection/README.md | 0 .../visual_anomaly_detection/README.md | 0 .../docs/arduino/weather_forecast/README.md | 0 .../docs/arduino/web_ui/README.md | 0 .../arduino/arduino_cloud/1_led_blink.py | 1 + .../2_light_with_colors_monitor.py | 1 + .../3_light_with_colors_command.py | 10 +- .../1_glass_breaking_from_mic.py | 0 .../2_glass_breaking_from_file.py | 0 .../camera_code_detection/1_detection.py | 0 .../camera_code_detection/2_detection_list.py | 2 +- .../3_detection_with_overrides.py | 0 .../store_and_read_example.py | 0 .../arduino/dbstorage_tsstore/1_write_read.py | 0 .../dbstorage_tsstore/2_read_all_samples.py | 4 +- .../image_classification_example.py | 1 - .../arduino/keyword_spotting/1_hello_world.py | 0 .../object_detection_example.py | 1 - .../object_detection_example.py | 0 .../weather_forecast_by_city_example.py | 0 .../weather_forecast_by_coords_example.py | 0 .../examples/arduino/web_ui/1_serve_webapp.py | 0 .../arduino/web_ui/2_serve_webapp_and_api.py | 0 .../arduino/web_ui/3_connect_disconnect.py | 0 .../examples/arduino/web_ui/4_on_message.py | 0 .../examples/arduino/web_ui/5_send_message.py | 0 .../assets/{0.4.8 => 0.5.0}/models-list.yaml | 0 internal/orchestrator/config/config.go | 2 +- 166 files changed, 729 insertions(+), 1339 deletions(-) delete mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitor/API.md delete mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/imageclassification/API.md delete mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotter/API.md delete mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/mood_detector/API.md delete mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/objectdetection/API.md delete mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md delete mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/mood_detector/README.md delete mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/vibration_anomaly_detection/README.md rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/air_quality_monitoring/API.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/arduino_cloud/API.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/audio_classification/API.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/camera_code_detection/API.md (97%) rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/api-docs/arduino/app_bricks/cloud_llm/API.md (87%) rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md (97%) rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md (94%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/image_classification/API.md (100%) rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/api-docs/arduino/app_bricks/keyword_spotting/API.md (91%) create mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/mood_detector/API.md rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/api-docs/arduino/app_bricks/motion_detection/API.md (91%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/mqtt/API.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/object_detection/API.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/streamlit_ui/API.md (100%) create mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/api-docs/arduino/app_bricks/video_imageclassification/API.md (95%) rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/api-docs/arduino/app_bricks/video_objectdetection/API.md (97%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/visual_anomaly_detection/API.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/weather_forecast/API.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/web_ui/API.md (97%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_peripherals/microphone/API.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_peripherals/speaker/API.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_peripherals/usb_camera/API.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/bricks-list.yaml (99%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/compose/arduino/audio_classification/brick_compose.yaml (97%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/compose/arduino/dbstorage_tsstore/brick_compose.yaml (100%) rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/compose/arduino/image_classification/brick_compose.yaml (97%) rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/compose/arduino/keyword_spotting/brick_compose.yaml (97%) rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/compose/arduino/motion_detection/brick_compose.yaml (97%) rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/compose/arduino/object_detection/brick_compose.yaml (97%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/compose/arduino/vibration_anomaly_detection/brick_compose.yaml (97%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/compose/arduino/video_image_classification/brick_compose.yaml (97%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/compose/arduino/video_object_detection/brick_compose.yaml (97%) rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/compose/arduino/visual_anomaly_detection/brick_compose.yaml (97%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/arduino_cloud/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/audio_classification/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/camera_code_detection/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/dbstorage_sqlstore/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/dbstorage_tsstore/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/image_classification/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/keyword_spotting/README.md (100%) create mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/mood_detector/README.md rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/motion_detection/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/object_detection/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/streamlit_ui/README.md (100%) create mode 100644 debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/vibration_anomaly_detection/README.md rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/video_image_classification/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/video_object_detection/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/visual_anomaly_detection/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/weather_forecast/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/docs/arduino/web_ui/README.md (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/arduino_cloud/1_led_blink.py (99%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py (99%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/arduino_cloud/3_light_with_colors_command.py (81%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/audio_classification/1_glass_breaking_from_mic.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/audio_classification/2_glass_breaking_from_file.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/camera_code_detection/1_detection.py (100%) rename {internal/e2e/daemon/testdata/assets/0.4.8 => debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0}/examples/arduino/camera_code_detection/2_detection_list.py (93%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/camera_code_detection/3_detection_with_overrides.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/dbstorage_sqlstore/store_and_read_example.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/dbstorage_tsstore/1_write_read.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/dbstorage_tsstore/2_read_all_samples.py (89%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/image_classification/image_classification_example.py (98%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/keyword_spotting/1_hello_world.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/object_detection/object_detection_example.py (98%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/visual_anomaly_detection/object_detection_example.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/weather_forecast/weather_forecast_by_city_example.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/weather_forecast/weather_forecast_by_coords_example.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/web_ui/1_serve_webapp.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/web_ui/2_serve_webapp_and_api.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/web_ui/3_connect_disconnect.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/web_ui/4_on_message.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/examples/arduino/web_ui/5_send_message.py (100%) rename debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/{0.4.8 => 0.5.0}/models-list.yaml (100%) delete mode 100644 internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitor/API.md delete mode 100644 internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/imageclassification/API.md delete mode 100644 internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotter/API.md delete mode 100644 internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/mood_detector/API.md delete mode 100644 internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/objectdetection/API.md delete mode 100644 internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md delete mode 100644 internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/mood_detector/README.md delete mode 100644 internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/vibration_anomaly_detection/README.md rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/air_quality_monitoring/API.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/arduino_cloud/API.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/audio_classification/API.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/camera_code_detection/API.md (97%) rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/api-docs/arduino/app_bricks/cloud_llm/API.md (87%) rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md (97%) rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md (94%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/image_classification/API.md (100%) rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/api-docs/arduino/app_bricks/keyword_spotting/API.md (91%) create mode 100644 internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/mood_detector/API.md rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/api-docs/arduino/app_bricks/motion_detection/API.md (91%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/mqtt/API.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/object_detection/API.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/streamlit_ui/API.md (100%) create mode 100644 internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/api-docs/arduino/app_bricks/video_imageclassification/API.md (95%) rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/api-docs/arduino/app_bricks/video_objectdetection/API.md (97%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/visual_anomaly_detection/API.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/weather_forecast/API.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_bricks/web_ui/API.md (97%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_peripherals/microphone/API.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_peripherals/speaker/API.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/api-docs/arduino/app_peripherals/usb_camera/API.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/bricks-list.yaml (99%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/compose/arduino/audio_classification/brick_compose.yaml (97%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/compose/arduino/dbstorage_tsstore/brick_compose.yaml (100%) rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/compose/arduino/image_classification/brick_compose.yaml (97%) rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/compose/arduino/keyword_spotting/brick_compose.yaml (97%) rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/compose/arduino/motion_detection/brick_compose.yaml (97%) rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/compose/arduino/object_detection/brick_compose.yaml (97%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/compose/arduino/vibration_anomaly_detection/brick_compose.yaml (97%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/compose/arduino/video_image_classification/brick_compose.yaml (97%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/compose/arduino/video_object_detection/brick_compose.yaml (97%) rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/compose/arduino/visual_anomaly_detection/brick_compose.yaml (97%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/arduino_cloud/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/audio_classification/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/camera_code_detection/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/dbstorage_sqlstore/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/dbstorage_tsstore/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/image_classification/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/keyword_spotting/README.md (100%) create mode 100644 internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/mood_detector/README.md rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/motion_detection/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/object_detection/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/streamlit_ui/README.md (100%) create mode 100644 internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/vibration_anomaly_detection/README.md rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/video_image_classification/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/video_object_detection/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/visual_anomaly_detection/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/weather_forecast/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/docs/arduino/web_ui/README.md (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/arduino_cloud/1_led_blink.py (99%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py (99%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/arduino_cloud/3_light_with_colors_command.py (81%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/audio_classification/1_glass_breaking_from_mic.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/audio_classification/2_glass_breaking_from_file.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/camera_code_detection/1_detection.py (100%) rename {debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8 => internal/e2e/daemon/testdata/assets/0.5.0}/examples/arduino/camera_code_detection/2_detection_list.py (93%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/camera_code_detection/3_detection_with_overrides.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/dbstorage_sqlstore/store_and_read_example.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/dbstorage_tsstore/1_write_read.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/dbstorage_tsstore/2_read_all_samples.py (89%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/image_classification/image_classification_example.py (98%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/keyword_spotting/1_hello_world.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/object_detection/object_detection_example.py (98%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/visual_anomaly_detection/object_detection_example.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/weather_forecast/weather_forecast_by_city_example.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/weather_forecast/weather_forecast_by_coords_example.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/web_ui/1_serve_webapp.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/web_ui/2_serve_webapp_and_api.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/web_ui/3_connect_disconnect.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/web_ui/4_on_message.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/examples/arduino/web_ui/5_send_message.py (100%) rename internal/e2e/daemon/testdata/assets/{0.4.8 => 0.5.0}/models-list.yaml (100%) diff --git a/Taskfile.yml b/Taskfile.yml index 1bcbe077..05ea0f2d 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -9,7 +9,7 @@ vars: GOIMPORTS_VERSION: v0.29.0 DPRINT_VERSION: 0.48.0 EXAMPLE_VERSION: "0.5.0" - RUNNER_VERSION: "0.4.8" + RUNNER_VERSION: "0.5.0" VERSION: # if version is not passed we hack the semver by encoding the commit as pre-release sh: echo "${VERSION:-0.0.0-$(git rev-parse --short HEAD)}" @@ -241,7 +241,7 @@ tasks: cmds: - | # Get the corresponding models and bricks release, and unzip it. - gh release download -R bcmi-labs/app-bricks-py "release/{{.SEMVER_TAG}}" -p '*.whl' -D "{{.TMPDIR}}" --clobber + gh release download -R arduino/app-bricks-py "release/{{.SEMVER_TAG}}" -p '*.whl' -D "{{.TMPDIR}}" --clobber unzip -o "{{.TMPDIR}}/arduino_app_bricks-{{.SEMVER_TAG}}-py3-none-any.whl" -d "{{.OUTPUT_DIR}}" - | # Copy the assets to the assets dir and testdata dir, replacing the previous version. diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitor/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitor/API.md deleted file mode 100644 index 3de1748f..00000000 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitor/API.md +++ /dev/null @@ -1,192 +0,0 @@ -# air_quality_monitor API Reference - -## Index - -- Class `AQILevel` -- Class `AirQualityData` -- Class `AirQualityMonitor` -- Class `AirQualityLookupError` - ---- - -## `AQILevel` dataclass - -```python -class AQILevel() -``` - -Data class to represent AQI levels. - -### Attributes - -- **min_value** (*int*): Minimum AQI value for the level. -- **max_value** (*int*): Maximum AQI value for the level. -- **description** (*str*): Description of the AQI level. -- **color** (*str*): Color associated with the AQI level in hex. - - ---- - -## `AirQualityData` dataclass - -```python -class AirQualityData() -``` - -Data class to represent air quality data. - -### Attributes - -- **city** (*str*): Name of the city. -- **lat** (*float*): Latitude of the city. -- **lon** (*float*): Longitude of the city. -- **url** (*str*): URL for more information about the air quality data. -- **last_update** (*str*): Last update timestamp of the air quality data. -- **aqi** (*int*): Air Quality Index value. -- **dominantpol** (*str*): Dominant pollutant in the air. -- **iaqi** (*dict*): Individual AQI values for various pollutants. - -### Methods - -#### `pandas_dict()` - -Return the data as a dictionary suitable for pandas DataFrame. - - ---- - -## `AirQualityMonitor` class - -```python -class AirQualityMonitor(token: str) -``` - -Class to get air quality data from AQICN API. - -### Parameters - -- **token** (*str*): API token for AQICN service. - -### Raises - -- **ValueError**: If the token is not provided. - -### Methods - -#### `get_air_quality_by_city(city: str)` - -Get air quality data by city name. - -##### Parameters - -- **city** (*str*): Name of the city. - -##### Returns - -- (*AirQualityData*): Air quality assembled data. - -##### Raises - -- **AirQualityLookupError**: If the API request fails. - -#### `get_air_quality_by_coords(latitude: float, longitude: float)` - -Get air quality data by coordinates. - -##### Parameters - -- **latitude** (*float*): Latitude. -- **longitude** (*float*): Longitude. - -##### Returns - -- (*AirQualityData*): Air quality assembled data. - -##### Raises - -- **AirQualityLookupError**: If the API request fails. - -#### `get_air_quality_by_ip()` - -Get air quality data by IP address. - -##### Returns - -- (*AirQualityData*): Air quality assembled data. - -##### Raises - -- **AirQualityLookupError**: If the API request fails. - -#### `process(item: dict)` - -Process the input dictionary to get air quality data. - -##### Parameters - -- **item** (*dict*): Input dictionary containing either 'city', 'latitude' and 'longitude', or 'ip'. - -##### Returns - -- (*dict*): Air quality data. - -##### Raises - -- **ValueError**: If the input dictionary is not valid. - -#### `assemble_data(data: dict)` - -Create a payload for the air quality data. - -##### Parameters - -- **data** (*dict*): Air quality data. - -##### Returns - -- (*dict*): Payload with relevant air quality information. - -#### `map_aqi_level(aqi: int)` - -Returns AQILevel class matching provided AQI. - - ---- - -## `AirQualityLookupError` class - -```python -class AirQualityLookupError(message: str, status: str) -``` - -Custom exception for air quality lookup errors. - -### Parameters - -- **message** (*str*): Error message. -- **status** (*str*): Status of the error, defaults to None. - -### Methods - -#### `from_api_response(cls, data: dict)` - -AirQualityLookupError error handling based on response provided by AQI API. - -Documented errors: -- {"status": "error", "data": "Invalid key"} -- {"status": "error", "data": "Unknown station"} -- {"status": "error", "data": "Over quota"} -- {"status": "error", "data": "Invalid query"} -- {"status": "error", "data": "Too Many Requests"} -- {"status": "error", "data": "IP not allowed"} -- {"status": "error", "data": "Unknown error"} -- {"status": "error", "data": {"message": "..."}} - -##### Parameters - -- **data** (*dict*): Response data from the AQI API. - -##### Returns - -- (*AirQualityLookupError*): An instance of AirQualityLookupError with the error message and status. - diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/imageclassification/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/imageclassification/API.md deleted file mode 100644 index 5fe4552e..00000000 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/imageclassification/API.md +++ /dev/null @@ -1,71 +0,0 @@ -# imageclassification API Reference - -## Index - -- Class `ImageClassification` - ---- - -## `ImageClassification` class - -```python -class ImageClassification(confidence: float) -``` - -Module for image analysis and content classification using machine learning. - -This module processes an input image and returns: -- Corresponding class labels -- Confidence scores for each classification - -### Parameters - -- **confidence** (*float*) (optional): Minimum confidence threshold for -classification results. Defaults to 0.3. - -### Methods - -#### `classify_from_file(image_path: str, confidence: float)` - -Process a local image file to be classified. - -##### Parameters - -- **image_path** (*str*): Path to the image file on the local file system. -- **confidence** (*float*): Minimum confidence threshold for classification results. Default is None (use module defaults). - -##### Returns - -- (*dict*): Classification results containing class names and confidence, or None if an error occurs. - -#### `classify(image_bytes, image_type: str, confidence: float)` - -Process an in-memory image to be classified. - -##### Parameters - -- **image_bytes**: Can be raw bytes (e.g., from a file or stream) or a preloaded PIL image. -- **image_type** (*str*), default='jpg': The image format ('jpg', 'jpeg', or 'png'). Required if using raw bytes. Defaults to 'jpg'. -- **confidence** (*float*): Minimum confidence threshold for classification results. Default is None (use module defaults). - -##### Returns - -- (*dict*): Classification results containing class names and confidence, or None if an error occurs. - -#### `process(item)` - -Process an item to classify objects in an image. - -This method supports two input formats: -- A string path to a local image file. -- A dictionary containing raw image bytes under the 'image' key, and optionally an 'image_type' key (e.g., 'jpg', 'png'). - -##### Parameters - -- **item**: A file path (str) or a dictionary with the 'image' and 'image_type' keys (dict). -'image_type' is optional while 'image' contains image as bytes. - -##### Returns - -- (*dict*): Classification results or None if an error occurs. - diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotter/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotter/API.md deleted file mode 100644 index 2cbc3a86..00000000 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotter/API.md +++ /dev/null @@ -1,63 +0,0 @@ -# keyword_spotter API Reference - -## Index - -- Class `KeywordSpotter` - ---- - -## `KeywordSpotter` class - -```python -class KeywordSpotter(mic: Microphone, confidence: float, debounce_sec: float) -``` - -KeywordSpotter module for classifying audio data to detect keywords using a specified model. - -Processes continuous audio input to classify and detect specific keywords or phrases -using pre-trained models. Supports both framework-provided models and custom models -trained on Edge Impulse platform. - -### Parameters - -- **mic** (*Microphone*) (optional): Microphone instance for audio input. -If None, a default Microphone will be initialized. -- **confidence** (*float*) (optional): Confidence level for detection between 0.0 and 1.0. -Defaults to 0.8 (80%). Higher values reduce false positives. -- **debounce_sec** (*float*) (optional): Minimum seconds between repeated detections -of the same keyword. Defaults to 2.0 seconds. - -### Raises - -- **ValueError**: If the model information cannot be retrieved or if the model parameters are incomplete. - -### Methods - -#### `on_detect(keyword: str, callback: Callable[[], None])` - -Register a callback function to be invoked when a specific keyword is detected. - -##### Parameters - -- **keyword** (*str*): The keyword to check for in the classification results. -Must match the keyword as defined in the model. -- **callback** (*Callable[[], None]*): Callback function to run when the keyword is detected. -Must take no parameters and return None. - -##### Raises - -- **TypeError**: If callback is not callable. -- **ValueError**: If callback accepts any argument. - -#### `start()` - -Start the KeywordSpotter module and begin processing audio data. - -Begins continuous audio stream processing and keyword detection. - -#### `stop()` - -Stop the KeywordSpotter module and release resources. - -Stops audio processing and releases microphone and model resources. - diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/mood_detector/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/mood_detector/API.md deleted file mode 100644 index 430a949f..00000000 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/mood_detector/API.md +++ /dev/null @@ -1,39 +0,0 @@ -# mood_detector API Reference - -## Index - -- Class `MoodDetector` - ---- - -## `MoodDetector` class - -```python -class MoodDetector() -``` - -A class to detect mood based on text sentiment analysis. - -As example, it can classify text as positive, negative, or neutral. - -Sentence: 'I love this board!' -> Analysis: positive -Sentence: 'the weather is awful' -> Analysis: negative -Sentence: 'I am sad today' -> Analysis: negative -Sentence: 'the temperature is 25' -> Analysis: neutral - -NOTE: Detector support English language only. - -### Methods - -#### `get_sentiment(text: str)` - -Analyze the sentiment of the provided text and return the mood. - -##### Parameters - -- **text** (*str*): The input text to analyze. - -##### Returns - -- (*str*): The mood of the text, which can be 'positive', 'negative', or 'neutral'. - diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/objectdetection/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/objectdetection/API.md deleted file mode 100644 index 344d7144..00000000 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/objectdetection/API.md +++ /dev/null @@ -1,77 +0,0 @@ -# objectdetection API Reference - -## Index - -- Class `ObjectDetection` - ---- - -## `ObjectDetection` class - -```python -class ObjectDetection(confidence: float) -``` - -Module for object detection in images using a specified machine learning model. - -This module processes an input image and returns: -- Bounding boxes for detected objects -- Corresponding class labels -- Confidence scores for each detection - -### Methods - -#### `detect_from_file(image_path: str, confidence: float)` - -Process a local image file to detect and identify objects. - -##### Parameters - -- **image_path**: Path to the image file on the local file system. -- **confidence**: Minimum confidence threshold for detections. Default is None (use module defaults). - -##### Returns - -- (*dict*): Detection results containing class names, confidence, and bounding boxes. - -#### `detect(image_bytes, image_type: str, confidence: float)` - -Process an in-memory image to detect and identify objects. - -##### Parameters - -- **image_bytes**: Can be raw bytes (e.g., from a file or stream) or a preloaded PIL image. -- **image_type**, default='jpg': The image format ('jpg', 'jpeg', or 'png'). Required if using raw bytes. Defaults to 'jpg'. -- **confidence**: Minimum confidence threshold for detections. Default is None (use module defaults). - -##### Returns - -- (*dict*): Detection results containing class names, confidence, and bounding boxes. - -#### `draw_bounding_boxes(image: Image.Image | bytes, detections: dict)` - -Draw bounding boxes on an image enclosing detected objects using PIL. - -##### Parameters - -- **image**: The input image to annotate. Can be a PIL Image object or raw image bytes. -- **detections**: Detection results containing object labels and bounding boxes. - -##### Returns - --: Image with bounding boxes and key points drawn. -None if no detection or invalid image. - -#### `process(item)` - -Process an item to detect objects in an image. - -This method supports two input formats: -- A string path to a local image file. -- A dictionary containing raw image bytes under the 'image' key, and optionally an 'image_type' key (e.g., 'jpg', 'png'). - -##### Parameters - -- **item**: A file path (str) or a dictionary with the 'image' and 'image_type' keys (dict). -'image_type' is optional while 'image' contains image as bytes. - diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md deleted file mode 100644 index cf77dad9..00000000 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md +++ /dev/null @@ -1,59 +0,0 @@ -# vibration_anomaly_detection API Reference - -## Index - -- Class `VibrationAnomalyDetection` - ---- - -## `VibrationAnomalyDetection` class - -```python -class VibrationAnomalyDetection(anomaly_detection_threshold: float) -``` - -This Anomaly Detection module classifies accelerometr sensor data to detect vibration anomalies based on a pre-trained model. - -### Parameters - -- **anomaly_detection_threshold** (*float*): Confidence level for the anomaly score. Default is 1 (absolute value). - -### Methods - -#### `accumulate_samples(sensor_samples: Iterable[float])` - -Accumulate sensor samples - -##### Parameters - -- **sensor_samples** (*Iterable*): An iterable of sensor samples (e.g., accelerometer data). - -#### `on_anomaly(callback: callable)` - -Register a callback function to be invoked when an anomaly is detected. - -Function signature of the callback should be: - - callback() # No parameters - - callback(anomaly_score: float) - - callback(anomaly_score: float, classification: dict) - -##### Parameters - -- **callback** (*callable*): a callback function to handle label spotted. - -##### Raises - -- **ValueError**: If the sample width is unsupported. - -#### `loop()` - -Main loop for anomaly detection, processing sensor data and invoking callbacks when anomalies are detected. - -#### `start()` - -Start the AnomalyDetection module and prepare for motion detection. - -#### `stop()` - -Stop the AnomalyDetection module and release resources. - diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/mood_detector/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/mood_detector/README.md deleted file mode 100644 index b72848c7..00000000 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/mood_detector/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Mood detector brick - -This brick analyzes text sentiment to detect the mood expressed. -It classifies text as positive, negative, or neutral. - -Examples: -- "I love this board!" -> positive -- "The weather is awful" -> negative -- "I am sad today" -> negative -- "The temperature is 25" -> neutral - -## Code example and usage - -```python -from arduino.app_bricks.mood_detector import MoodDetector - -mood_detection = MoodDetector() - -# Output: positive -print(mood_detection.get_sentiment("this application is nice")) -``` diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/vibration_anomaly_detection/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/vibration_anomaly_detection/README.md deleted file mode 100644 index 5d4b85fb..00000000 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/vibration_anomaly_detection/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Vibration Anomaly Detection Brick - -Leveraging pre-trained AI models, this brick enables vibration anomaly detection by processing accelerometer samples to identify anomalies in vibration patterns. -It can integrate with models provided by the framework or custom anomaly detection models trained via the Edge Impulse platform. - -## Code example and usage - -```python -from arduino.app_bricks.vibration_anomaly_detection import VibrationAnomalyDetection -from arduino.app_utils import App - -# For more information about anomaly score, please refers to: https://docs.edgeimpulse.com/studio/projects/learning-blocks/blocks/anomaly-detection-gmm -vibration_detection = VibrationAnomalyDetection(anomaly_detection_threshold=1.0) - -# Register function to receive samples from sketch -def record_sensor_movement(x: float, y: float, z: float): - # Acceleration from sensor is in g. While we need m/s^2. - x = x * 9.81 - y = y * 9.81 - z = z * 9.81 - - # Append the values to the sensor buffer. These samples will be sent to the model. - global motion_devibration_detectiontection - vibration_detection.accumulate_samples((x, y, z)) - -Bridge.provide("record_sensor_movement", record_sensor_movement) - -# Register action to take after successful detection -def on_detected_anomaly(anomaly_score: float, classification: dict): - print(f"Anomaly detected. Score: {anomaly_score}") - -vibration_detection.on_anomaly(on_detected_anomaly) - -App.run() -``` - -samples can be provided by accelerometer connected to microcontroller. -Here is an examples using a Modulino Movement accelerometer. - -```c++ -#include -#include - -// Create a ModulinoMovement object -ModulinoMovement movement; - -float x_accel, y_accel, z_accel; // Accelerometer values in g - -unsigned long previousMillis = 0; // Stores last time values were updated -const long interval = 16; // Interval at which to read (16ms) - sampling rate of 62.5Hz and should be adjusted based on model definition -int has_movement = 0; // Flag to indicate if movement data is available - -void setup() { - Bridge.begin(); - - // Initialize Modulino I2C communication - Modulino.begin(Wire1); - - // Detect and connect to movement sensor module - while (!movement.begin()) { - delay(1000); - } -} - -void loop() { - unsigned long currentMillis = millis(); // Get the current time - - if (currentMillis - previousMillis >= interval) { - // Save the last time you updated the values - previousMillis = currentMillis; - - // Read new movement data from the sensor - has_movement = movement.update(); - if(has_movement == 1) { - // Get acceleration values - x_accel = movement.getX(); - y_accel = movement.getY(); - z_accel = movement.getZ(); - - Bridge.notify("record_sensor_movement", x_accel, y_accel, z_accel); - } - - } -} -``` diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitoring/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/air_quality_monitoring/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitoring/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/air_quality_monitoring/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/arduino_cloud/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/arduino_cloud/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/arduino_cloud/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/arduino_cloud/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/audio_classification/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/audio_classification/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/audio_classification/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/audio_classification/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/camera_code_detection/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/camera_code_detection/API.md similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/camera_code_detection/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/camera_code_detection/API.md index 208e3c77..b1ebd3de 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/camera_code_detection/API.md +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/camera_code_detection/API.md @@ -24,7 +24,7 @@ Start the detector and begin scanning for codes. #### `stop()` -Stop the detector and release resources. +Stop the detector and release resources. #### `on_detect(callback: Callable[[Image, list[Detection]], None] | Callable[[Image, Detection], None] | None)` @@ -77,6 +77,10 @@ If None is provided, the callback is removed. - **callback** (*Callable*): A callback that will be called with the exception raised in the detector. - **callback** (*None*): Signals to remove the current callback, if any. +#### `loop()` + +Main loop to capture frames and detect codes. + --- diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/cloud_llm/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/cloud_llm/API.md similarity index 87% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/cloud_llm/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/cloud_llm/API.md index c00062ae..ba9da420 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/cloud_llm/API.md +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/cloud_llm/API.md @@ -21,8 +21,10 @@ This class provides a single interface to manage stateless chat and chat with me - **api_key**: The API key for the LLM service. - **model**: The model identifier as per LangChain specification (e.g., "anthropic:claude-3-sonnet-20240229") -or by using a CloudModels enum (e.g. CloudModels.OPENAI_GPT). +or by using a CloudModels enum (e.g. CloudModels.OPENAI_GPT). Defaults to CloudModel.ANTHROPIC_CLAUDE. - **system_prompt**: The global system-level instruction for the AI. +- **temperature**, default=0.7: The sampling temperature for response generation. Defaults to 0.7. +- **timeout**, default=30 seconds: The maximum time to wait for a response from the LLM service, in seconds. Defaults to 30 seconds. ### Raises diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md index 69c571ac..7ba1dc29 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md @@ -36,7 +36,7 @@ It is designed to be thread-safe and can be used in multi-threaded applications. ### Parameters -- **database_name** (*str*) (optional): Name of the SQLite database file. +- **database_name** (*str*) (optional): Name of the SQLite database file. Defaults to "arduino.db". ### Methods @@ -45,7 +45,7 @@ Defaults to "arduino.db". Open the SQLite database connection. -This method establishes the database connection and should be called before +This method establishes the database connection and should be called before performing any database operations. The connection is thread-safe and enables named column access using sqlite3.Row factory. @@ -96,7 +96,7 @@ Store data in the specified table with automatic table creation. By default, it - **table** (*str*): Name of the table to store the record in. - **data** (*dict[str, Any]*): Dictionary of column names and their values. Supported types: int (INTEGER), float (REAL), str (TEXT), bytes (BLOB). -- **create_table** (*bool*) (optional): If True, create the table if it doesn't exist +- **create_table** (*bool*) (optional): If True, create the table if it doesn't exist using automatic type inference. Defaults to True. ##### Raises @@ -110,18 +110,18 @@ Get data from the specified table with flexible filtering options. If the table ##### Parameters - **table** (*str*): Name of the table to read from. -- **columns** (*Optional[list]*) (optional): List of column names to select. +- **columns** (*Optional[list]*) (optional): List of column names to select. If None, selects all columns. Defaults to None. -- **condition** (*Optional[str]*) (optional): WHERE clause for filtering results +- **condition** (*Optional[str]*) (optional): WHERE clause for filtering results (e.g., "age > 18"). Defaults to None. -- **order_by** (*Optional[str]*) (optional): ORDER BY clause for sorting results +- **order_by** (*Optional[str]*) (optional): ORDER BY clause for sorting results (e.g., "name ASC"). Defaults to None. -- **limit** (*Optional[int]*) (optional): Maximum number of rows to return. +- **limit** (*Optional[int]*) (optional): Maximum number of rows to return. Use -1 for no limit. Defaults to -1. ##### Returns -- (*list[dict[str, Any]]*): List of dictionaries representing the rows, where each +- (*list[dict[str, Any]]*): List of dictionaries representing the rows, where each dictionary maps column names to their values. Empty list if table doesn't exist. ##### Raises @@ -136,7 +136,7 @@ Update data or records in the specified table. - **table** (*str*): Name of the table to update. - **data** (*dict[str, Any]*): Dictionary of column names and their new values. -- **condition** (*Optional[str]*) (optional): WHERE clause for filtering which records +- **condition** (*Optional[str]*) (optional): WHERE clause for filtering which records to update (e.g., "id = 1"). If empty, updates all records. Defaults to "". ##### Raises @@ -150,7 +150,7 @@ Delete data from the specified table. If no condition is provided, this will del ##### Parameters - **table** (*str*): Name of the table to delete from. -- **condition** (*Optional[str]*) (optional): WHERE clause for filtering which records +- **condition** (*Optional[str]*) (optional): WHERE clause for filtering which records to delete (e.g., "age < 18"). If empty, deletes all records. Defaults to "". ##### Raises diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md similarity index 94% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md index 774c8b50..de69bac8 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md @@ -31,11 +31,11 @@ It allows writing and reading individual measurements with their values and time ### Parameters -- **host** (*str*) (optional): The hostname of the InfluxDB server. +- **host** (*str*) (optional): The hostname of the InfluxDB server. Defaults to "dbstorage-influx". -- **port** (*int*) (optional): The port number of the InfluxDB server. +- **port** (*int*) (optional): The port number of the InfluxDB server. Defaults to 8086. -- **retention_days** (*int*) (optional): The number of days to retain data in the +- **retention_days** (*int*) (optional): The number of days to retain data in the InfluxDB bucket. Defaults to 7. ### Methods @@ -52,9 +52,9 @@ If no timestamp is provided, the current time is used automatically. - **measure** (*str*): The name of the measurement field (e.g., "temperature", "humidity"). This acts as the column name for the data point. - **value** (*Any*): The numeric or string value to store. Supports int, float, str, and bool types. -- **ts** (*int*) (optional): The timestamp in milliseconds since epoch. +- **ts** (*int*) (optional): The timestamp in milliseconds since epoch. Defaults to 0 (current time). -- **measurement_name** (*str*) (optional): The measurement container name that groups +- **measurement_name** (*str*) (optional): The measurement container name that groups related fields together. Defaults to "arduino". ##### Raises @@ -72,17 +72,17 @@ the given time range. ##### Parameters - **measure** (*str*): The name of the measurement field to query (e.g., "temperature"). -- **measurement_name** (*str*) (optional): The measurement container name to search within. +- **measurement_name** (*str*) (optional): The measurement container name to search within. Defaults to "arduino". - **start_from** (*str*) (optional): The time range to search within. Supports relative -periods like "-1d" (1 day), "-2h" (2 hours), "-30m" (30 minutes) or +periods like "-1d" (1 day), "-2h" (2 hours), "-30m" (30 minutes) or RFC3339 timestamps like "2024-01-01T00:00:00Z". Defaults to "-1d". ##### Returns -: tuple | None: A tuple containing (field_name, timestamp_iso, value) where: - field_name (str): The measurement field name -- timestamp_iso (str): ISO format timestamp string +- timestamp_iso (str): ISO format timestamp string - value (Any): The stored value Returns None if no data is found in the specified time range. @@ -100,7 +100,7 @@ for time range filtering, data aggregation, and result ordering. ##### Parameters - **measure** (*str*): The name of the measurement field to query (e.g., "temperature"). -- **measurement_name** (*str*) (optional): The measurement container name to search within. +- **measurement_name** (*str*) (optional): The measurement container name to search within. Defaults to "arduino". - **start_from** (*str*) (optional): The start time for the query range. Supports relative periods ("-7d", "-1h") or RFC3339 timestamps. Defaults to "-1d". @@ -109,11 +109,11 @@ as start_from or "now()". Defaults to None (current time). - **aggr_window** (*str*) (optional): Time window for data aggregation (e.g., "1h" for hourly, "30m" for 30-minute intervals). Must be used with aggr_func. Defaults to None. - **aggr_func** (*str*) (optional): Aggregation function to apply within each window. -Supported values: "mean", "max", "min", "sum". Must be used with aggr_window. +Supported values: "mean", "max", "min", "sum". Must be used with aggr_window. Defaults to None. -- **limit** (*int*) (optional): Maximum number of samples to return. Must be positive. +- **limit** (*int*) (optional): Maximum number of samples to return. Must be positive. Defaults to 1000. -- **order** (*str*) (optional): Sort order for results by timestamp. Must be "asc" +- **order** (*str*) (optional): Sort order for results by timestamp. Must be "asc" (ascending, oldest first) or "desc" (descending, newest first). Defaults to "asc". ##### Returns @@ -128,7 +128,7 @@ Empty list if no data found in the specified range. - **TimeSeriesStoreError**: If any parameter is invalid, such as: - Invalid time format in start_from or end_to -- Invalid order value (not "asc" or "desc") +- Invalid order value (not "asc" or "desc") - Invalid limit value (not positive integer) - Invalid aggregation function - Mismatched aggr_window and aggr_func (one specified without the other) diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/image_classification/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/image_classification/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/image_classification/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/image_classification/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotting/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/keyword_spotting/API.md similarity index 91% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotting/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/keyword_spotting/API.md index c606dad0..a36fc0bd 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotting/API.md +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/keyword_spotting/API.md @@ -14,17 +14,17 @@ class KeywordSpotting(mic: Microphone, confidence: float, debounce_sec: float) KeywordSpotting module for classifying audio data to detect keywords using a specified model. -Processes continuous audio input to classify and detect specific keywords or phrases -using pre-trained models. Supports both framework-provided models and custom models +Processes continuous audio input to classify and detect specific keywords or phrases +using pre-trained models. Supports both framework-provided models and custom models trained on Edge Impulse platform. ### Parameters -- **mic** (*Microphone*) (optional): Microphone instance for audio input. +- **mic** (*Microphone*) (optional): Microphone instance for audio input. If None, a default Microphone will be initialized. -- **confidence** (*float*) (optional): Confidence level for detection between 0.0 and 1.0. +- **confidence** (*float*) (optional): Confidence level for detection between 0.0 and 1.0. Defaults to 0.8 (80%). Higher values reduce false positives. -- **debounce_sec** (*float*) (optional): Minimum seconds between repeated detections +- **debounce_sec** (*float*) (optional): Minimum seconds between repeated detections of the same keyword. Defaults to 2.0 seconds. ### Raises @@ -39,9 +39,9 @@ Register a callback function to be invoked when a specific keyword is detected. ##### Parameters -- **keyword** (*str*): The keyword to check for in the classification results. +- **keyword** (*str*): The keyword to check for in the classification results. Must match the keyword as defined in the model. -- **callback** (*Callable[[], None]*): Callback function to run when the keyword is detected. +- **callback** (*Callable[[], None]*): Callback function to run when the keyword is detected. Must take no parameters and return None. ##### Raises diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/mood_detector/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/mood_detector/API.md new file mode 100644 index 00000000..f9e47fb2 --- /dev/null +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/mood_detector/API.md @@ -0,0 +1,36 @@ +# mood_detector API Reference + +## Index + +- Class `MoodDetector` + +--- + +## `MoodDetector` class + +```python +class MoodDetector() +``` + +A class to detect mood based on text sentiment analysis. It can classify text as **positive**, **negative**, or **neutral**. + +Notes: +- Case-insensitive; basic punctuation does not affect results. +- English-only. Non-English or mixed-language input may be treated as neutral. +- Empty or whitespace-only input typically returns neutral. +- Input must be plain text (str). + +### Methods + +#### `get_sentiment(text: str)` + +Analyze the sentiment of the provided text and return the mood. + +##### Parameters + +- **text** (*str*): The input text to analyze. + +##### Returns + +- (*str*): The mood of the text — one of `positive`, `negative`, or `neutral`. + diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/motion_detection/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/motion_detection/API.md similarity index 91% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/motion_detection/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/motion_detection/API.md index 24fd429d..08c380f6 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/motion_detection/API.md +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/motion_detection/API.md @@ -35,7 +35,8 @@ Accumulate accelerometer samples for motion detection. ##### Parameters -- **accelerometer_samples** (*tuple*): A tuple containing x, y, z acceleration values. Typically, these values are in m/s^2, but depends on the model configuration. +- **accelerometer_samples** (*tuple*): A tuple containing x, y, z acceleration values. Typically, these values are +in m/s^2, but depends on the model configuration. #### `get_sensor_samples()` diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/mqtt/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/mqtt/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/mqtt/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/mqtt/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/object_detection/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/object_detection/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/object_detection/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/object_detection/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/streamlit_ui/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/streamlit_ui/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/streamlit_ui/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/streamlit_ui/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md new file mode 100644 index 00000000..1f6a7f40 --- /dev/null +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md @@ -0,0 +1,104 @@ +# vibration_anomaly_detection API Reference + +## Index + +- Class `VibrationAnomalyDetection` + +--- + +## `VibrationAnomalyDetection` class + +```python +class VibrationAnomalyDetection(anomaly_detection_threshold: float) +``` + +Detect vibration anomalies from accelerometer time-series using a pre-trained + +Edge Impulse model. + +This Brick buffers incoming samples into a sliding window sized to the model’s +`input_features_count`, runs inference when a full window is available, extracts +the **anomaly score**, and (optionally) invokes a user-registered callback when +the score crosses a configurable threshold. + +Notes: + - Requires an active Edge Impulse runner; model info is fetched at init. + - The window size equals the model’s `input_features_count`; samples pushed + via `accumulate_samples()` are flattened before inference. + - The expected **units, axis order, and sampling rate** must match those + used during model training (e.g., m/s² vs g, [ax, ay, az], 100 Hz). + - A single callback is supported at a time (thread-safe registration). + +### Parameters + +- **anomaly_detection_threshold** (*float*): Threshold applied to the model’s +anomaly score to decide whether to trigger the registered callback. +Typical starting point is 1.0; tune based on your dataset. + +### Raises + +- **ValueError**: If the Edge Impulse runner is unreachable, or if the model +info is missing/invalid (e.g., non-positive `frequency` or +`input_features_count`). + +### Methods + +#### `accumulate_samples(sensor_samples: Iterable[float])` + +Append one or more accelerometer samples to the sliding window buffer. + +##### Parameters + +- **sensor_samples** (*Iterable[float]*): A sequence of numeric values. This can +be a single 3-axis sample `(ax, ay, az)`, multiple concatenated +triples, or any iterable whose flattened length contributes toward +the model’s `input_features_count`. + +##### Raises + +- **ValueError**: If `sensor_samples` is empty or None. + +#### `on_anomaly(callback: callable)` + +Register a handler to be invoked when an anomaly is detected. + +The callback signature can be one of: + - `callback()` + - `callback(anomaly_score: float)` + - `callback(anomaly_score: float, classification: dict)` + +##### Parameters + +- **callback** (*callable*): Function to invoke when `anomaly_score >= threshold`. +If a signature with `classification` is used and the model returns +an auxiliary classification head, a dict with label scores is passed. + +#### `loop()` + +Non-blocking processing step; run this periodically. + +Behavior: + - Pulls a full window from the buffer (if available). + - Runs inference via `infer_from_features(...)`. + - Extracts the anomaly score and, if `>= threshold`, invokes the + registered callback (respecting its signature). + +##### Raises + +- **StopIteration**: Propagated if an internal shutdown condition is signaled. + +#### `start()` + +Prepare the detector for a new session. + +Notes: + - Flushes the internal buffer so the next window starts clean. + - Call before beginning to stream new samples. + +#### `stop()` + +Stop the detector and release transient resources. + +Notes: + - Clears the internal buffer; does not alter the registered callback. + diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/video_imageclassification/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/video_imageclassification/API.md similarity index 95% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/video_imageclassification/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/video_imageclassification/API.md index 7591b1d9..b3c4c6d4 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/video_imageclassification/API.md +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/video_imageclassification/API.md @@ -19,7 +19,8 @@ Provides a way to react to detected classes over a video stream invoking registe ### Parameters - **confidence** (*float*): The minimum confidence level for a classification to be considered valid. Default is 0.3. -- **debounce_sec** (*float*): The minimum time in seconds between consecutive detections of the same object to avoid multiple triggers. Default is 0 seconds. +- **debounce_sec** (*float*): The minimum time in seconds between consecutive detections of the same object +to avoid multiple triggers. Default is 0 seconds. ### Raises @@ -67,7 +68,7 @@ label is detected. Start the classification stream. -This only sets the internal running flag. You must call +This only sets the internal running flag. You must call `execute` in a loop or a separate thread to actually begin receiving classification results. #### `stop()` diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/video_objectdetection/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/video_objectdetection/API.md similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/video_objectdetection/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/video_objectdetection/API.md index c8917517..97d3f9fa 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/video_objectdetection/API.md +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/video_objectdetection/API.md @@ -38,7 +38,7 @@ Register a callback invoked when a **specific label** is detected. ##### Parameters -- **label** (*str*): The object label to listen for (e.g., "person"). +- **object** (*str*): The label of the object to check for in the classification results. - **callback** (*Callable[[], None]*): A function with **no parameters**. ##### Raises diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/visual_anomaly_detection/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/visual_anomaly_detection/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/visual_anomaly_detection/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/visual_anomaly_detection/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/weather_forecast/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/weather_forecast/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/weather_forecast/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/weather_forecast/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/web_ui/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/web_ui/API.md similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/web_ui/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/web_ui/API.md index 6d2d579b..4619aed5 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/web_ui/API.md +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_bricks/web_ui/API.md @@ -90,8 +90,9 @@ with a message type suffix "_response". ##### Parameters -- **message_type** (*str*): The message type name to listen for. -- **callback** (*Callable[[str, any], any]*): Function to handle the message. Receives two arguments: the session ID (sid) and the incoming message data. +- **message_type** (*str*): The message type name to listen for. +- **callback** (*Callable[[str, any], any]*): Function to handle the message. Receives two arguments: +the session ID (sid) and the incoming message data. #### `send_message(message_type: str, message: dict | str, room: str)` diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_peripherals/microphone/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_peripherals/microphone/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_peripherals/microphone/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_peripherals/microphone/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_peripherals/speaker/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_peripherals/speaker/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_peripherals/speaker/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_peripherals/speaker/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_peripherals/usb_camera/API.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_peripherals/usb_camera/API.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_peripherals/usb_camera/API.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/api-docs/arduino/app_peripherals/usb_camera/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/bricks-list.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/bricks-list.yaml similarity index 99% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/bricks-list.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/bricks-list.yaml index 3a57baf9..a4747e86 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/bricks-list.yaml +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/bricks-list.yaml @@ -87,10 +87,8 @@ bricks: category: null variables: - name: ARDUINO_DEVICE_ID - default_value: description: Arduino Cloud Device ID - name: ARDUINO_SECRET - default_value: description: Arduino Cloud Secret - id: arduino:image_classification name: Image Classification diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/audio_classification/brick_compose.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/audio_classification/brick_compose.yaml similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/audio_classification/brick_compose.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/audio_classification/brick_compose.yaml index 08269c8d..6dbe38e4 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/audio_classification/brick_compose.yaml +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/audio_classification/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-audio-classifier-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/dbstorage_tsstore/brick_compose.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/dbstorage_tsstore/brick_compose.yaml similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/dbstorage_tsstore/brick_compose.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/dbstorage_tsstore/brick_compose.yaml diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/image_classification/brick_compose.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/image_classification/brick_compose.yaml similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/image_classification/brick_compose.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/image_classification/brick_compose.yaml index 184b7506..d8207271 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/image_classification/brick_compose.yaml +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/image_classification/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-classification-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/keyword_spotting/brick_compose.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/keyword_spotting/brick_compose.yaml similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/keyword_spotting/brick_compose.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/keyword_spotting/brick_compose.yaml index ce9e8c3c..b4dd7963 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/keyword_spotting/brick_compose.yaml +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/keyword_spotting/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-keyword-spot-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/motion_detection/brick_compose.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/motion_detection/brick_compose.yaml similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/motion_detection/brick_compose.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/motion_detection/brick_compose.yaml index 19c4fac5..ef7fc730 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/motion_detection/brick_compose.yaml +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/motion_detection/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-motion-detection-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/object_detection/brick_compose.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/object_detection/brick_compose.yaml similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/object_detection/brick_compose.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/object_detection/brick_compose.yaml index b0d9086f..9d418913 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/object_detection/brick_compose.yaml +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/object_detection/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-obj-detection-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/vibration_anomaly_detection/brick_compose.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/vibration_anomaly_detection/brick_compose.yaml similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/vibration_anomaly_detection/brick_compose.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/vibration_anomaly_detection/brick_compose.yaml index fd606beb..aca4e2a2 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/vibration_anomaly_detection/brick_compose.yaml +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/vibration_anomaly_detection/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-anomaly-detection-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/video_image_classification/brick_compose.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/video_image_classification/brick_compose.yaml similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/video_image_classification/brick_compose.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/video_image_classification/brick_compose.yaml index 9394996e..7e054acc 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/video_image_classification/brick_compose.yaml +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/video_image_classification/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-video-classification-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/video_object_detection/brick_compose.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/video_object_detection/brick_compose.yaml similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/video_object_detection/brick_compose.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/video_object_detection/brick_compose.yaml index 0b6a91d5..dbca6363 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/video_object_detection/brick_compose.yaml +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/video_object_detection/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-video-obj-detection-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/visual_anomaly_detection/brick_compose.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/visual_anomaly_detection/brick_compose.yaml similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/visual_anomaly_detection/brick_compose.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/visual_anomaly_detection/brick_compose.yaml index 08ef6b24..0e71d75a 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/visual_anomaly_detection/brick_compose.yaml +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/compose/arduino/visual_anomaly_detection/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-obj-video-anomalies-det-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/arduino_cloud/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/arduino_cloud/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/arduino_cloud/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/arduino_cloud/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/audio_classification/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/audio_classification/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/audio_classification/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/audio_classification/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/camera_code_detection/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/camera_code_detection/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/camera_code_detection/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/camera_code_detection/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/dbstorage_sqlstore/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/dbstorage_sqlstore/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/dbstorage_sqlstore/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/dbstorage_sqlstore/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/dbstorage_tsstore/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/dbstorage_tsstore/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/dbstorage_tsstore/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/dbstorage_tsstore/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/image_classification/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/image_classification/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/image_classification/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/image_classification/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/keyword_spotting/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/keyword_spotting/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/keyword_spotting/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/keyword_spotting/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/mood_detector/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/mood_detector/README.md new file mode 100644 index 00000000..23ede757 --- /dev/null +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/mood_detector/README.md @@ -0,0 +1,38 @@ +# Mood Detector Brick + +This directory contains the implementation of the Mood Detector Brick, which classifies text sentiment as positive, negative, or neutral using the NLTK VADER analyzer bundled with the Brick assets (no external download required at runtime). + +## Overview + +The Mood Detector Brick analyzes a sentence and returns its overall mood: "positive", "negative", or "neutral". It is lightweight, runs locally, and requires no internet connection. + +Examples: +- "I love this board!" -> positive +- "The weather is awful" -> negative +- "I am sad today" -> negative +- "The temperature is 25" -> neutral + + +## Features + +- Classifies text as positive, negative, or neutral. +- Runs locally; no external services required. +- Case-insensitive; robust to basic punctuation. +- Sensible defaults for edge cases: empty/whitespace -> neutral; non-English text -> typically neutral. +- Simple API: `MoodDetector.get_sentiment(text) -> str`. + +## Code example and usage + +```python +from arduino.app_bricks.mood_detector import MoodDetector + +mood = MoodDetector() + +print(mood.get_sentiment("This is a wonderful and amazing product!")) # positive +print(mood.get_sentiment("I am feeling very sad and disappointed today.")) # negative +print(mood.get_sentiment("The report will be ready by 5 PM.")) # neutral + +# Edge cases +print(mood.get_sentiment("")) # neutral (empty input) +print(mood.get_sentiment("Questo è bello")) # neutral (non-English) +``` diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/motion_detection/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/motion_detection/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/motion_detection/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/motion_detection/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/object_detection/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/object_detection/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/object_detection/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/object_detection/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/streamlit_ui/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/streamlit_ui/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/streamlit_ui/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/streamlit_ui/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/vibration_anomaly_detection/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/vibration_anomaly_detection/README.md new file mode 100644 index 00000000..520fecb1 --- /dev/null +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/vibration_anomaly_detection/README.md @@ -0,0 +1,121 @@ +# Vibration Anomaly Detection Brick + +This Brick lets you detect vibration anomalies from accelerometer data using a pre-trained Edge Impulse model. It’s ideal for condition monitoring, predictive maintenance, and automation projects. + +## Overview + +The Vibration Anomaly Detection Brick allows you to: + +- Stream accelerometer samples and evaluate the anomaly score per window. +- Trigger a callback automatically when the anomaly score crosses a threshold. +- Integrate quickly via a simple Python API and Arduino Router Bridge. + +## Features + +- **Edge-Impulse powered**: runs your deployed model via `EdgeImpulseRunnerFacade`. +- **Sliding window ingestion**: samples are buffered to the model’s exact input length. +- **Threshold callbacks**: invoke your handler when `anomaly_score ≥ threshold`. +- **Flexible callback signatures**: + - `callback()` + - `callback(anomaly_score: float)` + - `callback(anomaly_score: float, classification: dict)` (if your model returns a classification head alongside anomaly) + +## Code Example and Usage + +In the Python® part, use the following script that exposes the `record_sensor_movement` function and analyzes incoming accelerometer data: + +```python +from arduino.app_bricks.vibration_anomaly_detection import VibrationAnomalyDetection +from arduino.app_utils import * +import time + +logger = Logger("Vibration Anomaly Example") + +# Create the Brick with a chosen anomaly threshold +vibration = VibrationAnomalyDetection(anomaly_detection_threshold=1.0) + +# Register the callback to run when an anomaly is detected +def on_detected_anomaly(anomaly_score: float, classification: dict = None): + print(f"[Anomaly] score={anomaly_score:.3f}") + +# Expose a function that Arduino can call via Router Bridge +# Expecting accelerations in 'g' from the microcontroller +def record_sensor_movement(x_g: float, y_g: float, z_g: float): + # Convert to m/s^2 if your model was trained in SI units + G_TO_MS2 = 9.80665 + x = x_g * G_TO_MS2 + y = y_g * G_TO_MS2 + z = z_g * G_TO_MS2 + # Push a triple (x, y, z) into the sliding window + vibration.accumulate_samples((x, y, z)) + +vibration.on_anomaly(on_detected_anomaly) + +Bridge.provide("record_sensor_movement", record_sensor_movement) + +model_info = vibration.get_model_info() +period = 1.0 / model_info.frequency if model_info and model_info.frequency > 0 else 0.02 + +# Run the host app (handles Router Bridge and our processing loop) +logger.info(f"Starting App... model_freq={getattr(model_info, 'frequency', 'unknown')}Hz period={period:.4f}s") + +App.run() +``` + +Any accelerometer can provide samples. Here is an example using **Modulino Movement** via Arduino Router Bridge: + +```c++ +#include +#include + +// Create a ModulinoMovement object +ModulinoMovement movement; + +float x_accel, y_accel, z_accel; // Accelerometer values in g + +unsigned long previousMillis = 0; // Stores last time values were updated +const long interval = 10; // Interval at which to read (10ms) - 100Hz sampling rate, adjust based on model requirements +int has_movement = 0; // Flag to indicate if movement data is available + +void setup() { + Bridge.begin(); + + // Initialize Modulino I2C communication + Modulino.begin(Wire1); + + // Detect and connect to movement sensor module + while (!movement.begin()) { + delay(1000); + } +} + +void loop() { + unsigned long currentMillis = millis(); // Get the current time + + if (currentMillis - previousMillis >= interval) { + // Save the last time you updated the values + previousMillis = currentMillis; + + // Read new movement data from the sensor + has_movement = movement.update(); + if(has_movement == 1) { + // Get acceleration values + x_accel = movement.getX(); + y_accel = movement.getY(); + z_accel = movement.getZ(); + + Bridge.notify("record_sensor_movement", x_accel, y_accel, z_accel); + } + + } +} +``` + +## Working Principle + +Vibration anomaly models learn normal accelerometer patterns over time. Each new time-window is compared to that baseline and assigned an anomaly score—higher scores mean the vibration deviates unusually (e.g., new frequencies or amplitudes). + +- **Buffering:** Incoming samples are appended to a `SlidingWindowBuffer` sized to your model’s `input_features_count`. +- **Inference:** When a full window is available, features are passed to `EdgeImpulseRunnerFacade.infer_from_features(...)`. +- **Scoring:** The Brick extracts the anomaly score (and any optional classification output) from the inference result. +- **Callback:** If `anomaly_score ≥ anomaly_detection_threshold`, your registered `on_anomaly(...)` callback is invoked. \ No newline at end of file diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/video_image_classification/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/video_image_classification/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/video_image_classification/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/video_image_classification/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/video_object_detection/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/video_object_detection/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/video_object_detection/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/video_object_detection/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/visual_anomaly_detection/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/visual_anomaly_detection/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/visual_anomaly_detection/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/visual_anomaly_detection/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/weather_forecast/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/weather_forecast/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/weather_forecast/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/weather_forecast/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/web_ui/README.md b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/web_ui/README.md similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/docs/arduino/web_ui/README.md rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/docs/arduino/web_ui/README.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/arduino_cloud/1_led_blink.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/arduino_cloud/1_led_blink.py similarity index 99% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/arduino_cloud/1_led_blink.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/arduino_cloud/1_led_blink.py index 9b5fcf69..58cd9470 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/arduino_cloud/1_led_blink.py +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/arduino_cloud/1_led_blink.py @@ -15,6 +15,7 @@ def led_callback(client: object, value: bool): """Callback function to handle LED blink updates from cloud.""" print(f"LED blink value updated from cloud: {value}") + arduino_cloud.register("led", value=False, on_write=led_callback) App.start_brick(arduino_cloud) diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py similarity index 99% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py index 36a0d4fd..40371db7 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py @@ -15,6 +15,7 @@ def light_callback(client: object, value: Any): """Callback function to handle light updates from cloud.""" print(f"Light value updated from cloud: {value}") + arduino_cloud.register(ColoredLight("clight", swi=True, on_write=light_callback)) App.run() diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/arduino_cloud/3_light_with_colors_command.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/arduino_cloud/3_light_with_colors_command.py similarity index 81% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/arduino_cloud/3_light_with_colors_command.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/arduino_cloud/3_light_with_colors_command.py index cab82bdb..5e730ea9 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/arduino_cloud/3_light_with_colors_command.py +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/arduino_cloud/3_light_with_colors_command.py @@ -17,19 +17,15 @@ def light_callback(client: object, value: Any): """Callback function to handle light updates from cloud.""" print(f"Light value updated from cloud: {value}") + arduino_cloud.register(ColoredLight("clight", swi=True, on_write=light_callback)) App.start_brick(arduino_cloud) while True: - #randomize color + # randomize color arduino_cloud.clight.hue = random.randint(0, 360) arduino_cloud.clight.sat = random.randint(0, 100) arduino_cloud.clight.bri = random.randint(0, 100) - print( - f"Light set to " - f"hue: {arduino_cloud.clight.hue}, " - f"saturation: {arduino_cloud.clight.sat}, " - f"brightness: {arduino_cloud.clight.bri}" - ) + print(f"Light set to hue: {arduino_cloud.clight.hue}, saturation: {arduino_cloud.clight.sat}, brightness: {arduino_cloud.clight.bri}") time.sleep(3) diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/audio_classification/1_glass_breaking_from_mic.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/audio_classification/1_glass_breaking_from_mic.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/audio_classification/1_glass_breaking_from_mic.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/audio_classification/1_glass_breaking_from_mic.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/audio_classification/2_glass_breaking_from_file.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/audio_classification/2_glass_breaking_from_file.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/audio_classification/2_glass_breaking_from_file.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/audio_classification/2_glass_breaking_from_file.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/camera_code_detection/1_detection.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/camera_code_detection/1_detection.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/camera_code_detection/1_detection.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/camera_code_detection/1_detection.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/camera_code_detection/2_detection_list.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/camera_code_detection/2_detection_list.py similarity index 93% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/camera_code_detection/2_detection_list.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/camera_code_detection/2_detection_list.py index 844d1a85..6288d571 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/camera_code_detection/2_detection_list.py +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/camera_code_detection/2_detection_list.py @@ -19,4 +19,4 @@ def on_codes_detected(frame: Image, detections: list[Detection]): detector = CameraCodeDetection() detector.on_detect(on_codes_detected) -App.run() # This will block until the app is stopped \ No newline at end of file +App.run() # This will block until the app is stopped diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/camera_code_detection/3_detection_with_overrides.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/camera_code_detection/3_detection_with_overrides.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/camera_code_detection/3_detection_with_overrides.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/camera_code_detection/3_detection_with_overrides.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/dbstorage_sqlstore/store_and_read_example.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/dbstorage_sqlstore/store_and_read_example.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/dbstorage_sqlstore/store_and_read_example.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/dbstorage_sqlstore/store_and_read_example.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/dbstorage_tsstore/1_write_read.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/dbstorage_tsstore/1_write_read.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/dbstorage_tsstore/1_write_read.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/dbstorage_tsstore/1_write_read.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/dbstorage_tsstore/2_read_all_samples.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/dbstorage_tsstore/2_read_all_samples.py similarity index 89% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/dbstorage_tsstore/2_read_all_samples.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/dbstorage_tsstore/2_read_all_samples.py index ed5653af..2adee9d9 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/dbstorage_tsstore/2_read_all_samples.py +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/dbstorage_tsstore/2_read_all_samples.py @@ -17,8 +17,8 @@ # Read all samples for "temp" and "hum" from the database in the last 10 seconds -start_from = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(ts / 1000)) -end_to = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime((ts + 10 * 1000) / 1000)) +start_from = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime(ts / 1000)) +end_to = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime((ts + 10 * 1000) / 1000)) all_temp_samples = db.read_samples("temp", start_from=start_from, end_to=end_to) print("All temperature samples:") for sample in all_temp_samples: diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/image_classification/image_classification_example.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/image_classification/image_classification_example.py similarity index 98% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/image_classification/image_classification_example.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/image_classification/image_classification_example.py index 2f39ca7a..7dd28c57 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/image_classification/image_classification_example.py +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/image_classification/image_classification_example.py @@ -4,7 +4,6 @@ # EXAMPLE_NAME = "Image classification" from arduino.app_bricks.image_classification import ImageClassification -import os image_classification = ImageClassification() diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/keyword_spotting/1_hello_world.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/keyword_spotting/1_hello_world.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/keyword_spotting/1_hello_world.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/keyword_spotting/1_hello_world.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/object_detection/object_detection_example.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/object_detection/object_detection_example.py similarity index 98% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/object_detection/object_detection_example.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/object_detection/object_detection_example.py index fdea9071..f2ca3b9f 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/object_detection/object_detection_example.py +++ b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/object_detection/object_detection_example.py @@ -3,7 +3,6 @@ # SPDX-License-Identifier: MPL-2.0 # EXAMPLE_NAME = "Object Detection" -import os from arduino.app_bricks.object_detection import ObjectDetection object_detection = ObjectDetection() diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/visual_anomaly_detection/object_detection_example.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/visual_anomaly_detection/object_detection_example.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/visual_anomaly_detection/object_detection_example.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/visual_anomaly_detection/object_detection_example.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/weather_forecast/weather_forecast_by_city_example.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/weather_forecast/weather_forecast_by_city_example.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/weather_forecast/weather_forecast_by_city_example.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/weather_forecast/weather_forecast_by_city_example.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/weather_forecast/weather_forecast_by_coords_example.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/weather_forecast/weather_forecast_by_coords_example.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/weather_forecast/weather_forecast_by_coords_example.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/weather_forecast/weather_forecast_by_coords_example.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/web_ui/1_serve_webapp.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/web_ui/1_serve_webapp.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/web_ui/1_serve_webapp.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/web_ui/1_serve_webapp.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/web_ui/2_serve_webapp_and_api.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/web_ui/2_serve_webapp_and_api.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/web_ui/2_serve_webapp_and_api.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/web_ui/2_serve_webapp_and_api.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/web_ui/3_connect_disconnect.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/web_ui/3_connect_disconnect.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/web_ui/3_connect_disconnect.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/web_ui/3_connect_disconnect.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/web_ui/4_on_message.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/web_ui/4_on_message.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/web_ui/4_on_message.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/web_ui/4_on_message.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/web_ui/5_send_message.py b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/web_ui/5_send_message.py similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/web_ui/5_send_message.py rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/examples/arduino/web_ui/5_send_message.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/models-list.yaml b/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/models-list.yaml similarity index 100% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/models-list.yaml rename to debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.5.0/models-list.yaml diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitor/API.md b/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitor/API.md deleted file mode 100644 index 3de1748f..00000000 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitor/API.md +++ /dev/null @@ -1,192 +0,0 @@ -# air_quality_monitor API Reference - -## Index - -- Class `AQILevel` -- Class `AirQualityData` -- Class `AirQualityMonitor` -- Class `AirQualityLookupError` - ---- - -## `AQILevel` dataclass - -```python -class AQILevel() -``` - -Data class to represent AQI levels. - -### Attributes - -- **min_value** (*int*): Minimum AQI value for the level. -- **max_value** (*int*): Maximum AQI value for the level. -- **description** (*str*): Description of the AQI level. -- **color** (*str*): Color associated with the AQI level in hex. - - ---- - -## `AirQualityData` dataclass - -```python -class AirQualityData() -``` - -Data class to represent air quality data. - -### Attributes - -- **city** (*str*): Name of the city. -- **lat** (*float*): Latitude of the city. -- **lon** (*float*): Longitude of the city. -- **url** (*str*): URL for more information about the air quality data. -- **last_update** (*str*): Last update timestamp of the air quality data. -- **aqi** (*int*): Air Quality Index value. -- **dominantpol** (*str*): Dominant pollutant in the air. -- **iaqi** (*dict*): Individual AQI values for various pollutants. - -### Methods - -#### `pandas_dict()` - -Return the data as a dictionary suitable for pandas DataFrame. - - ---- - -## `AirQualityMonitor` class - -```python -class AirQualityMonitor(token: str) -``` - -Class to get air quality data from AQICN API. - -### Parameters - -- **token** (*str*): API token for AQICN service. - -### Raises - -- **ValueError**: If the token is not provided. - -### Methods - -#### `get_air_quality_by_city(city: str)` - -Get air quality data by city name. - -##### Parameters - -- **city** (*str*): Name of the city. - -##### Returns - -- (*AirQualityData*): Air quality assembled data. - -##### Raises - -- **AirQualityLookupError**: If the API request fails. - -#### `get_air_quality_by_coords(latitude: float, longitude: float)` - -Get air quality data by coordinates. - -##### Parameters - -- **latitude** (*float*): Latitude. -- **longitude** (*float*): Longitude. - -##### Returns - -- (*AirQualityData*): Air quality assembled data. - -##### Raises - -- **AirQualityLookupError**: If the API request fails. - -#### `get_air_quality_by_ip()` - -Get air quality data by IP address. - -##### Returns - -- (*AirQualityData*): Air quality assembled data. - -##### Raises - -- **AirQualityLookupError**: If the API request fails. - -#### `process(item: dict)` - -Process the input dictionary to get air quality data. - -##### Parameters - -- **item** (*dict*): Input dictionary containing either 'city', 'latitude' and 'longitude', or 'ip'. - -##### Returns - -- (*dict*): Air quality data. - -##### Raises - -- **ValueError**: If the input dictionary is not valid. - -#### `assemble_data(data: dict)` - -Create a payload for the air quality data. - -##### Parameters - -- **data** (*dict*): Air quality data. - -##### Returns - -- (*dict*): Payload with relevant air quality information. - -#### `map_aqi_level(aqi: int)` - -Returns AQILevel class matching provided AQI. - - ---- - -## `AirQualityLookupError` class - -```python -class AirQualityLookupError(message: str, status: str) -``` - -Custom exception for air quality lookup errors. - -### Parameters - -- **message** (*str*): Error message. -- **status** (*str*): Status of the error, defaults to None. - -### Methods - -#### `from_api_response(cls, data: dict)` - -AirQualityLookupError error handling based on response provided by AQI API. - -Documented errors: -- {"status": "error", "data": "Invalid key"} -- {"status": "error", "data": "Unknown station"} -- {"status": "error", "data": "Over quota"} -- {"status": "error", "data": "Invalid query"} -- {"status": "error", "data": "Too Many Requests"} -- {"status": "error", "data": "IP not allowed"} -- {"status": "error", "data": "Unknown error"} -- {"status": "error", "data": {"message": "..."}} - -##### Parameters - -- **data** (*dict*): Response data from the AQI API. - -##### Returns - -- (*AirQualityLookupError*): An instance of AirQualityLookupError with the error message and status. - diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/imageclassification/API.md b/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/imageclassification/API.md deleted file mode 100644 index 5fe4552e..00000000 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/imageclassification/API.md +++ /dev/null @@ -1,71 +0,0 @@ -# imageclassification API Reference - -## Index - -- Class `ImageClassification` - ---- - -## `ImageClassification` class - -```python -class ImageClassification(confidence: float) -``` - -Module for image analysis and content classification using machine learning. - -This module processes an input image and returns: -- Corresponding class labels -- Confidence scores for each classification - -### Parameters - -- **confidence** (*float*) (optional): Minimum confidence threshold for -classification results. Defaults to 0.3. - -### Methods - -#### `classify_from_file(image_path: str, confidence: float)` - -Process a local image file to be classified. - -##### Parameters - -- **image_path** (*str*): Path to the image file on the local file system. -- **confidence** (*float*): Minimum confidence threshold for classification results. Default is None (use module defaults). - -##### Returns - -- (*dict*): Classification results containing class names and confidence, or None if an error occurs. - -#### `classify(image_bytes, image_type: str, confidence: float)` - -Process an in-memory image to be classified. - -##### Parameters - -- **image_bytes**: Can be raw bytes (e.g., from a file or stream) or a preloaded PIL image. -- **image_type** (*str*), default='jpg': The image format ('jpg', 'jpeg', or 'png'). Required if using raw bytes. Defaults to 'jpg'. -- **confidence** (*float*): Minimum confidence threshold for classification results. Default is None (use module defaults). - -##### Returns - -- (*dict*): Classification results containing class names and confidence, or None if an error occurs. - -#### `process(item)` - -Process an item to classify objects in an image. - -This method supports two input formats: -- A string path to a local image file. -- A dictionary containing raw image bytes under the 'image' key, and optionally an 'image_type' key (e.g., 'jpg', 'png'). - -##### Parameters - -- **item**: A file path (str) or a dictionary with the 'image' and 'image_type' keys (dict). -'image_type' is optional while 'image' contains image as bytes. - -##### Returns - -- (*dict*): Classification results or None if an error occurs. - diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotter/API.md b/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotter/API.md deleted file mode 100644 index 2cbc3a86..00000000 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotter/API.md +++ /dev/null @@ -1,63 +0,0 @@ -# keyword_spotter API Reference - -## Index - -- Class `KeywordSpotter` - ---- - -## `KeywordSpotter` class - -```python -class KeywordSpotter(mic: Microphone, confidence: float, debounce_sec: float) -``` - -KeywordSpotter module for classifying audio data to detect keywords using a specified model. - -Processes continuous audio input to classify and detect specific keywords or phrases -using pre-trained models. Supports both framework-provided models and custom models -trained on Edge Impulse platform. - -### Parameters - -- **mic** (*Microphone*) (optional): Microphone instance for audio input. -If None, a default Microphone will be initialized. -- **confidence** (*float*) (optional): Confidence level for detection between 0.0 and 1.0. -Defaults to 0.8 (80%). Higher values reduce false positives. -- **debounce_sec** (*float*) (optional): Minimum seconds between repeated detections -of the same keyword. Defaults to 2.0 seconds. - -### Raises - -- **ValueError**: If the model information cannot be retrieved or if the model parameters are incomplete. - -### Methods - -#### `on_detect(keyword: str, callback: Callable[[], None])` - -Register a callback function to be invoked when a specific keyword is detected. - -##### Parameters - -- **keyword** (*str*): The keyword to check for in the classification results. -Must match the keyword as defined in the model. -- **callback** (*Callable[[], None]*): Callback function to run when the keyword is detected. -Must take no parameters and return None. - -##### Raises - -- **TypeError**: If callback is not callable. -- **ValueError**: If callback accepts any argument. - -#### `start()` - -Start the KeywordSpotter module and begin processing audio data. - -Begins continuous audio stream processing and keyword detection. - -#### `stop()` - -Stop the KeywordSpotter module and release resources. - -Stops audio processing and releases microphone and model resources. - diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/mood_detector/API.md b/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/mood_detector/API.md deleted file mode 100644 index 430a949f..00000000 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/mood_detector/API.md +++ /dev/null @@ -1,39 +0,0 @@ -# mood_detector API Reference - -## Index - -- Class `MoodDetector` - ---- - -## `MoodDetector` class - -```python -class MoodDetector() -``` - -A class to detect mood based on text sentiment analysis. - -As example, it can classify text as positive, negative, or neutral. - -Sentence: 'I love this board!' -> Analysis: positive -Sentence: 'the weather is awful' -> Analysis: negative -Sentence: 'I am sad today' -> Analysis: negative -Sentence: 'the temperature is 25' -> Analysis: neutral - -NOTE: Detector support English language only. - -### Methods - -#### `get_sentiment(text: str)` - -Analyze the sentiment of the provided text and return the mood. - -##### Parameters - -- **text** (*str*): The input text to analyze. - -##### Returns - -- (*str*): The mood of the text, which can be 'positive', 'negative', or 'neutral'. - diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/objectdetection/API.md b/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/objectdetection/API.md deleted file mode 100644 index 344d7144..00000000 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/objectdetection/API.md +++ /dev/null @@ -1,77 +0,0 @@ -# objectdetection API Reference - -## Index - -- Class `ObjectDetection` - ---- - -## `ObjectDetection` class - -```python -class ObjectDetection(confidence: float) -``` - -Module for object detection in images using a specified machine learning model. - -This module processes an input image and returns: -- Bounding boxes for detected objects -- Corresponding class labels -- Confidence scores for each detection - -### Methods - -#### `detect_from_file(image_path: str, confidence: float)` - -Process a local image file to detect and identify objects. - -##### Parameters - -- **image_path**: Path to the image file on the local file system. -- **confidence**: Minimum confidence threshold for detections. Default is None (use module defaults). - -##### Returns - -- (*dict*): Detection results containing class names, confidence, and bounding boxes. - -#### `detect(image_bytes, image_type: str, confidence: float)` - -Process an in-memory image to detect and identify objects. - -##### Parameters - -- **image_bytes**: Can be raw bytes (e.g., from a file or stream) or a preloaded PIL image. -- **image_type**, default='jpg': The image format ('jpg', 'jpeg', or 'png'). Required if using raw bytes. Defaults to 'jpg'. -- **confidence**: Minimum confidence threshold for detections. Default is None (use module defaults). - -##### Returns - -- (*dict*): Detection results containing class names, confidence, and bounding boxes. - -#### `draw_bounding_boxes(image: Image.Image | bytes, detections: dict)` - -Draw bounding boxes on an image enclosing detected objects using PIL. - -##### Parameters - -- **image**: The input image to annotate. Can be a PIL Image object or raw image bytes. -- **detections**: Detection results containing object labels and bounding boxes. - -##### Returns - --: Image with bounding boxes and key points drawn. -None if no detection or invalid image. - -#### `process(item)` - -Process an item to detect objects in an image. - -This method supports two input formats: -- A string path to a local image file. -- A dictionary containing raw image bytes under the 'image' key, and optionally an 'image_type' key (e.g., 'jpg', 'png'). - -##### Parameters - -- **item**: A file path (str) or a dictionary with the 'image' and 'image_type' keys (dict). -'image_type' is optional while 'image' contains image as bytes. - diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md b/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md deleted file mode 100644 index cf77dad9..00000000 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md +++ /dev/null @@ -1,59 +0,0 @@ -# vibration_anomaly_detection API Reference - -## Index - -- Class `VibrationAnomalyDetection` - ---- - -## `VibrationAnomalyDetection` class - -```python -class VibrationAnomalyDetection(anomaly_detection_threshold: float) -``` - -This Anomaly Detection module classifies accelerometr sensor data to detect vibration anomalies based on a pre-trained model. - -### Parameters - -- **anomaly_detection_threshold** (*float*): Confidence level for the anomaly score. Default is 1 (absolute value). - -### Methods - -#### `accumulate_samples(sensor_samples: Iterable[float])` - -Accumulate sensor samples - -##### Parameters - -- **sensor_samples** (*Iterable*): An iterable of sensor samples (e.g., accelerometer data). - -#### `on_anomaly(callback: callable)` - -Register a callback function to be invoked when an anomaly is detected. - -Function signature of the callback should be: - - callback() # No parameters - - callback(anomaly_score: float) - - callback(anomaly_score: float, classification: dict) - -##### Parameters - -- **callback** (*callable*): a callback function to handle label spotted. - -##### Raises - -- **ValueError**: If the sample width is unsupported. - -#### `loop()` - -Main loop for anomaly detection, processing sensor data and invoking callbacks when anomalies are detected. - -#### `start()` - -Start the AnomalyDetection module and prepare for motion detection. - -#### `stop()` - -Stop the AnomalyDetection module and release resources. - diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/mood_detector/README.md b/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/mood_detector/README.md deleted file mode 100644 index b72848c7..00000000 --- a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/mood_detector/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Mood detector brick - -This brick analyzes text sentiment to detect the mood expressed. -It classifies text as positive, negative, or neutral. - -Examples: -- "I love this board!" -> positive -- "The weather is awful" -> negative -- "I am sad today" -> negative -- "The temperature is 25" -> neutral - -## Code example and usage - -```python -from arduino.app_bricks.mood_detector import MoodDetector - -mood_detection = MoodDetector() - -# Output: positive -print(mood_detection.get_sentiment("this application is nice")) -``` diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/vibration_anomaly_detection/README.md b/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/vibration_anomaly_detection/README.md deleted file mode 100644 index 5d4b85fb..00000000 --- a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/vibration_anomaly_detection/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Vibration Anomaly Detection Brick - -Leveraging pre-trained AI models, this brick enables vibration anomaly detection by processing accelerometer samples to identify anomalies in vibration patterns. -It can integrate with models provided by the framework or custom anomaly detection models trained via the Edge Impulse platform. - -## Code example and usage - -```python -from arduino.app_bricks.vibration_anomaly_detection import VibrationAnomalyDetection -from arduino.app_utils import App - -# For more information about anomaly score, please refers to: https://docs.edgeimpulse.com/studio/projects/learning-blocks/blocks/anomaly-detection-gmm -vibration_detection = VibrationAnomalyDetection(anomaly_detection_threshold=1.0) - -# Register function to receive samples from sketch -def record_sensor_movement(x: float, y: float, z: float): - # Acceleration from sensor is in g. While we need m/s^2. - x = x * 9.81 - y = y * 9.81 - z = z * 9.81 - - # Append the values to the sensor buffer. These samples will be sent to the model. - global motion_devibration_detectiontection - vibration_detection.accumulate_samples((x, y, z)) - -Bridge.provide("record_sensor_movement", record_sensor_movement) - -# Register action to take after successful detection -def on_detected_anomaly(anomaly_score: float, classification: dict): - print(f"Anomaly detected. Score: {anomaly_score}") - -vibration_detection.on_anomaly(on_detected_anomaly) - -App.run() -``` - -samples can be provided by accelerometer connected to microcontroller. -Here is an examples using a Modulino Movement accelerometer. - -```c++ -#include -#include - -// Create a ModulinoMovement object -ModulinoMovement movement; - -float x_accel, y_accel, z_accel; // Accelerometer values in g - -unsigned long previousMillis = 0; // Stores last time values were updated -const long interval = 16; // Interval at which to read (16ms) - sampling rate of 62.5Hz and should be adjusted based on model definition -int has_movement = 0; // Flag to indicate if movement data is available - -void setup() { - Bridge.begin(); - - // Initialize Modulino I2C communication - Modulino.begin(Wire1); - - // Detect and connect to movement sensor module - while (!movement.begin()) { - delay(1000); - } -} - -void loop() { - unsigned long currentMillis = millis(); // Get the current time - - if (currentMillis - previousMillis >= interval) { - // Save the last time you updated the values - previousMillis = currentMillis; - - // Read new movement data from the sensor - has_movement = movement.update(); - if(has_movement == 1) { - // Get acceleration values - x_accel = movement.getX(); - y_accel = movement.getY(); - z_accel = movement.getZ(); - - Bridge.notify("record_sensor_movement", x_accel, y_accel, z_accel); - } - - } -} -``` diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitoring/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/air_quality_monitoring/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/air_quality_monitoring/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/air_quality_monitoring/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/arduino_cloud/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/arduino_cloud/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/arduino_cloud/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/arduino_cloud/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/audio_classification/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/audio_classification/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/audio_classification/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/audio_classification/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/camera_code_detection/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/camera_code_detection/API.md similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/camera_code_detection/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/camera_code_detection/API.md index 208e3c77..b1ebd3de 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/camera_code_detection/API.md +++ b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/camera_code_detection/API.md @@ -24,7 +24,7 @@ Start the detector and begin scanning for codes. #### `stop()` -Stop the detector and release resources. +Stop the detector and release resources. #### `on_detect(callback: Callable[[Image, list[Detection]], None] | Callable[[Image, Detection], None] | None)` @@ -77,6 +77,10 @@ If None is provided, the callback is removed. - **callback** (*Callable*): A callback that will be called with the exception raised in the detector. - **callback** (*None*): Signals to remove the current callback, if any. +#### `loop()` + +Main loop to capture frames and detect codes. + --- diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/cloud_llm/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/cloud_llm/API.md similarity index 87% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/cloud_llm/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/cloud_llm/API.md index c00062ae..ba9da420 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/cloud_llm/API.md +++ b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/cloud_llm/API.md @@ -21,8 +21,10 @@ This class provides a single interface to manage stateless chat and chat with me - **api_key**: The API key for the LLM service. - **model**: The model identifier as per LangChain specification (e.g., "anthropic:claude-3-sonnet-20240229") -or by using a CloudModels enum (e.g. CloudModels.OPENAI_GPT). +or by using a CloudModels enum (e.g. CloudModels.OPENAI_GPT). Defaults to CloudModel.ANTHROPIC_CLAUDE. - **system_prompt**: The global system-level instruction for the AI. +- **temperature**, default=0.7: The sampling temperature for response generation. Defaults to 0.7. +- **timeout**, default=30 seconds: The maximum time to wait for a response from the LLM service, in seconds. Defaults to 30 seconds. ### Raises diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md index 69c571ac..7ba1dc29 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md +++ b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_sqlstore/API.md @@ -36,7 +36,7 @@ It is designed to be thread-safe and can be used in multi-threaded applications. ### Parameters -- **database_name** (*str*) (optional): Name of the SQLite database file. +- **database_name** (*str*) (optional): Name of the SQLite database file. Defaults to "arduino.db". ### Methods @@ -45,7 +45,7 @@ Defaults to "arduino.db". Open the SQLite database connection. -This method establishes the database connection and should be called before +This method establishes the database connection and should be called before performing any database operations. The connection is thread-safe and enables named column access using sqlite3.Row factory. @@ -96,7 +96,7 @@ Store data in the specified table with automatic table creation. By default, it - **table** (*str*): Name of the table to store the record in. - **data** (*dict[str, Any]*): Dictionary of column names and their values. Supported types: int (INTEGER), float (REAL), str (TEXT), bytes (BLOB). -- **create_table** (*bool*) (optional): If True, create the table if it doesn't exist +- **create_table** (*bool*) (optional): If True, create the table if it doesn't exist using automatic type inference. Defaults to True. ##### Raises @@ -110,18 +110,18 @@ Get data from the specified table with flexible filtering options. If the table ##### Parameters - **table** (*str*): Name of the table to read from. -- **columns** (*Optional[list]*) (optional): List of column names to select. +- **columns** (*Optional[list]*) (optional): List of column names to select. If None, selects all columns. Defaults to None. -- **condition** (*Optional[str]*) (optional): WHERE clause for filtering results +- **condition** (*Optional[str]*) (optional): WHERE clause for filtering results (e.g., "age > 18"). Defaults to None. -- **order_by** (*Optional[str]*) (optional): ORDER BY clause for sorting results +- **order_by** (*Optional[str]*) (optional): ORDER BY clause for sorting results (e.g., "name ASC"). Defaults to None. -- **limit** (*Optional[int]*) (optional): Maximum number of rows to return. +- **limit** (*Optional[int]*) (optional): Maximum number of rows to return. Use -1 for no limit. Defaults to -1. ##### Returns -- (*list[dict[str, Any]]*): List of dictionaries representing the rows, where each +- (*list[dict[str, Any]]*): List of dictionaries representing the rows, where each dictionary maps column names to their values. Empty list if table doesn't exist. ##### Raises @@ -136,7 +136,7 @@ Update data or records in the specified table. - **table** (*str*): Name of the table to update. - **data** (*dict[str, Any]*): Dictionary of column names and their new values. -- **condition** (*Optional[str]*) (optional): WHERE clause for filtering which records +- **condition** (*Optional[str]*) (optional): WHERE clause for filtering which records to update (e.g., "id = 1"). If empty, updates all records. Defaults to "". ##### Raises @@ -150,7 +150,7 @@ Delete data from the specified table. If no condition is provided, this will del ##### Parameters - **table** (*str*): Name of the table to delete from. -- **condition** (*Optional[str]*) (optional): WHERE clause for filtering which records +- **condition** (*Optional[str]*) (optional): WHERE clause for filtering which records to delete (e.g., "age < 18"). If empty, deletes all records. Defaults to "". ##### Raises diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md similarity index 94% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md index 774c8b50..de69bac8 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md +++ b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/dbstorage_tsstore/API.md @@ -31,11 +31,11 @@ It allows writing and reading individual measurements with their values and time ### Parameters -- **host** (*str*) (optional): The hostname of the InfluxDB server. +- **host** (*str*) (optional): The hostname of the InfluxDB server. Defaults to "dbstorage-influx". -- **port** (*int*) (optional): The port number of the InfluxDB server. +- **port** (*int*) (optional): The port number of the InfluxDB server. Defaults to 8086. -- **retention_days** (*int*) (optional): The number of days to retain data in the +- **retention_days** (*int*) (optional): The number of days to retain data in the InfluxDB bucket. Defaults to 7. ### Methods @@ -52,9 +52,9 @@ If no timestamp is provided, the current time is used automatically. - **measure** (*str*): The name of the measurement field (e.g., "temperature", "humidity"). This acts as the column name for the data point. - **value** (*Any*): The numeric or string value to store. Supports int, float, str, and bool types. -- **ts** (*int*) (optional): The timestamp in milliseconds since epoch. +- **ts** (*int*) (optional): The timestamp in milliseconds since epoch. Defaults to 0 (current time). -- **measurement_name** (*str*) (optional): The measurement container name that groups +- **measurement_name** (*str*) (optional): The measurement container name that groups related fields together. Defaults to "arduino". ##### Raises @@ -72,17 +72,17 @@ the given time range. ##### Parameters - **measure** (*str*): The name of the measurement field to query (e.g., "temperature"). -- **measurement_name** (*str*) (optional): The measurement container name to search within. +- **measurement_name** (*str*) (optional): The measurement container name to search within. Defaults to "arduino". - **start_from** (*str*) (optional): The time range to search within. Supports relative -periods like "-1d" (1 day), "-2h" (2 hours), "-30m" (30 minutes) or +periods like "-1d" (1 day), "-2h" (2 hours), "-30m" (30 minutes) or RFC3339 timestamps like "2024-01-01T00:00:00Z". Defaults to "-1d". ##### Returns -: tuple | None: A tuple containing (field_name, timestamp_iso, value) where: - field_name (str): The measurement field name -- timestamp_iso (str): ISO format timestamp string +- timestamp_iso (str): ISO format timestamp string - value (Any): The stored value Returns None if no data is found in the specified time range. @@ -100,7 +100,7 @@ for time range filtering, data aggregation, and result ordering. ##### Parameters - **measure** (*str*): The name of the measurement field to query (e.g., "temperature"). -- **measurement_name** (*str*) (optional): The measurement container name to search within. +- **measurement_name** (*str*) (optional): The measurement container name to search within. Defaults to "arduino". - **start_from** (*str*) (optional): The start time for the query range. Supports relative periods ("-7d", "-1h") or RFC3339 timestamps. Defaults to "-1d". @@ -109,11 +109,11 @@ as start_from or "now()". Defaults to None (current time). - **aggr_window** (*str*) (optional): Time window for data aggregation (e.g., "1h" for hourly, "30m" for 30-minute intervals). Must be used with aggr_func. Defaults to None. - **aggr_func** (*str*) (optional): Aggregation function to apply within each window. -Supported values: "mean", "max", "min", "sum". Must be used with aggr_window. +Supported values: "mean", "max", "min", "sum". Must be used with aggr_window. Defaults to None. -- **limit** (*int*) (optional): Maximum number of samples to return. Must be positive. +- **limit** (*int*) (optional): Maximum number of samples to return. Must be positive. Defaults to 1000. -- **order** (*str*) (optional): Sort order for results by timestamp. Must be "asc" +- **order** (*str*) (optional): Sort order for results by timestamp. Must be "asc" (ascending, oldest first) or "desc" (descending, newest first). Defaults to "asc". ##### Returns @@ -128,7 +128,7 @@ Empty list if no data found in the specified range. - **TimeSeriesStoreError**: If any parameter is invalid, such as: - Invalid time format in start_from or end_to -- Invalid order value (not "asc" or "desc") +- Invalid order value (not "asc" or "desc") - Invalid limit value (not positive integer) - Invalid aggregation function - Mismatched aggr_window and aggr_func (one specified without the other) diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/image_classification/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/image_classification/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/image_classification/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/image_classification/API.md diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotting/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/keyword_spotting/API.md similarity index 91% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotting/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/keyword_spotting/API.md index c606dad0..a36fc0bd 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/keyword_spotting/API.md +++ b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/keyword_spotting/API.md @@ -14,17 +14,17 @@ class KeywordSpotting(mic: Microphone, confidence: float, debounce_sec: float) KeywordSpotting module for classifying audio data to detect keywords using a specified model. -Processes continuous audio input to classify and detect specific keywords or phrases -using pre-trained models. Supports both framework-provided models and custom models +Processes continuous audio input to classify and detect specific keywords or phrases +using pre-trained models. Supports both framework-provided models and custom models trained on Edge Impulse platform. ### Parameters -- **mic** (*Microphone*) (optional): Microphone instance for audio input. +- **mic** (*Microphone*) (optional): Microphone instance for audio input. If None, a default Microphone will be initialized. -- **confidence** (*float*) (optional): Confidence level for detection between 0.0 and 1.0. +- **confidence** (*float*) (optional): Confidence level for detection between 0.0 and 1.0. Defaults to 0.8 (80%). Higher values reduce false positives. -- **debounce_sec** (*float*) (optional): Minimum seconds between repeated detections +- **debounce_sec** (*float*) (optional): Minimum seconds between repeated detections of the same keyword. Defaults to 2.0 seconds. ### Raises @@ -39,9 +39,9 @@ Register a callback function to be invoked when a specific keyword is detected. ##### Parameters -- **keyword** (*str*): The keyword to check for in the classification results. +- **keyword** (*str*): The keyword to check for in the classification results. Must match the keyword as defined in the model. -- **callback** (*Callable[[], None]*): Callback function to run when the keyword is detected. +- **callback** (*Callable[[], None]*): Callback function to run when the keyword is detected. Must take no parameters and return None. ##### Raises diff --git a/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/mood_detector/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/mood_detector/API.md new file mode 100644 index 00000000..f9e47fb2 --- /dev/null +++ b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/mood_detector/API.md @@ -0,0 +1,36 @@ +# mood_detector API Reference + +## Index + +- Class `MoodDetector` + +--- + +## `MoodDetector` class + +```python +class MoodDetector() +``` + +A class to detect mood based on text sentiment analysis. It can classify text as **positive**, **negative**, or **neutral**. + +Notes: +- Case-insensitive; basic punctuation does not affect results. +- English-only. Non-English or mixed-language input may be treated as neutral. +- Empty or whitespace-only input typically returns neutral. +- Input must be plain text (str). + +### Methods + +#### `get_sentiment(text: str)` + +Analyze the sentiment of the provided text and return the mood. + +##### Parameters + +- **text** (*str*): The input text to analyze. + +##### Returns + +- (*str*): The mood of the text — one of `positive`, `negative`, or `neutral`. + diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/motion_detection/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/motion_detection/API.md similarity index 91% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/motion_detection/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/motion_detection/API.md index 24fd429d..08c380f6 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/motion_detection/API.md +++ b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/motion_detection/API.md @@ -35,7 +35,8 @@ Accumulate accelerometer samples for motion detection. ##### Parameters -- **accelerometer_samples** (*tuple*): A tuple containing x, y, z acceleration values. Typically, these values are in m/s^2, but depends on the model configuration. +- **accelerometer_samples** (*tuple*): A tuple containing x, y, z acceleration values. Typically, these values are +in m/s^2, but depends on the model configuration. #### `get_sensor_samples()` diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/mqtt/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/mqtt/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/mqtt/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/mqtt/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/object_detection/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/object_detection/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/object_detection/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/object_detection/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/streamlit_ui/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/streamlit_ui/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/streamlit_ui/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/streamlit_ui/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md new file mode 100644 index 00000000..1f6a7f40 --- /dev/null +++ b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/vibration_anomaly_detection/API.md @@ -0,0 +1,104 @@ +# vibration_anomaly_detection API Reference + +## Index + +- Class `VibrationAnomalyDetection` + +--- + +## `VibrationAnomalyDetection` class + +```python +class VibrationAnomalyDetection(anomaly_detection_threshold: float) +``` + +Detect vibration anomalies from accelerometer time-series using a pre-trained + +Edge Impulse model. + +This Brick buffers incoming samples into a sliding window sized to the model’s +`input_features_count`, runs inference when a full window is available, extracts +the **anomaly score**, and (optionally) invokes a user-registered callback when +the score crosses a configurable threshold. + +Notes: + - Requires an active Edge Impulse runner; model info is fetched at init. + - The window size equals the model’s `input_features_count`; samples pushed + via `accumulate_samples()` are flattened before inference. + - The expected **units, axis order, and sampling rate** must match those + used during model training (e.g., m/s² vs g, [ax, ay, az], 100 Hz). + - A single callback is supported at a time (thread-safe registration). + +### Parameters + +- **anomaly_detection_threshold** (*float*): Threshold applied to the model’s +anomaly score to decide whether to trigger the registered callback. +Typical starting point is 1.0; tune based on your dataset. + +### Raises + +- **ValueError**: If the Edge Impulse runner is unreachable, or if the model +info is missing/invalid (e.g., non-positive `frequency` or +`input_features_count`). + +### Methods + +#### `accumulate_samples(sensor_samples: Iterable[float])` + +Append one or more accelerometer samples to the sliding window buffer. + +##### Parameters + +- **sensor_samples** (*Iterable[float]*): A sequence of numeric values. This can +be a single 3-axis sample `(ax, ay, az)`, multiple concatenated +triples, or any iterable whose flattened length contributes toward +the model’s `input_features_count`. + +##### Raises + +- **ValueError**: If `sensor_samples` is empty or None. + +#### `on_anomaly(callback: callable)` + +Register a handler to be invoked when an anomaly is detected. + +The callback signature can be one of: + - `callback()` + - `callback(anomaly_score: float)` + - `callback(anomaly_score: float, classification: dict)` + +##### Parameters + +- **callback** (*callable*): Function to invoke when `anomaly_score >= threshold`. +If a signature with `classification` is used and the model returns +an auxiliary classification head, a dict with label scores is passed. + +#### `loop()` + +Non-blocking processing step; run this periodically. + +Behavior: + - Pulls a full window from the buffer (if available). + - Runs inference via `infer_from_features(...)`. + - Extracts the anomaly score and, if `>= threshold`, invokes the + registered callback (respecting its signature). + +##### Raises + +- **StopIteration**: Propagated if an internal shutdown condition is signaled. + +#### `start()` + +Prepare the detector for a new session. + +Notes: + - Flushes the internal buffer so the next window starts clean. + - Call before beginning to stream new samples. + +#### `stop()` + +Stop the detector and release transient resources. + +Notes: + - Clears the internal buffer; does not alter the registered callback. + diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/video_imageclassification/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/video_imageclassification/API.md similarity index 95% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/video_imageclassification/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/video_imageclassification/API.md index 7591b1d9..b3c4c6d4 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/video_imageclassification/API.md +++ b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/video_imageclassification/API.md @@ -19,7 +19,8 @@ Provides a way to react to detected classes over a video stream invoking registe ### Parameters - **confidence** (*float*): The minimum confidence level for a classification to be considered valid. Default is 0.3. -- **debounce_sec** (*float*): The minimum time in seconds between consecutive detections of the same object to avoid multiple triggers. Default is 0 seconds. +- **debounce_sec** (*float*): The minimum time in seconds between consecutive detections of the same object +to avoid multiple triggers. Default is 0 seconds. ### Raises @@ -67,7 +68,7 @@ label is detected. Start the classification stream. -This only sets the internal running flag. You must call +This only sets the internal running flag. You must call `execute` in a loop or a separate thread to actually begin receiving classification results. #### `stop()` diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/video_objectdetection/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/video_objectdetection/API.md similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/video_objectdetection/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/video_objectdetection/API.md index c8917517..97d3f9fa 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/api-docs/arduino/app_bricks/video_objectdetection/API.md +++ b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/video_objectdetection/API.md @@ -38,7 +38,7 @@ Register a callback invoked when a **specific label** is detected. ##### Parameters -- **label** (*str*): The object label to listen for (e.g., "person"). +- **object** (*str*): The label of the object to check for in the classification results. - **callback** (*Callable[[], None]*): A function with **no parameters**. ##### Raises diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/visual_anomaly_detection/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/visual_anomaly_detection/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/visual_anomaly_detection/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/visual_anomaly_detection/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/weather_forecast/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/weather_forecast/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/weather_forecast/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/weather_forecast/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/web_ui/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/web_ui/API.md similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/web_ui/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/web_ui/API.md index 6d2d579b..4619aed5 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_bricks/web_ui/API.md +++ b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_bricks/web_ui/API.md @@ -90,8 +90,9 @@ with a message type suffix "_response". ##### Parameters -- **message_type** (*str*): The message type name to listen for. -- **callback** (*Callable[[str, any], any]*): Function to handle the message. Receives two arguments: the session ID (sid) and the incoming message data. +- **message_type** (*str*): The message type name to listen for. +- **callback** (*Callable[[str, any], any]*): Function to handle the message. Receives two arguments: +the session ID (sid) and the incoming message data. #### `send_message(message_type: str, message: dict | str, room: str)` diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_peripherals/microphone/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_peripherals/microphone/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_peripherals/microphone/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_peripherals/microphone/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_peripherals/speaker/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_peripherals/speaker/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_peripherals/speaker/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_peripherals/speaker/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_peripherals/usb_camera/API.md b/internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_peripherals/usb_camera/API.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/api-docs/arduino/app_peripherals/usb_camera/API.md rename to internal/e2e/daemon/testdata/assets/0.5.0/api-docs/arduino/app_peripherals/usb_camera/API.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/bricks-list.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/bricks-list.yaml similarity index 99% rename from internal/e2e/daemon/testdata/assets/0.4.8/bricks-list.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/bricks-list.yaml index 3a57baf9..a4747e86 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/bricks-list.yaml +++ b/internal/e2e/daemon/testdata/assets/0.5.0/bricks-list.yaml @@ -87,10 +87,8 @@ bricks: category: null variables: - name: ARDUINO_DEVICE_ID - default_value: description: Arduino Cloud Device ID - name: ARDUINO_SECRET - default_value: description: Arduino Cloud Secret - id: arduino:image_classification name: Image Classification diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/audio_classification/brick_compose.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/audio_classification/brick_compose.yaml similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/audio_classification/brick_compose.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/audio_classification/brick_compose.yaml index 08269c8d..6dbe38e4 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/audio_classification/brick_compose.yaml +++ b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/audio_classification/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-audio-classifier-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/dbstorage_tsstore/brick_compose.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/dbstorage_tsstore/brick_compose.yaml similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/dbstorage_tsstore/brick_compose.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/dbstorage_tsstore/brick_compose.yaml diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/image_classification/brick_compose.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/image_classification/brick_compose.yaml similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/image_classification/brick_compose.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/image_classification/brick_compose.yaml index 184b7506..d8207271 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/image_classification/brick_compose.yaml +++ b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/image_classification/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-classification-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/keyword_spotting/brick_compose.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/keyword_spotting/brick_compose.yaml similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/keyword_spotting/brick_compose.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/keyword_spotting/brick_compose.yaml index ce9e8c3c..b4dd7963 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/keyword_spotting/brick_compose.yaml +++ b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/keyword_spotting/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-keyword-spot-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/motion_detection/brick_compose.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/motion_detection/brick_compose.yaml similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/motion_detection/brick_compose.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/motion_detection/brick_compose.yaml index 19c4fac5..ef7fc730 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/motion_detection/brick_compose.yaml +++ b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/motion_detection/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-motion-detection-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/object_detection/brick_compose.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/object_detection/brick_compose.yaml similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/object_detection/brick_compose.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/object_detection/brick_compose.yaml index b0d9086f..9d418913 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/object_detection/brick_compose.yaml +++ b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/object_detection/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-obj-detection-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/vibration_anomaly_detection/brick_compose.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/vibration_anomaly_detection/brick_compose.yaml similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/vibration_anomaly_detection/brick_compose.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/vibration_anomaly_detection/brick_compose.yaml index fd606beb..aca4e2a2 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/vibration_anomaly_detection/brick_compose.yaml +++ b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/vibration_anomaly_detection/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-anomaly-detection-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/video_image_classification/brick_compose.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/video_image_classification/brick_compose.yaml similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/video_image_classification/brick_compose.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/video_image_classification/brick_compose.yaml index 9394996e..7e054acc 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/video_image_classification/brick_compose.yaml +++ b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/video_image_classification/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-video-classification-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/video_object_detection/brick_compose.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/video_object_detection/brick_compose.yaml similarity index 97% rename from internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/video_object_detection/brick_compose.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/video_object_detection/brick_compose.yaml index 0b6a91d5..dbca6363 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/compose/arduino/video_object_detection/brick_compose.yaml +++ b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/video_object_detection/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-video-obj-detection-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/visual_anomaly_detection/brick_compose.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/visual_anomaly_detection/brick_compose.yaml similarity index 97% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/visual_anomaly_detection/brick_compose.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/visual_anomaly_detection/brick_compose.yaml index 08ef6b24..0e71d75a 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/compose/arduino/visual_anomaly_detection/brick_compose.yaml +++ b/internal/e2e/daemon/testdata/assets/0.5.0/compose/arduino/visual_anomaly_detection/brick_compose.yaml @@ -2,7 +2,7 @@ # CUSTOM_MODEL_PATH = path to the custom model directory services: ei-obj-video-anomalies-det-runner: - image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.4.5 + image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.5.0 logging: driver: "json-file" options: diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/arduino_cloud/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/arduino_cloud/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/arduino_cloud/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/arduino_cloud/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/audio_classification/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/audio_classification/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/audio_classification/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/audio_classification/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/camera_code_detection/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/camera_code_detection/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/camera_code_detection/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/camera_code_detection/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/dbstorage_sqlstore/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/dbstorage_sqlstore/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/dbstorage_sqlstore/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/dbstorage_sqlstore/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/dbstorage_tsstore/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/dbstorage_tsstore/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/dbstorage_tsstore/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/dbstorage_tsstore/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/image_classification/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/image_classification/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/image_classification/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/image_classification/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/keyword_spotting/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/keyword_spotting/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/keyword_spotting/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/keyword_spotting/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/mood_detector/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/mood_detector/README.md new file mode 100644 index 00000000..23ede757 --- /dev/null +++ b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/mood_detector/README.md @@ -0,0 +1,38 @@ +# Mood Detector Brick + +This directory contains the implementation of the Mood Detector Brick, which classifies text sentiment as positive, negative, or neutral using the NLTK VADER analyzer bundled with the Brick assets (no external download required at runtime). + +## Overview + +The Mood Detector Brick analyzes a sentence and returns its overall mood: "positive", "negative", or "neutral". It is lightweight, runs locally, and requires no internet connection. + +Examples: +- "I love this board!" -> positive +- "The weather is awful" -> negative +- "I am sad today" -> negative +- "The temperature is 25" -> neutral + + +## Features + +- Classifies text as positive, negative, or neutral. +- Runs locally; no external services required. +- Case-insensitive; robust to basic punctuation. +- Sensible defaults for edge cases: empty/whitespace -> neutral; non-English text -> typically neutral. +- Simple API: `MoodDetector.get_sentiment(text) -> str`. + +## Code example and usage + +```python +from arduino.app_bricks.mood_detector import MoodDetector + +mood = MoodDetector() + +print(mood.get_sentiment("This is a wonderful and amazing product!")) # positive +print(mood.get_sentiment("I am feeling very sad and disappointed today.")) # negative +print(mood.get_sentiment("The report will be ready by 5 PM.")) # neutral + +# Edge cases +print(mood.get_sentiment("")) # neutral (empty input) +print(mood.get_sentiment("Questo è bello")) # neutral (non-English) +``` diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/motion_detection/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/motion_detection/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/motion_detection/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/motion_detection/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/object_detection/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/object_detection/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/object_detection/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/object_detection/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/streamlit_ui/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/streamlit_ui/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/streamlit_ui/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/streamlit_ui/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/vibration_anomaly_detection/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/vibration_anomaly_detection/README.md new file mode 100644 index 00000000..520fecb1 --- /dev/null +++ b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/vibration_anomaly_detection/README.md @@ -0,0 +1,121 @@ +# Vibration Anomaly Detection Brick + +This Brick lets you detect vibration anomalies from accelerometer data using a pre-trained Edge Impulse model. It’s ideal for condition monitoring, predictive maintenance, and automation projects. + +## Overview + +The Vibration Anomaly Detection Brick allows you to: + +- Stream accelerometer samples and evaluate the anomaly score per window. +- Trigger a callback automatically when the anomaly score crosses a threshold. +- Integrate quickly via a simple Python API and Arduino Router Bridge. + +## Features + +- **Edge-Impulse powered**: runs your deployed model via `EdgeImpulseRunnerFacade`. +- **Sliding window ingestion**: samples are buffered to the model’s exact input length. +- **Threshold callbacks**: invoke your handler when `anomaly_score ≥ threshold`. +- **Flexible callback signatures**: + - `callback()` + - `callback(anomaly_score: float)` + - `callback(anomaly_score: float, classification: dict)` (if your model returns a classification head alongside anomaly) + +## Code Example and Usage + +In the Python® part, use the following script that exposes the `record_sensor_movement` function and analyzes incoming accelerometer data: + +```python +from arduino.app_bricks.vibration_anomaly_detection import VibrationAnomalyDetection +from arduino.app_utils import * +import time + +logger = Logger("Vibration Anomaly Example") + +# Create the Brick with a chosen anomaly threshold +vibration = VibrationAnomalyDetection(anomaly_detection_threshold=1.0) + +# Register the callback to run when an anomaly is detected +def on_detected_anomaly(anomaly_score: float, classification: dict = None): + print(f"[Anomaly] score={anomaly_score:.3f}") + +# Expose a function that Arduino can call via Router Bridge +# Expecting accelerations in 'g' from the microcontroller +def record_sensor_movement(x_g: float, y_g: float, z_g: float): + # Convert to m/s^2 if your model was trained in SI units + G_TO_MS2 = 9.80665 + x = x_g * G_TO_MS2 + y = y_g * G_TO_MS2 + z = z_g * G_TO_MS2 + # Push a triple (x, y, z) into the sliding window + vibration.accumulate_samples((x, y, z)) + +vibration.on_anomaly(on_detected_anomaly) + +Bridge.provide("record_sensor_movement", record_sensor_movement) + +model_info = vibration.get_model_info() +period = 1.0 / model_info.frequency if model_info and model_info.frequency > 0 else 0.02 + +# Run the host app (handles Router Bridge and our processing loop) +logger.info(f"Starting App... model_freq={getattr(model_info, 'frequency', 'unknown')}Hz period={period:.4f}s") + +App.run() +``` + +Any accelerometer can provide samples. Here is an example using **Modulino Movement** via Arduino Router Bridge: + +```c++ +#include +#include + +// Create a ModulinoMovement object +ModulinoMovement movement; + +float x_accel, y_accel, z_accel; // Accelerometer values in g + +unsigned long previousMillis = 0; // Stores last time values were updated +const long interval = 10; // Interval at which to read (10ms) - 100Hz sampling rate, adjust based on model requirements +int has_movement = 0; // Flag to indicate if movement data is available + +void setup() { + Bridge.begin(); + + // Initialize Modulino I2C communication + Modulino.begin(Wire1); + + // Detect and connect to movement sensor module + while (!movement.begin()) { + delay(1000); + } +} + +void loop() { + unsigned long currentMillis = millis(); // Get the current time + + if (currentMillis - previousMillis >= interval) { + // Save the last time you updated the values + previousMillis = currentMillis; + + // Read new movement data from the sensor + has_movement = movement.update(); + if(has_movement == 1) { + // Get acceleration values + x_accel = movement.getX(); + y_accel = movement.getY(); + z_accel = movement.getZ(); + + Bridge.notify("record_sensor_movement", x_accel, y_accel, z_accel); + } + + } +} +``` + +## Working Principle + +Vibration anomaly models learn normal accelerometer patterns over time. Each new time-window is compared to that baseline and assigned an anomaly score—higher scores mean the vibration deviates unusually (e.g., new frequencies or amplitudes). + +- **Buffering:** Incoming samples are appended to a `SlidingWindowBuffer` sized to your model’s `input_features_count`. +- **Inference:** When a full window is available, features are passed to `EdgeImpulseRunnerFacade.infer_from_features(...)`. +- **Scoring:** The Brick extracts the anomaly score (and any optional classification output) from the inference result. +- **Callback:** If `anomaly_score ≥ anomaly_detection_threshold`, your registered `on_anomaly(...)` callback is invoked. \ No newline at end of file diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/video_image_classification/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/video_image_classification/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/video_image_classification/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/video_image_classification/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/video_object_detection/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/video_object_detection/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/video_object_detection/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/video_object_detection/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/visual_anomaly_detection/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/visual_anomaly_detection/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/visual_anomaly_detection/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/visual_anomaly_detection/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/weather_forecast/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/weather_forecast/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/weather_forecast/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/weather_forecast/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/web_ui/README.md b/internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/web_ui/README.md similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/docs/arduino/web_ui/README.md rename to internal/e2e/daemon/testdata/assets/0.5.0/docs/arduino/web_ui/README.md diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/arduino_cloud/1_led_blink.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/arduino_cloud/1_led_blink.py similarity index 99% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/arduino_cloud/1_led_blink.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/arduino_cloud/1_led_blink.py index 9b5fcf69..58cd9470 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/arduino_cloud/1_led_blink.py +++ b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/arduino_cloud/1_led_blink.py @@ -15,6 +15,7 @@ def led_callback(client: object, value: bool): """Callback function to handle LED blink updates from cloud.""" print(f"LED blink value updated from cloud: {value}") + arduino_cloud.register("led", value=False, on_write=led_callback) App.start_brick(arduino_cloud) diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py similarity index 99% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py index 36a0d4fd..40371db7 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py +++ b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/arduino_cloud/2_light_with_colors_monitor.py @@ -15,6 +15,7 @@ def light_callback(client: object, value: Any): """Callback function to handle light updates from cloud.""" print(f"Light value updated from cloud: {value}") + arduino_cloud.register(ColoredLight("clight", swi=True, on_write=light_callback)) App.run() diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/arduino_cloud/3_light_with_colors_command.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/arduino_cloud/3_light_with_colors_command.py similarity index 81% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/arduino_cloud/3_light_with_colors_command.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/arduino_cloud/3_light_with_colors_command.py index cab82bdb..5e730ea9 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/arduino_cloud/3_light_with_colors_command.py +++ b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/arduino_cloud/3_light_with_colors_command.py @@ -17,19 +17,15 @@ def light_callback(client: object, value: Any): """Callback function to handle light updates from cloud.""" print(f"Light value updated from cloud: {value}") + arduino_cloud.register(ColoredLight("clight", swi=True, on_write=light_callback)) App.start_brick(arduino_cloud) while True: - #randomize color + # randomize color arduino_cloud.clight.hue = random.randint(0, 360) arduino_cloud.clight.sat = random.randint(0, 100) arduino_cloud.clight.bri = random.randint(0, 100) - print( - f"Light set to " - f"hue: {arduino_cloud.clight.hue}, " - f"saturation: {arduino_cloud.clight.sat}, " - f"brightness: {arduino_cloud.clight.bri}" - ) + print(f"Light set to hue: {arduino_cloud.clight.hue}, saturation: {arduino_cloud.clight.sat}, brightness: {arduino_cloud.clight.bri}") time.sleep(3) diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/audio_classification/1_glass_breaking_from_mic.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/audio_classification/1_glass_breaking_from_mic.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/audio_classification/1_glass_breaking_from_mic.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/audio_classification/1_glass_breaking_from_mic.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/audio_classification/2_glass_breaking_from_file.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/audio_classification/2_glass_breaking_from_file.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/audio_classification/2_glass_breaking_from_file.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/audio_classification/2_glass_breaking_from_file.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/camera_code_detection/1_detection.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/camera_code_detection/1_detection.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/camera_code_detection/1_detection.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/camera_code_detection/1_detection.py diff --git a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/camera_code_detection/2_detection_list.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/camera_code_detection/2_detection_list.py similarity index 93% rename from debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/camera_code_detection/2_detection_list.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/camera_code_detection/2_detection_list.py index 844d1a85..6288d571 100644 --- a/debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets/0.4.8/examples/arduino/camera_code_detection/2_detection_list.py +++ b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/camera_code_detection/2_detection_list.py @@ -19,4 +19,4 @@ def on_codes_detected(frame: Image, detections: list[Detection]): detector = CameraCodeDetection() detector.on_detect(on_codes_detected) -App.run() # This will block until the app is stopped \ No newline at end of file +App.run() # This will block until the app is stopped diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/camera_code_detection/3_detection_with_overrides.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/camera_code_detection/3_detection_with_overrides.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/camera_code_detection/3_detection_with_overrides.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/camera_code_detection/3_detection_with_overrides.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/dbstorage_sqlstore/store_and_read_example.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/dbstorage_sqlstore/store_and_read_example.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/dbstorage_sqlstore/store_and_read_example.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/dbstorage_sqlstore/store_and_read_example.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/dbstorage_tsstore/1_write_read.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/dbstorage_tsstore/1_write_read.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/dbstorage_tsstore/1_write_read.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/dbstorage_tsstore/1_write_read.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/dbstorage_tsstore/2_read_all_samples.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/dbstorage_tsstore/2_read_all_samples.py similarity index 89% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/dbstorage_tsstore/2_read_all_samples.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/dbstorage_tsstore/2_read_all_samples.py index ed5653af..2adee9d9 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/dbstorage_tsstore/2_read_all_samples.py +++ b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/dbstorage_tsstore/2_read_all_samples.py @@ -17,8 +17,8 @@ # Read all samples for "temp" and "hum" from the database in the last 10 seconds -start_from = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(ts / 1000)) -end_to = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime((ts + 10 * 1000) / 1000)) +start_from = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime(ts / 1000)) +end_to = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime((ts + 10 * 1000) / 1000)) all_temp_samples = db.read_samples("temp", start_from=start_from, end_to=end_to) print("All temperature samples:") for sample in all_temp_samples: diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/image_classification/image_classification_example.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/image_classification/image_classification_example.py similarity index 98% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/image_classification/image_classification_example.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/image_classification/image_classification_example.py index 2f39ca7a..7dd28c57 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/image_classification/image_classification_example.py +++ b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/image_classification/image_classification_example.py @@ -4,7 +4,6 @@ # EXAMPLE_NAME = "Image classification" from arduino.app_bricks.image_classification import ImageClassification -import os image_classification = ImageClassification() diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/keyword_spotting/1_hello_world.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/keyword_spotting/1_hello_world.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/keyword_spotting/1_hello_world.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/keyword_spotting/1_hello_world.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/object_detection/object_detection_example.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/object_detection/object_detection_example.py similarity index 98% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/object_detection/object_detection_example.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/object_detection/object_detection_example.py index fdea9071..f2ca3b9f 100644 --- a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/object_detection/object_detection_example.py +++ b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/object_detection/object_detection_example.py @@ -3,7 +3,6 @@ # SPDX-License-Identifier: MPL-2.0 # EXAMPLE_NAME = "Object Detection" -import os from arduino.app_bricks.object_detection import ObjectDetection object_detection = ObjectDetection() diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/visual_anomaly_detection/object_detection_example.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/visual_anomaly_detection/object_detection_example.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/visual_anomaly_detection/object_detection_example.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/visual_anomaly_detection/object_detection_example.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/weather_forecast/weather_forecast_by_city_example.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/weather_forecast/weather_forecast_by_city_example.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/weather_forecast/weather_forecast_by_city_example.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/weather_forecast/weather_forecast_by_city_example.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/weather_forecast/weather_forecast_by_coords_example.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/weather_forecast/weather_forecast_by_coords_example.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/weather_forecast/weather_forecast_by_coords_example.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/weather_forecast/weather_forecast_by_coords_example.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/web_ui/1_serve_webapp.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/web_ui/1_serve_webapp.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/web_ui/1_serve_webapp.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/web_ui/1_serve_webapp.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/web_ui/2_serve_webapp_and_api.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/web_ui/2_serve_webapp_and_api.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/web_ui/2_serve_webapp_and_api.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/web_ui/2_serve_webapp_and_api.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/web_ui/3_connect_disconnect.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/web_ui/3_connect_disconnect.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/web_ui/3_connect_disconnect.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/web_ui/3_connect_disconnect.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/web_ui/4_on_message.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/web_ui/4_on_message.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/web_ui/4_on_message.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/web_ui/4_on_message.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/web_ui/5_send_message.py b/internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/web_ui/5_send_message.py similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/examples/arduino/web_ui/5_send_message.py rename to internal/e2e/daemon/testdata/assets/0.5.0/examples/arduino/web_ui/5_send_message.py diff --git a/internal/e2e/daemon/testdata/assets/0.4.8/models-list.yaml b/internal/e2e/daemon/testdata/assets/0.5.0/models-list.yaml similarity index 100% rename from internal/e2e/daemon/testdata/assets/0.4.8/models-list.yaml rename to internal/e2e/daemon/testdata/assets/0.5.0/models-list.yaml diff --git a/internal/orchestrator/config/config.go b/internal/orchestrator/config/config.go index 93726d01..0838f29d 100644 --- a/internal/orchestrator/config/config.go +++ b/internal/orchestrator/config/config.go @@ -28,7 +28,7 @@ import ( ) // runnerVersion do not edit, this is generate with `task generate:assets` -var runnerVersion = "0.4.8" +var runnerVersion = "0.5.0" type Configuration struct { appsDir *paths.Path