Skip to content

Commit

Permalink
Merge pull request #4 from zwave-js/main
Browse files Browse the repository at this point in the history
1
  • Loading branch information
Aeotec-ccheng authored Sep 24, 2024
2 parents 36c4bdc + e057476 commit 88a8425
Show file tree
Hide file tree
Showing 25 changed files with 870 additions and 1,161 deletions.
1 change: 1 addition & 0 deletions .github/scripts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "commonjs"}
16 changes: 7 additions & 9 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
Expand All @@ -38,9 +38,6 @@ jobs:
- name: Check TypeScript code
run: yarn check

- name: Compile TypeScript code
run: yarn build

- name: Run linter
run: yarn run lint

Expand All @@ -52,7 +49,7 @@ jobs:

- name: Check file download/integrity of changed files
if: github.event_name == 'pull_request'
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand All @@ -75,10 +72,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
Expand All @@ -90,10 +87,11 @@ jobs:
run: yarn build:index

- name: Publish to Cloudflare
uses: cloudflare/wrangler-action@2.0.0
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
packageManager: yarn

- name: Upload config files to Cloudflare
env:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ node_modules/
.env
.dev.vars
keys.txt
.mf
.mf/
.wrangler/
test_requests

# Auto-generated firmware index
Expand Down
26 changes: 26 additions & 0 deletions firmwares/aeotec/ZW175-C.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"devices": [
{
"brand": "Aeotec",
"model": "ZW175-C",
"manufacturerId": "0x0371",
"productType": "0x0003", // EU
"productId": "0x00af"
}
],
"upgrades": [
{
"version": "1.3",
"channel": "stable",
//"region": "europe",
"changelog": "Bug Fixes:\n* Fixes threshold reporting to allow a change in threshold to initiate multiple reports if there is watt change that is above 0W",
"files": [
{
"target": 0,
"url": "https://aeotec.freshdesk.com/helpdesk/attachments/6191002461",
"integrity": "sha256:e948ea85e536a98cc0ad824fe8c92db9b2de8fe8058a9c44a1fd1a7af6e8c98c"
}
]
}
]
}
27 changes: 27 additions & 0 deletions firmwares/aeotec/ZWA023-A.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"devices": [
{
"brand": "Aeotec",
"model": "ZWA023",
"manufacturerId": "0x0371",
"productType": "0x0103", //US
"productId": "0x0017"
}
],
"upgrades": [
{
"$if": "firmwareVersion < 1.3.2",
"version": "1.3.2",
"channel": "stable",
//"region": "usa",
"changelog": "Bug Fixes:\n* Fixes issue with Color CC commands not processing when encapsulated by Supervisor",
"files": [
{
"target": 0,
"url": "https://aeotec.freshdesk.com/helpdesk/attachments/6200541808",
"integrity": "sha256:12361a44d35ded6877db4616832625dfba1a87e4d0b8dbeb074b614ce38300dc"
}
]
}
]
}
28 changes: 28 additions & 0 deletions firmwares/qubino/zmnhtd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"devices": [
{
"brand": "Qubino",
"model": "Smart Meter",
"manufacturerId": "0x0159",
"productType": "0x0007",
"productId": "0x0052",
"firmwareVersion": {
"min": "0.0",
"max": "255.255"
}
}
],
"upgrades": [
{
"version": "80.1",
"changelog": "## [80.01] - [2020-11-09]\n- removed security S0\n- changed PN from ZMNHTD1 H1S7P1 to ZMNHTD1 H1S8P1\n- other minor fixes and improvements\n## [07.11] - [2020-03-27]\n- fixed device reset locally encapsulation if multichannel association is set\n- fixed unsecure manufacturer specific get when device is included as S0\n- fixed supervision report for basic & configuration command class\n- fixed supervision reports for multichannel association, powerlevel & switch binary\n- other minor fixes and improvements\n## [07.10] - [2019-11-18] \n- fixed OTA update in secure inclusion\n- fixed association group info report for endpoints\n- fixed reporting from invalid endpoints\n- fixed auto on/off to not trigger if no endpoints\n- fixed configuration parameters max and min allowed values\n- fixed Multi channel reporting\n- fixed service button functionality if autoinclusion failed\n- other minor fixes and improvements",
"region": "europe",
"files": [
{
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/ab1c512e0c977d06d3b8ce794e442536679948e3/Qubino/Smart_Meter/QUBINO_SmartMeterS2_500_EU_20201109_0900_ZMNHTD1%20H1S8P1_%5Bv80.01%5D_5610F574.otz",
"integrity": "sha256:3da7f3258e24ddc6df0dc151fab8e2c9967cf876291d0122da612305c56aa4e8"
}
]
}
]
}
28 changes: 28 additions & 0 deletions firmwares/qubino/zmnhxd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"devices": [
{
"brand": "Qubino",
"model": "3 Phase Smart Meter",
"manufacturerId": "0x0159",
"productType": "0x0007",
"productId": "0x0054",
"firmwareVersion": {
"min": "0.0",
"max": "255.255"
}
}
],
"upgrades": [
{
"version": "50.6",
"changelog": "## [50.06 - 02.02] - [2021-01-07]\n- fixed output check when Set is sent for endpoint 5\n- corrected measuring chip version to display 02.02\n- fixed supervision & switch reports when any relay enabled and commands are CRC16 encapsulated\n- fixed reporting on time interval for other values (parameter 43)\n- other minor fixes and improvements\n\n## [50.00 - 02.02] - [2020-11-13]\n- removed S0 security command class\n- updated PN from ZMNHXD1 H1S1P2 to ZMNHXD1 H1S5P2\n- other minor fixes and improvements\n\n## [41.20 - 02.02] - [2020-08-25]\n- fixed meter report when receiving Meter Get command CRC16 encapsulated\n- changed version format\n\n## [04.11 - 02.02] - [2020-04-24]\n- fixed reports from endpoint 5\n- fixed bug when both endpoints control the same relay\n- fixed association group command list get report for endpoint 5 and 6\n- fixed basic and switch binary version report when any relay is enabled\n- fixed LED behaviour when relay are ON and OFF\n- fixed relay reports when only one is enabled\n- changed minimum allowed value of parameters 42 and 43 \"Time reporting interval\" from 600 seconds to 30 seconds\n- other minor fixes and improvements",
"region": "europe",
"files": [
{
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/ab1c512e0c977d06d3b8ce794e442536679948e3/Qubino/3_Phase_Smart_Meter/QUBINO_SmartMeter3PhaseS2_500_EU_20210107_1206_ZMNHXD1%20H1S5P2_%5Bv50.06%5D_3A4EAC8C.otz",
"integrity": "sha256:6977dd4ca018f4eea7446dc7828ffc901daf623eb2b8bd8a7df7ebabeda3e195"
}
]
}
]
}
28 changes: 28 additions & 0 deletions firmwares/qubino/zmnhyd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"devices": [
{
"brand": "Qubino",
"model": "Smart Plug 16A",
"manufacturerId": "0x0159",
"productType": "0x0002",
"productId": "0x0054",
"firmwareVersion": {
"min": "0.0",
"max": "255.255"
}
}
],
"upgrades": [
{
"version": "41.11",
"changelog": "## [41.11] - [2022/10/12]\n- Fixed bug kWh not reported after meter reset\n## [41.10] - [2021/01/31]\n- Fixed bug causing to stop count at 429 kWh\n- Fixed bug not sending switch binary report after turning off output in connection with conf. param. 73\n- Fixed bug not sending unsolicited notification report after clearing overload detected alarm\n- reworked the logic for calculating, storing and reporting kWh value\n- lower time interval to store kWh value from 30 to 5 minutes\n- updated PN\n- removed 2 old unused parameters\n- other minor fixes and improvements\n## [40.00] - [2020/10/05]\n- removed S0 command class\n- changed Part Number\n- other minor fixes and improvements\n## [03.00] - [2018/10/15]\n- initial commit",
"region": "europe",
"files": [
{
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/ab1c512e0c977d06d3b8ce794e442536679948e3/Qubino/Smart_Plug16A/QUBINO_SmartPlugS2_500_EU_20211012_1210_ZMNHYD1%20H1S4P4_%5B41.11%5D.otz",
"integrity": "sha256:8118b2d26e2722dced394c721730b03de51ae6ca16110758f85ad54a5118c68a"
}
]
}
]
}
24 changes: 12 additions & 12 deletions firmwares/shelly/qnsh-001P10.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,35 @@
],
"upgrades": [
{
"version": "12.21",
"changelog": "**Please note: This update will swap the outputs for devices already installed on the motor. To avoid issues with existing commands or automation, we recommend using Parameter 5: Swap Output to Swapped.**\n- fixed switch input and output orientation\n- fixed remote commands compatibility\n- other minor improvements",
"version": "12.23",
"changelog": "**Please note: If you're updating from version 12.20 or lower the update will swap the outputs for devices already installed on the motor. To avoid issues with existing commands or automation, we recommend using Parameter 5: Swap Output to Swapped.**\n- fix parameter system to support the new Z-Wave system",
"region": "europe",
"files": [
{
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/9715042d3c4a985bd0943f0354255da699402d7d/Wave_Shutter/EU/Wave_Shutter_800_EU_20240426_1328_QNSH-001P10EU_%5B12.21%5D_EB201890.gbl",
"integrity": "sha256:a7c3e0b381d9ecb8936406b0040592017dc5bf992059351728f3c48851606e90"
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/4c479d56c728c40f341754e7d2659444339545b3/Wave_Shutter/EU/Wave_Shutter_800_EU_20240710_QNSH-001P10EU_%5Bv12.23%5D_0FE4B35C.gbl",
"integrity": "sha256:1b081920dfe382f35f3746b09312c4a116ffbf2679ccf54660ac5e409abc0045"
}
]
},
{
"version": "12.21",
"changelog": "**Please note: This update will swap the outputs for devices already installed on the motor. To avoid issues with existing commands or automation, we recommend using Parameter 5: Swap Output to Swapped.**\n- fixed switch input and output orientation\n- fixed remote commands compatibility\n- other minor improvements",
"version": "12.23",
"changelog": "**Please note: If you're updating from version 12.20 or lower the update will swap the outputs for devices already installed on the motor. To avoid issues with existing commands or automation, we recommend using Parameter 5: Swap Output to Swapped.**\n- fix parameter system to support the new Z-Wave system",
"region": "usa",
"files": [
{
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/4a61945a9ded6249d794ae32aeb9d0bd5ccaf035/Wave_Shutter/US/Wave_Shutter_800_US_20240426_1323_QNSH-001P10US_%5B12.21%5D_0FE4B35C.gbl",
"integrity": "sha256:b9f51d0ca0e2050265cb280391318a7cf81170ef27264cb8d2b6486656b65b61"
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/4c479d56c728c40f341754e7d2659444339545b3/Wave_Shutter/US/Wave_Shutter_800_US_20240703_1151_QNSH-001P07US_%5Bv12.23%5D_EB201890.gbl",
"integrity": "sha256:0a473b5a7abca2badf82646e6acd94ca16b88b8a7e1f18d4d9be3154c08a5a0f"
}
]
},
{
"version": "12.21",
"changelog": "**Please note: This update will swap the outputs for devices already installed on the motor. To avoid issues with existing commands or automation, we recommend using Parameter 5: Swap Output to Swapped.**\n- fixed switch input and output orientation\n- fixed remote commands compatibility\n- other minor improvements",
"version": "12.23",
"changelog": "**Please note: If you're updating from version 12.20 or lower the update will swap the outputs for devices already installed on the motor. To avoid issues with existing commands or automation, we recommend using Parameter 5: Swap Output to Swapped.**\n- fix parameter system to support the new Z-Wave system",
"region": "australia/new zealand",
"files": [
{
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/9715042d3c4a985bd0943f0354255da699402d7d/Wave_Shutter/ANZ/Wave_Shutter_800_ANZ_20240426_1327_QNSH-001P10AU_%5B12.21%5D_0FE4B35C.gbl",
"integrity": "sha256:5e751bafb0e12de365d4ab60e222057461364753bae9b46351f3d3111410c225"
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/4c479d56c728c40f341754e7d2659444339545b3/Wave_Shutter/ANZ/Wave_Shutter_800_ANZ_20240614_1141_QNSH-001P10AU_%5Bv12.23%5D_0FE4B35C.gbl",
"integrity": "sha256:70a6f5f90e692a9b1c3cee4a9c0d7d36c45bbf7952e6a15c0b9214f2bb46c95f"
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions firmwares/shelly/qnsn-0A24x.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
],
"upgrades": [
{
"version": "11.3",
"changelog": "- add binary switch support\n- fixed OTA led signalisation\n- other minor fixes and improvements",
"version": "11.5",
"changelog": "- Binary switch report at boot up\n- Parameters 1 - 4 value 1 fixed\n- optimised temperature conversion table",
"region": "europe",
"files": [
{
"url": "https://raw.githubusercontent.com/QubinoHelp/Shelly_Wave_FW_OTA/7c81e886ea22cb8723246477ec0cba2db333bd68/Wave_i4/EU/Wave_I4_800_EU_20240329_1311_QNSN-0A24XEU_%5Bv11.03%5D_2144DF1C.gbl",
"integrity": "sha256:6a15f4a323795f63d4485e88252171d690b548751e9f83816acc40dff678828c"
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/d3c93f6c456ab635e40b1c03197060ccb1fcd8ba/Wave_i4/EU/Wave_i4_800_EU_20240523_1556_QNSN-0A24XEU_%5B11.05%5D_76995FBB%20(2).gbl",
"integrity": "sha256:4d756ff47aae468b096025a9ece2ba9b25c7dedf8c2d2a2d1ae56dda908b1eb0"
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions firmwares/shelly/qnsn-0D24x.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
],
"upgrades": [
{
"version": "11.4",
"changelog": "- optimised temperature conversion table",
"version": "11.5",
"changelog": "- Binary switch report at boot up\n- Parameters 1 - 4 value 1 fixed",
"region": "europe",
"files": [
{
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/4a61945a9ded6249d794ae32aeb9d0bd5ccaf035/Wave_i4%20DC/EU/Wave_i4_DC_800_EU_20240426_1639_QNSN-0D24XEU_%5B11.04%5D_0FE4B35C.gbl",
"integrity": "sha256:df3d94cb35ec7ba0b42e180947448fc78e1db36a2bf5c2b9256ff4c6d25852f5"
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/d3c93f6c456ab635e40b1c03197060ccb1fcd8ba/Wave_i4_DC/EU/Wave_i4_DC_800_EU_20240523_1558_QNSN-0D24XEU_%5B11.05%5D_9DD2F96C%20(1).gbl",
"integrity": "sha256:7376ef6f758e89b68b04d5d6713407eb4bd3e9d6c8b33db6f8b67c7bea37dd92"
}
]
}
Expand Down
28 changes: 28 additions & 0 deletions firmwares/shelly/qpsh-0A1P10.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"devices": [
{
"brand": "Shelly Qubino",
"model": "Wave Pro Shutter",
"manufacturerId": "0x0460",
"productType": "0x0003",
"productId": "0x0084",
"firmwareVersion": {
"min": "0.0",
"max": "255.255"
}
}
],
"upgrades": [
{
"version": "10.8",
"changelog": "- optimised temperature conversion table\n- fixed Power Up Shutter Position Report\n- fixed unsolicited Power Report\n- OTA in progress signalisation\n- other minor improvements\n- other minor improvements",
"region": "europe",
"files": [
{
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/d3c93f6c456ab635e40b1c03197060ccb1fcd8ba/Wave_Pro_Shutter/EU/Wave_PRO_Shutter_800_EU_20240320_1441_QPSH-0A1P10EU_%5B10.08%5D_2144DF1C.gbl",
"integrity": "sha256:60b25765f4c2dedfaf8057d7ac929cd85004ea32f6e1b2d3d37d6a37ed047431"
}
]
}
]
}
8 changes: 4 additions & 4 deletions firmwares/shelly/qpsw-0A1P16.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
],
"upgrades": [
{
"version": "11.1",
"changelog": "- optimised temperature conversion table\n- other minor improvements",
"version": "11.3",
"changelog": "- minor improvements",
"region": "europe",
"files": [
{
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/8927d1afb0409a1b741e472c7b513befbb2203a9/Wave_Pro_1PM/EU/Wave_PRO1PM_800_EU_20240318_1108_QPSW-0A1P16EU_%5Bv11.01%5D_0FE4B35C.gbl",
"integrity": "sha256:6d92c8cf2aaac25fd4abe1f7e2026b600205288eadccca09e6f55d04ebc2b2b4"
"url": "https://github.com/QubinoHelp/Shelly_Wave_FW_OTA/raw/d3c93f6c456ab635e40b1c03197060ccb1fcd8ba/Wave_Pro_1PM/EU/Wave_PRO1PM_800_EU_20240610_1404_QPSW-0A1P16EU_%5Bv11.03%5D_2144DF1C.gbl",
"integrity": "sha256:f984a782e59124d802d16e11545fb0e5ca7d17b94da6b415d0c693f1aefaf0dc"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion firmwares/shelly/qpsw-0A2X16.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"upgrades": [
{
"version": "11.8",
"version": "10.8",
"changelog": "- optimised temperature conversion table\n- other minor improvements",
"region": "europe",
"files": [
Expand Down
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@
"author": "Dominic Griesel <[email protected]>",
"license": "MIT",
"type": "module",
"module": "build/worker.js",
"scripts": {
"check": "tsc -p tsconfig.build.json --noEmit && tsc -p src/maintenance/tsconfig.json --noEmit",
"build": "esbuild --bundle --format=esm --platform=browser --sourcemap --outdir=build src/worker.ts",
"clean": "rm -rf build",
"lint": "eslint .",
"test:ci": "NODE_OPTIONS='--loader=tsx' ava",
"test": "yarn test:ci --watch",
"dev": "miniflare",
"test": "yarn test:ci",
"dev": "wrangler dev",
"build:index": "yarn tsx src/maintenance/generateIndex.ts",
"upload": "yarn tsx src/maintenance/upload.ts"
},
"dependencies": {
"itty-durable": "^1.2.0",
"itty-router": "^2.6.1",
"itty-router-extras": "^0.4.2",
"json-logic-js": "^2.0.2",
Expand All @@ -31,7 +27,7 @@
"devDependencies": {
"@actions/core": "^1.9.1",
"@actions/github": "^5.0.3",
"@cloudflare/workers-types": "^3.18.0",
"@cloudflare/workers-types": "^4.20240821.1",
"@tsconfig/node16": "^1.0.3",
"@types/eslint": "^8.4.6",
"@types/itty-router-extras": "^0.4.0",
Expand All @@ -51,12 +47,11 @@
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"miniflare": "~2.11.0",
"prettier": "^2.7.1",
"prettier-plugin-organize-imports": "^3.1.1",
"tsx": "^3.13.0",
"typescript": "~4.7.4",
"wrangler": "^2.1.4",
"wrangler": "^3.73.0",
"zod-to-json-schema": "^3.17.1"
},
"packageManager": "[email protected]"
Expand Down
Loading

0 comments on commit 88a8425

Please sign in to comment.