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

Update 14.01 #309

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
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
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
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
Loading