Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/zwave-js/zwave-js-ui into…
Browse files Browse the repository at this point in the history
… zwave-js@12
  • Loading branch information
robertsLando committed Sep 21, 2023
2 parents 64325f8 + a43e74f commit 7560911
Show file tree
Hide file tree
Showing 10 changed files with 1,838 additions and 2,345 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@


## [8.25.1](https://github.com/zwave-js/zwave-js-ui/compare/v8.25.0...v8.25.1) (2023-09-11)


### Bug Fixes

* **ui:** add missing webmanifest link in head ([40b25e9](https://github.com/zwave-js/zwave-js-ui/commit/40b25e96e73d3a88a603fa48e1f23b6a45a12e96))


### Features

* bump [email protected] ([#3278](https://github.com/zwave-js/zwave-js-ui/issues/3278)) ([c8b47e0](https://github.com/zwave-js/zwave-js-ui/commit/c8b47e068eff24b41616ae6cd08fe7e6a3117ced))

# [8.25.0](https://github.com/zwave-js/zwave-js-ui/compare/v8.24.2...v8.25.0) (2023-09-06)


Expand Down
Binary file modified docs/_images/snippets.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/getting-started/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ services:
zwave-js-ui:
# ..... other settings .....
healthcheck:
test: wget --no-verbose --spider --no-check-certificate --header "Accept: text/plain" https://localhost:8091/health || exit 1
test: 'wget --no-verbose --spider --no-check-certificate --header "Accept: text/plain" https://localhost:8091/health || exit 1'
interval: 1m
timeout: 10s
start_period: 30s
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/driver_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function(driver) {
}
```

This functionality is both available using [MQTT Apis](/guide/mqtt?id=apis) and directly from Control Panel UI by clicking on Actions > Advanced Actions > Driver Function. Once you've clicked on the action, you'll see a modal that asks you to enter a function and/or select an existing **Snippet**
This functionality is both available using [MQTT Apis](/guide/mqtt?id=apis) and directly from Control Panel UI by clicking on bottom right FAB `+` > `🪄` button > Driver Function. Once you've clicked on the action, you'll see a modal that asks you to enter a function and/or select an existing **Snippet**

## Examples

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/nodes-management.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Managing Nodes

Nodes can be managed from the Control Panel page by clicking on `MANAGE NODES` button under `Actions` section. This will open the **Node Manager** dialog
Nodes can be managed from the Control Panel page by clicking on bottom right FAB `+` and then `` button. This will open the **Node Manager** dialog

![Nodes Manager](../_images/nodes_manager.png)

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/>
<link rel="icon" href="favicon.ico" sizes="any">
<!-- <link rel="icon" href="favicon.svg" type="image/svg+xml"> -->

<link rel="manifest" href="manifest.webmanifest">

<link rel="shortcut icon" href="favicon.ico" />

Expand Down
7 changes: 5 additions & 2 deletions lib/MqttClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
IClientOptions,
IClientPublishOptions,
IClientSubscribeOptions,
IStore,
connect,
} from 'mqtt'
import { allSettled, parseJSON, sanitizeTopic } from './utils'
Expand Down Expand Up @@ -377,8 +378,10 @@ class MqttClient extends TypedEventEmitter<MqttClientEventCallbacks> {
await this.storeManager.open()

// no reason to use a memory store for incoming messages
options.incomingStore = this.storeManager.incoming
options.outgoingStore = this.storeManager.outgoing
options.incomingStore = this.storeManager
.incoming as unknown as IStore
options.outgoingStore = this.storeManager
.outgoing as unknown as IStore
}

if (config.auth) {
Expand Down
28 changes: 28 additions & 0 deletions lib/ZwaveClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
ControllerFirmwareUpdateResult,
ControllerFirmwareUpdateStatus,
ControllerStatistics,
ControllerStatus,
DataRate,
Driver,
ExclusionOptions,
Expand Down Expand Up @@ -2005,6 +2006,8 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
})
}
}

return neighbors
} catch (error) {
this.logNode(
nodeId,
Expand Down Expand Up @@ -4185,6 +4188,10 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
'firmware update finished',
this._onControllerFirmwareUpdateFinished.bind(this)
)
.on(
'status changed',
this._onControllerStatusChanged.bind(this)
)
} catch (error) {
// Fixes freak error in "driver ready" handler #1309
logger.error(error.message)
Expand Down Expand Up @@ -4384,6 +4391,27 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
this.emit('event', EventSource.CONTROLLER, 'statistics updated', stats)
}

private _onControllerStatusChanged(status: ControllerStatus) {
let message = ''

if (status === ControllerStatus.Unresponsive) {
this._error = 'Controller is unresponsive'
message = this._error
} else if (status === ControllerStatus.Jammed) {
this._error = 'Controller is unable to transmit'
message = this._error
} else {
message = `Controller is ${getEnumMemberName(
ControllerStatus,
status
)}`
this._error = undefined
}

this._updateControllerStatus(message)
this.emit('event', EventSource.CONTROLLER, 'status changed', status)
}

private _onBootLoaderReady() {
this._updateControllerStatus('Bootloader is READY')

Expand Down
15 changes: 3 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zwave-js-ui",
"version": "8.25.0",
"version": "8.25.1",
"bin": "server/bin/www.js",
"description": "Z-Wave Control Panel and MQTT Gateway",
"author": "Daniel Lando <[email protected]>",
Expand Down Expand Up @@ -100,18 +100,14 @@
"docsify": "^4.13.0",
"docsify-cli": "^4.4.4",
"eslint": "^8.36.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^4.0.2",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vue": "^9.9.0",
"mocha": "^10.2.0",
"node-notifier": "^10.0.1",
"npm-run-all": "^4.1.5",
"pkg": "^5.8.1",
"portfinder": "^1.0.32",
"proxyquire": "^2.1.3",
"release-it": "^15.9.0",
"sinon": "^15.0.2",
Expand Down Expand Up @@ -145,15 +141,14 @@
"jsonwebtoken": "^9.0.0",
"merge": "^2.1.1",
"morgan": "~1.10.0",
"mqtt": "^5.0.2",
"mqtt": "^5.0.5",
"mqtt-jsonl-store": "^0.2.0",
"multer": "^1.4.5-lts.1",
"native-url": "^0.3.4",
"pinia": "^2.0.33",
"prismjs": "^1.29.0",
"qr-scanner": "^1.4.2",
"selfsigned": "^2.1.1",
"serve-favicon": "^2.5.0",
"session-file-store": "^1.5.0",
"socket.io": "^4.6.1",
"socket.io-client": "^4.6.1",
Expand All @@ -167,7 +162,7 @@
"vuedraggable": "^2.24.3",
"vuetify": "^2.6.14",
"winston": "^3.8.2",
"zwave-js": "12.0.0-beta.1"
"zwave-js": "12.0.0-beta.2"
},
"devDependencies": {
"@babel/register": "^7.22.15",
Expand All @@ -193,16 +188,12 @@
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"@vitejs/plugin-vue2": "^2.2.0",
"autoprefixer": "^10.4.15",
"esbuild-register": "^3.4.2",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-prettier": "^4.2.1",
"markdownlint-cli": "^0.33.0",
"material-design-icons-iconfont": "^6.7.0",
"mini-css-extract-plugin": "^2.7.5",
"nodemon": "^3.0.1",
"postcss-import": "^15.1.0",
"postcss-url": "^10.1.3",
"prettier": "^2.8.5",
"rimraf": "^4.4.0",
"sass": "1.54.5",
Expand Down
Loading

0 comments on commit 7560911

Please sign in to comment.