Skip to content

Commit

Permalink
Air Purifier Example App (#29861)
Browse files Browse the repository at this point in the history
* Adding Air Purifier example framework and basic app, WIP

* wip, started adding class structures

* A messy yet stable version of the air-purifier, doesn't build as need to merge bug fix from upstream, WIP

* Added TODO and tested following merge

* The Air Quality Cluster API changed so updated constructor to take hard-coded features for now

* Added common device callback interface and changed the MatterPostAttributeChangeCallback to call that

* Changed the way we initialise the singleton Air Purifier Manager

* Add air-purifier example for Ameba platform

* Fixed wrong cluster revision in zap for concentraitons

* Add air-purifier example for CC32xx platform

* Add LastChangedTime and ReplaceableProductList To zap For HEPAFREMON And ACFREMON

* Updates to zap file for missing attributes and commands

* Adding PICS for the example

* Add PostchangeCallback To CC32XX Example

needed for writing the percentSetting to percentCurrent

* Fix Zap File for RH

- set Min/max/ MeasuredValue
- enable tolerance attribute

* Fix Zap File For Temp Measurement

* Update ClusterRev For Thermostat From 5 To 6

* Update FeatureMap For Fan Control

* Regenerate Matter File From Previous Zap Changes

* Add Button Handler For CC32XX

As a workaround save the KVS to NV when long pressing the right button.
This can be used to save the state after e.g. a unpair.

* Use Common filter-delegates.cpp For CC32XX Example

* Switched thermostat pics to be AbsLimits on the setpoint

* Updated the zapfile for thermostat

* Adding thermostat manager

* Changed all temperatures to be *100 and added callthrough from top level manager to thermostat when handling attribute changes

* Added thermostat endpoint into init call

* Changed name of attribute write handlers

* Changed name of attribute write handlers

* Add Thermostat-manager To CC32XX example

* Add helper script for executing Air-Purifier tests

* Remove duplicate line in air-purifier test runner script

* Adding CHIP header comment to files

* Removing Thermostat as the tests are broken for our use case

* Removing TSTAT tests

* Adding PICS folder in common with XML and simple PICS

* Add Correct Device Type And Name

* Removing Thermostat as the tests are broken for our use case

* Add A Way To Reset The Matter Part Of The Device For CC32XX Air Purifier Example App

this just deletes the kvs.cfg file on long pressing SW3

* Update README

* Remove Commented Code

* Update Copyright For CC32xx To 2023

* Update Copyright to 2023 For Ameba

* Regenned after merging upstream

* Added clearer Fan Mode support and some comments

* Added comment re: TODO for thermostat endpoint

* Restyled by whitespace

* Restyled by clang-format

* Restyled by gn

* Restyled by prettier-markdown

* Restyled by shellharden

* Removed missing reference in cc32xx readme

* Adding README for linux and adding all README's to the docs toctree

* Attempt 2 at setting toctree for new readmes

* Fix whitespace in script

* Restyled by shfmt

* Fixed spelling mistake in Readme

* Update include paths

* Add Ameba air-purifier example readme file

* Add words to wordlist

* Removed PICS and script, changed cc32xx headers to use pragma once

* Restyled by clang-format

* Restyled by prettier-markdown

* Removed TODO's from common code as they were not relevant

* Revert "Add words to wordlist"

This reverts commit 894a129.

* Replace indentations with fenced code blocks and minor tidy up within air purifier example readme file

* Removed old debug comments from gn file

* Added linux air-purifier-app to the helper script for building examples

* Added air-purifier example for linux to CI

* Restyled by prettier-markdown

---------

Co-authored-by: Chris Mapp <chris.mapp@dyson.com>
Co-authored-by: Graf Tobias <4622393+tobiasgraf@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
4 people authored and pull[bot] committed Dec 14, 2023
1 parent 68e37d2 commit 3435501
Show file tree
Hide file tree
Showing 58 changed files with 23,329 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@ jobs:
"./scripts/build/build_examples.py \
--target linux-x64-contact-sensor-no-ble-with-ui \
build"
- name: Build example Air Purifier
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-air-purifier \
build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
linux debug air-purifier-app \
out/linux-x64-air-purifier/chip-air-purifier-app \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@
"condition_variable": "cpp",
"numeric": "cpp",
"random": "cpp",
"thread": "cpp"
"thread": "cpp",
"variant": "cpp",
"any": "cpp"
},
// Configure paths or glob patterns to exclude from file watching.
"files.watcherExclude": {
Expand Down
11 changes: 10 additions & 1 deletion docs/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,20 @@ window-app/**/README
resource-monitoring-app/**/README
```

## Air Quality Sensor example
## RVC example

```{toctree}
:glob:
:maxdepth: 1
rvc-app/README
```

## Air Purifier Example

```{toctree}
:glob:
:maxdepth: 1
air-purifier-app/**/README
```
24 changes: 24 additions & 0 deletions examples/air-purifier-app/air-purifier-common/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/chip.gni")
import("${chip_root}/src/app/chip_data_model.gni")

chip_data_model("air-purifier-common") {
zap_file = "air-purifier-app.zap"

zap_pregenerated_dir =
"${chip_root}/zzz_generated/air-purifier-app/zap-generated"
is_server = true
}
Loading

0 comments on commit 3435501

Please sign in to comment.