Skip to content

Commit

Permalink
Update 14.01 (#309)
Browse files Browse the repository at this point in the history
* dep update

* Optimize Discovery dialog handling

* Streamline device classes

* Optimize DM icons and connection status

* Optimize icons and connection status

* add todo

* fix discovery response

* display connection type and connection status

* Readme

* optimize icons

* fix typo

* address review feedback

* finalize

* hide factory reset when bridge has no devices

* adjust icons for connection type
  • Loading branch information
Apollon77 authored Jan 15, 2025
1 parent 230a706 commit 60c58b4
Show file tree
Hide file tree
Showing 51 changed files with 415 additions and 255 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,12 @@ TBD

## Changelog
### **WORK IN PROGRESS**
* (@GermanBluefox) Showed the device name in paring dialog
* (@GermanBluefox) Showed the device name in paring dialog
* (@GermanBluefox/Apollon77) Adjusts connection type icons
* (@Apollon77) Optimized the discovery dialog handling
* (@Apollon77) Fixed Thermostat for Controller to update temperatures
* (@Apollon77) Gives Energy sensors a dedicated icon
* (@Apollon77) Optimized an fixed multiple things

### 0.3.6 (2025-01-13)
* (@GermanBluefox) Fixed GUI errors
Expand Down
118 changes: 59 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
"url": "https://github.com/ioBroker/ioBroker.matter"
},
"optionalDependencies": {
"@matter/nodejs-ble": "0.12.0-alpha.0-20250113-e619723a5"
"@matter/nodejs-ble": "0.12.0-alpha.0-20250113-1c80c6d58"
},
"dependencies": {
"@iobroker/adapter-core": "^3.2.3",
"@iobroker/i18n": "^0.3.1",
"@iobroker/dm-utils": "^1.0.6",
"@iobroker/type-detector": "^4.1.1",
"@matter/main": "0.12.0-alpha.0-20250113-e619723a5",
"@matter/nodejs": "0.12.0-alpha.0-20250113-e619723a5",
"@project-chip/matter.js": "0.12.0-alpha.0-20250113-e619723a5",
"@matter/main": "0.12.0-alpha.0-20250113-1c80c6d58",
"@matter/nodejs": "0.12.0-alpha.0-20250113-1c80c6d58",
"@project-chip/matter.js": "0.12.0-alpha.0-20250113-1c80c6d58",
"axios": "^1.7.9",
"jsonwebtoken": "^9.0.2"
},
Expand Down
28 changes: 14 additions & 14 deletions src-admin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
},
"dependencies": {
"@foxriver76/iob-component-lib": "^0.2.0",
"@iobroker/adapter-react-v5": "^7.4.12",
"@iobroker/dm-gui-components": "^7.4.12",
"@iobroker/adapter-react-v5": "^7.4.14",
"@iobroker/dm-gui-components": "^7.4.14",
"@iobroker/type-detector": "^4.1.1",
"@types/react-dom": "^18.3.5",
"@types/uuid": "^10.0.0",
Expand Down Expand Up @@ -51,4 +51,4 @@
}
]
]
}
}
2 changes: 1 addition & 1 deletion src-admin/src/Tabs/Bridges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ export class Bridges extends BridgesAndDevices<BridgesProps, BridgesState> {
}}
sx={styles.devicesHeader}
>
{this.props.alive && bridge.enabled ? (
{this.props.alive && bridge.enabled && bridge.list.length ? (
<Tooltip
title={I18n.t('Reset to factory defaults')}
slotProps={{ popper: { sx: { pointerEvents: 'none' } } }}
Expand Down
17 changes: 13 additions & 4 deletions src-admin/src/Tabs/Controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ interface ComponentState {
/** If we are currently waiting for backend processing */
backendProcessingActive: boolean;
discovered: CommissionableDevice[];
/** Discovery process is active in the backend */
discoveryRunning: boolean;
/** Was a discovery result received which means that the dialog should stay open also after discovery ended */
discoveryDone: boolean;
nodes: Record<string, ioBroker.Object>;
states: Record<string, ioBroker.State>;
Expand Down Expand Up @@ -230,7 +232,10 @@ class Controller extends Component<ComponentProps, ComponentState> {
if (state?.val) {
this.setState({ discoveryRunning: true });
} else {
this.setState({ discoveryRunning: false });
this.setState({
discoveryRunning: false,
discoveryDone: !!this.state.discovered.length, // Leave dialog open if we found devices
});
}
return;
}
Expand Down Expand Up @@ -616,6 +621,8 @@ class Controller extends Component<ComponentProps, ComponentState> {
onClick={async () => {
await this.stopDiscovery();
this.setState({
discoveryDone: false,
discovered: [],
showQrCodeDialog: device,
});
}}
Expand Down Expand Up @@ -657,11 +664,13 @@ class Controller extends Component<ComponentProps, ComponentState> {
* Stop discovering devices
*/
async stopDiscovery(): Promise<void> {
if (!this.state.discoveryRunning) {
// Nothing to stop if no Discovery is running
return;
}
console.log('Stop discovery');

await this.props.socket.sendTo(`matter.${this.props.instance}`, 'controllerDiscoveryStop', {});

this.setState({ discoveryDone: !!this.state.discovered.length });
}

/**
Expand Down Expand Up @@ -765,8 +774,8 @@ class Controller extends Component<ComponentProps, ComponentState> {
window.alert(`Error on discovery: ${result.error}`);
} else if (result.result) {
this.setState({
discoveryDone: !!result.result.length,
discovered: result.result,
discoveryDone: true,
});
}
});
Expand Down
Loading

0 comments on commit 60c58b4

Please sign in to comment.