Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(config): clean up auto-import for Shelly Wave 1PM #6289

Merged
merged 24 commits into from
Sep 21, 2023
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
884cf5b
Update qnsw-001x16.json
QubinoHelp Sep 18, 2023
aba8a4a
Update qnsw-001x16.json
QubinoHelp Sep 18, 2023
4c37506
Update qnsw-001x16.json
QubinoHelp Sep 18, 2023
2efc565
Rename qnsw-001x16.json to qnsw-001P16.json
QubinoHelp Sep 18, 2023
ce01641
Update qnsw-001P16.json
QubinoHelp Sep 18, 2023
c31d52f
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
e288e5c
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
e5eccea
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
a1c040f
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
eafec8f
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
05ab129
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
5b083bd
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
f4544bf
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
beb778c
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
47bb118
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
14c0669
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
b724e6b
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
e195e06
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
76d7059
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
5372d36
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
b29275d
Update packages/config/config/devices/0x0460/qnsw-001P16.json
QubinoHelp Sep 20, 2023
1232f3b
fix: formatting
AlCalzone Sep 21, 2023
31e6e70
fix: some labels
AlCalzone Sep 21, 2023
49f7e30
fix: descriptions, consistency
AlCalzone Sep 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
AlCalzone marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// TODO: This file contains a placeholder for a productType, productID, or manufacturerId (0x9999) that must be corrected.
{
"manufacturer": "Shelly",
"manufacturerId": "0x0460",
"label": "QNSW-001X16",
"description": "Wave 1",
"label": "QNSW-001P16",
"description": "Wave 1PM",
"devices": [
{
"productType": "0x9999",
"productId": "0x0002",
"zwaveAllianceId": 4922
"productType": "0x0002",
"productId": "0x0084"
}
],
"firmwareVersion": {
Expand All @@ -21,39 +20,48 @@
"isLifeline": true
},
"2": {
"label": "On/off [I1]",
"label": "I1: On/Off",
"maxNodes": 9
},
"3": {
"label": "Start/stop set level [I1]",
"label": "I1: Start/Stop Level Change",
"maxNodes": 9
}
},
"paramInformation": [
{
"#": "1",
"label": "Sw1 Switch Type",
"description": "0",
"label": "SW1 Switch Type",
"description": "This parameter defines how the Device should treat the switch (which type) connected to the SW (SW1) terminal.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We try to avoid parameter descriptions unless necessary for understanding what the parameter does, or to provide additional information like gaps in the allowed parameter range.
https://zwave-js.github.io/node-zwave-js/#/config-files/style-guide?id=parameter-descriptions

"valueSize": 1,
"minValue": 0,
"maxValue": 2,
"defaultValue": 2,
"unsigned": true
"unsigned": true,
"allowManualEntry": false,
"options": [
{
"label": "Momentary switch",
"value": 0
},
{
"label": "Toggle switch (follow switch)",
"value": 1
},
{
"label": "Toggle switch (change on toggle)",
"value": 2
}
]
},
{
"#": "17",
"label": "Restore State of O1 After Power Failure",
"description": "0",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true
"$import": "~/templates/master_template.json#state_after_power_failure_prev_off",
"label": "O1: State After Power Failure"
},
{
"#": "19",
"label": "Turn O1 Off Automatically With Timer",
"description": "0",
"label": "O1: Auto-Off Timer",
"valueSize": 2,
"minValue": 0,
"maxValue": 32535,
Expand All @@ -62,113 +70,210 @@
},
{
"#": "20",
"label": "Turn O1 On Automatically With Timer",
"description": "0",
"label": "O1: Auto-On Timer",
"valueSize": 2,
"minValue": 0,
"maxValue": 32535,
"defaultValue": 0,
"unsigned": true
},
{
"#": "23",
"label": "O1 No/Nc",
"description": "0",
"#": "25",
"label": "O1: Auto-On/Off Timer Unit",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true
"unsigned": true,
"allowManualEntry": false,
"options": [
{
"label": "Seconds",
"value": 0
},
{
"label": "10 ms",
"value": 1
}
]
},
{
"#": "25",
"label": "Set Timer Units to Seconds Or Milliseconds For O1",
"description": "0",
"#": "23",
"label": "O1: Relay Type",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
"label": "Normally open (NO)",
"value": 0
},
{
"label": "Normally closed (NC)",
"value": 1
}
]
},
{
"#": "36",
"label": "O1: Power Change Report Threshold",
"valueSize": 1,
"unit": "%",
"minValue": 0,
"maxValue": 100,
"defaultValue": 50,
"unsigned": true
},
{
"#": "39",
"label": "O1: Minimum Time Between Power Reports",
"valueSize": 1,
"unit": "seconds",
"minValue": 0,
"maxValue": 120,
"defaultValue": 30,
"unsigned": true
},
{
"#": "91",
"label": "Alarm Conf. - Water",
"description": "0",
"label": "Alarm Configuration: Water",
"description": "This parameter determines which alarm frames the Device should respond to and how. The parameters consist of 4 bytes, the three most significant bytes are set according to the official Z-Wave protocol specification.",
"valueSize": 4,
"minValue": 0,
"maxValue": 2,
"defaultValue": 0,
"unsigned": true
"unsigned": true,
"allowManualEntry": false,
"options": [
{
"label": "No action",
"value": 0
},
{
"label": "Open relay",
"value": 1
},
{
"label": "Close relay",
"value": 2
}
]
},
{
"#": "92",
"label": "Alarm Conf. - Smoke",
"description": "0",
"label": "Alarm Configuration: Smoke",
"description": "This parameter determines which alarm frames the Device should respond to and how. The parameters consist of 4 bytes, the three most significant bytes are set according to the official Z-Wave protocol specification.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid this won't work as you intended. By predefining the options, only the values 0...2 can be set and the 3 most significant bytes will be zero.

Are those supposed to be changed by the user? If not, using a partial parameter could be used to let the user only edit the least siginificant byte.

"valueSize": 4,
"minValue": 0,
"maxValue": 2,
"defaultValue": 0,
"unsigned": true
"unsigned": true,
"allowManualEntry": false,
"options": [
{
"label": "No action",
"value": 0
},
{
"label": "Open relay",
"value": 1
},
{
"label": "Close relay",
"value": 2
}
]
},
{
"#": "93",
"label": "Alarm Conf. - Co",
"description": "0",
"label": "Alarm Configuration: CO",
"description": "This parameter determines which alarm frames the Device should respond to and how. The parameters consist of 4 bytes, the three most significant bytes are set according to the official Z-Wave protocol specification.",
"valueSize": 4,
"minValue": 0,
"maxValue": 2,
"defaultValue": 0,
"unsigned": true
"unsigned": true,
"allowManualEntry": false,
"options": [
{
"label": "No action",
"value": 0
},
{
"label": "Open relay",
"value": 1
},
{
"label": "Close relay",
"value": 2
}
]
},
{
"#": "94",
"label": "Alarm Conf. - Heat",
"description": "0",
"label": "Alarm Configuration: Heat",
"description": "This parameter determines which alarm frames the Device should respond to and how. The parameters consist of 4 bytes, the three most significant bytes are set according to the official Z-Wave protocol specification.",
"valueSize": 4,
"minValue": 0,
"maxValue": 2,
"defaultValue": 0,
"unsigned": true
"unsigned": true,
"allowManualEntry": false,
"options": [
{
"label": "No action",
"value": 0
},
{
"label": "Open relay",
"value": 1
},
{
"label": "Close relay",
"value": 2
}
]
},
{
"#": "120",
"label": "Factory Reset",
"description": "0",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"description": "Reset to factory default settings and remove from the Z-Wave network.",
"valueSize": 4,
"defaultValue": 0,
"unsigned": true
"unsigned": true,
"allowManualEntry": false,
"options": [
{
"label": "Idle",
"value": 0
},
{
"label": "Factory reset",
"value": 1431655765
}
]
},
{
"#": "201",
"label": "Serial Number 1",
"description": "0",
"label": "Serial Number: Part 1",
"valueSize": 4,
"minValue": 0,
"maxValue": 2147483647,
"defaultValue": 2147483647,
"unsigned": true
"unsigned": true,
"readOnly": true
},
{
"#": "202",
"label": "Serial Number 2",
"description": "0",
"label": "Serial Number: Part 2",
"valueSize": 4,
"minValue": 0,
"maxValue": 2147483647,
"defaultValue": 2147483647,
"unsigned": true
"unsigned": true,
"readOnly": true
},
{
"#": "203",
"label": "Serial Number 3",
"description": "0",
"label": "Serial Number: Part 3",
"valueSize": 4,
"minValue": 0,
"maxValue": 2147483647,
"defaultValue": 2147483647,
"unsigned": true
"unsigned": true,
"readOnly": true
}
],
"metadata": {
Expand Down