From 9bb0d83f268da8ddccbbdf83f1f407227323c915 Mon Sep 17 00:00:00 2001 From: David Stone Date: Thu, 16 May 2024 14:51:10 +1000 Subject: [PATCH] Initial working revision of Movus API Added UDT generation for both fitMachine and fitPower sensors. --- movus_fitmachine/README.md | 1 + movus_fitmachine/config.yaml | 50 ++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 movus_fitmachine/README.md create mode 100644 movus_fitmachine/config.yaml diff --git a/movus_fitmachine/README.md b/movus_fitmachine/README.md new file mode 100644 index 0000000..99796f7 --- /dev/null +++ b/movus_fitmachine/README.md @@ -0,0 +1 @@ +# MyQ YAML \ No newline at end of file diff --git a/movus_fitmachine/config.yaml b/movus_fitmachine/config.yaml new file mode 100644 index 0000000..79a6465 --- /dev/null +++ b/movus_fitmachine/config.yaml @@ -0,0 +1,50 @@ +version: 4 + +api: + name: MOVUS Vibration Monitoring + description: Interfaces with Movus MachineCloud Dashboard by Movus Australia + version: 4.0.0 + author: + name: David Stone + email: david.stone@gpselec.com.au + url: https://gpselec.com.au + +httpsVerification: false + +variables: + baseUrl: + default: https://api.movus.com.au + required: true + hidden: true + apiKey: + required: true + +authType: + type: none + +headers: + - key: Authorization + value: "{{var::apiKey}}" + +functions: + devices: + url: "{{var::baseUrl}}/public/prod/devices" + method: get + schedule: + type: timer + duration: 5 + unit: minutes + actions: + - action: tag + type: jsonExpand + udts: + - id: fitMachine + defPath: "{{var::apiName}}/movusFitMachine" + items: "{{jsonPath::$._embedded.devices[?(@.sensor_type == 'fitmachine')]}}" + path: "{{var::apiName}}/vibrationDevice" + name: "{{jsonPath::item::$.id}}" + - id: fitPower + defPath: "{{var::apiName}}/movusFitPower" + items: "{{jsonPath::$._embedded.devices[?(@.sensor_type == 'fitpower')]}}" + path: "{{var::apiName}}/powerDevice" + name: "{{jsonPath::item::$.id}}" \ No newline at end of file