Skip to content

Commit

Permalink
Dev 1.0 (#10)
Browse files Browse the repository at this point in the history
* Update VAQUAO sensor DTDL

* Rename vaquao to vaqao

* Update THr DTDL

* Change vaqao Sensor model version

* Change THr Sensor Model version

* fix device ids for vaqaO

* Fix device name and ids for THr

* Fix for SensO

* Update Codec report standard

* Remove Status field from SensO

* Update docker images with Code update

* Update S0 sensor

* Add Unit Tests

* Add Unit Tests

* Fix CI

* Fix CI

* Update .gitmodules

* remove old submodules

* Update CI

* Add coverage in CI

* Fix working Directory for CI

* Launch build only after tests

* Fix CI

* Make replaceCodecImports.sh executable at test phase

* Add coverage requirements

* Update requirements + fix replaceCodecImports

* update pytest to 6.2.5

* Change py test method

* ---

* ---

* ---

* ---

* ---

* Update dockerfiles

* Update Sens'O DTDL

* Rename DTDL files

* Rename Watecco to Watteco

* Rename organization

* Rename https://github.com/kbeaugrand-org/iotedge-lorawan-watteco/

* Add Presso

* ---

* Add tests during CD phase

* Update CODEOWNERS
  • Loading branch information
kbeaugrand authored Oct 23, 2021
1 parent 8373fdf commit 098661f
Show file tree
Hide file tree
Showing 36 changed files with 3,640 additions and 1,000 deletions.
34 changes: 33 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,50 @@ on:
types: [published]
workflow_dispatch:


env:
image_name: kbeaugrand/az-iotedge-watteco-decoder-module
module_path: src/modules/WattecoDecoderModule

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
name: "Test the decoder"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install dependencies
working-directory: ${{ env.module_path }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Make Codec files replacements
working-directory: ${{ env.module_path }}
run: |
chmod +x replaceCodecImports.sh
./replaceCodecImports.sh
- name: Test with pytest
working-directory: ${{ env.module_path }}
run: pytest --cov=./ --cov-report=xml test_main.py

# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: tests
strategy:
matrix:
arch:
Expand Down
43 changes: 38 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,60 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
image_name: kbeaugrand/az-iotedge-watteco-decoder-module
module_path: src/modules/WattecoDecoderModule

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
name: "Test the decoder"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install dependencies
working-directory: ${{ env.module_path }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Make Codec files replacements
working-directory: ${{ env.module_path }}
run: |
chmod +x replaceCodecImports.sh
./replaceCodecImports.sh
- name: Test with pytest
working-directory: ${{ env.module_path }}
run: pytest --cov=./ --cov-report=xml test_main.py

# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: tests
strategy:
matrix:
arch: [amd64, arm32v7, arm64v8]
env:
image_name: kbeaugrand/az-iotedge-watteco-decoder-module
tag_name: 0.0.1
module_path: src/modules/WattecoDecoderModule

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: true
submodules: true

# - name: Docker Login
# # You may pin to the exact commit or the version.
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.pytest_cache
__pycache__
.coverage
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.testing.pytestArgs": [
"src"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

# Azure IoT Edge LoRaWAN Watteco Sensors Support

[![Build](https://github.com/kbeaugrand/iotedge-lorawan-watecco-decoder/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/kbeaugrand/iotedge-lorawan-watecco-decoder/actions/workflows/ci.yml)
[![Continuous Deployment](https://github.com/kbeaugrand/iotedge-lorawan-watecco-decoder/actions/workflows/cd.yml/badge.svg)](https://github.com/kbeaugrand/iotedge-lorawan-watecco-decoder/actions/workflows/cd.yml)
[![Build](https://github.com/kbeaugrand-org/iotedge-lorawan-watteco/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/kbeaugrand-org/iotedge-lorawan-watteco/actions/workflows/ci.yml)
[![Continuous Deployment](https://github.com/kbeaugrand-org/iotedge-lorawan-watteco/actions/workflows/cd.yml/badge.svg)](https://github.com/kbeaugrand-org/iotedge-lorawan-watteco/actions/workflows/cd.yml)

## Description

This repository stores the code for executing an Azure IoT Edge LoRaWAN Decoder module for Watecco Sensors.
This repository stores the code for executing an Azure IoT Edge LoRaWAN Decoder module for watteco Sensors.

### Batch Uncompress

Expand All @@ -27,26 +27,26 @@ To distinguish which kind of frame is present, the decoding function will be awa

__Current Version__ of NKE uncompress module used is __1.0.5__.

| Sensor Name | Decoder Endpoint |
|-----------------------------------------|---------------------------------|
| 50-70-001 S0 | /api/s0 |
| 50-70-007 THr harvesting | /api/thr |
| 50-70-011 Senso | /api/senso |
| 50-70-[014/039/051/072/079] PulseSenso | /api/pulsesenso |
| 50-70-016 Presso | /api/presso |
| 50-70-[043/142] Remote temperature | /api/remotetemperature |
| 50-70-049 Celso | /api/celso |
| 50-70-053 TH | /api/th |
| 50-70-071 Flasho | /api/flasho |
| 50-70-074 VAQAO+Plus | /api/vaqaoplus |
| 50-70-085 T | /api/t |
| 50-70-099 Atmo | /api/atmo |
| 50-70-101 Ventilo | /api/ventilo |
| 50-70-108 Closo | /api/closo |
| 50-70-123 PulseSenso Atex Zone 1 | /api/pulsesensoatexz1 |
| 50-70-139 Remote temperature 2CTN | /api/remotetemperature2ctn |
| 50-70-168 VAQAO | /api/vaqao |
| 50-70-098 Intens'O | /api/stdframe |
| Sensor Name | Decoder Endpoint | |
|-----------------------------------------|---------------------------------|-----|
| 50-70-001 S0 | /api/s0 | [X] |
| 50-70-007 THr harvesting | /api/thr | [X] |
| 50-70-011 Senso | /api/senso | [X] |
| 50-70-[014/039/051/072/079] PulseSenso | /api/pulsesenso | [ ] |
| 50-70-016 Presso | /api/presso | [X] |
| 50-70-[043/142] Remote temperature | /api/remotetemperature | [ ] |
| 50-70-049 Celso | /api/celso | [ ] |
| 50-70-053 TH | /api/th | [ ] |
| 50-70-071 Flasho | /api/flasho | [ ] |
| 50-70-074 VAQAO+Plus | /api/vaqaoplus | [X] |
| 50-70-085 T | /api/t | [ ] |
| 50-70-099 Atmo | /api/atmo | [X] |
| 50-70-101 Ventilo | /api/ventilo | [ ] |
| 50-70-108 Closo | /api/closo | [ ] |
| 50-70-123 PulseSenso Atex Zone 1 | /api/pulsesensoatexz1 | [ ] |
| 50-70-139 Remote temperature 2CTN | /api/remotetemperature2ctn | [ ] |
| 50-70-168 VAQAO | /api/vaqao | [X] |
| 50-70-098 Intens'O | /api/stdframe | [ ] |

## Deploy

Expand Down
202 changes: 0 additions & 202 deletions dtdl/Watecco - S0 Sensor (50-70-001).json

This file was deleted.

Loading

0 comments on commit 098661f

Please sign in to comment.