Skip to content

Commit f0899ba

Browse files
authored
v2 implementation supporting firmware v2 (#6)
* wip * removed old * fixed import * fixed main * fixed config * log debugging - trying to follow the plugin lifecycle * using a IIFE to call discoverDevices * wip * config * more wip * V2 implementation, supporting V2 firmware * package version bump * better package version bump * fixed lint rules * package updates * and back again * npm updated
1 parent e0dd943 commit f0899ba

14 files changed

+2092
-3793
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
"@typescript-eslint/no-non-null-assertion": "off",
3333
"@typescript-eslint/explicit-module-boundary-types": "off",
3434
"@typescript-eslint/semi": ["warn"],
35-
"@typescript-eslint/member-delimiter-style": ["warn"]
35+
"@typescript-eslint/member-delimiter-style": "warn"
3636
}
3737
}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files.eol": "\n",
33
"editor.codeActionsOnSave": {
4-
"source.fixAll.eslint": true
4+
"source.fixAll.eslint": "explicit"
55
},
66
"editor.rulers": [ 140 ],
77
"eslint.enable": true

config.schema.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"pluginAlias": "GarageDoorSwitch",
3-
"pluginType": "accessory",
4-
"singular": false,
2+
"pluginAlias": "GarageDoorOpenerHomebridgePlugin",
3+
"pluginType": "platform",
4+
"singular": true,
55
"schema": {
66
"type": "object",
77
"properties": {
@@ -35,29 +35,29 @@
3535
"required": false,
3636
"description": "MQTT Client ID (optional, default: HomeBridge)"
3737
},
38-
"setTopic": {
38+
"targetTopic": {
3939
"type": "string",
40-
"title": "SET topic",
41-
"placeholder": "garage/door/set",
42-
"description": "MQTT Topic to trigger the garage door motor"
40+
"title": "TARGET door state topic",
41+
"placeholder": "garage/door/target",
42+
"description": "MQTT Topic to indicate the desired target door state."
4343
},
44-
"stateTopic": {
44+
"currentTopic": {
4545
"type": "string",
46-
"title": "STATE topic",
47-
"placeholder": "garage/door/state",
48-
"description": "MQTT Topic for door state subscription"
46+
"title": "CURRENT door state topic",
47+
"placeholder": "garage/door/current",
48+
"description": "MQTT Topic for the current door state"
4949
},
5050
"mqttOpenMessage": {
5151
"type": "string",
5252
"title": "OPEN message",
53-
"placeholder": "open",
54-
"description": "MQTT message payload for the `open` command"
53+
"placeholder": "0",
54+
"description": "MQTT message payload for the target door state 'open'"
5555
},
5656
"mqttCloseMessage": {
5757
"type": "string",
5858
"title": "CLOSE message",
59-
"placeholder": "close",
60-
"description": "MQTT message payload for the `close` command"
59+
"placeholder": "1",
60+
"description": "MQTT message payload for the target door state 'close'"
6161
}
6262
}
6363
}

0 commit comments

Comments
 (0)