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 01.02.2025 #388

Merged
merged 12 commits into from
Feb 1, 2025
Merged
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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,18 @@ With the ioBroker Matter Adapter, it is possible to map the following use cases:
-->

## Changelog

### **WORK IN PROGRESS**

* (@GermanBluefox) Added the "copy to clipboard" button in the debug dialog
* (@Apollon77) Updated matter.js with performance and Memory usage optimizations (and Tasmota pairing workaround)
* (@Apollon77) Reworked Type detection in Backend and for Channel/Device detection type in UI, now multiple devicetypes are offered with most complex one pre-selected
* (@Apollon77) Handle Matter ColorTemperature Lights as a Color capable light to also allow CT-Lights with Hue support
* (@Apollon77) Added BOOST endpoint as switch when exposing Thermostats with Boost state
* (@Apollon77) Optimized some dimmer/level management for light devices without dimmer state

### 0.4.11 (2025-01-28)
* (@Apollon77) Fixed caching issues in device type detection
* (@Apollon77) Fixed caching issues in device type detection in backend
* (@Apollon77) Added Debug info icon for Devices and Bridges

### 0.4.10 (2025-01-27)
Expand Down
126 changes: 63 additions & 63 deletions package-lock.json

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

10 changes: 5 additions & 5 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.1"
"@matter/nodejs-ble": "0.12.2-alpha.0-20250201-eb5d40a2f"
},
"dependencies": {
"@iobroker/adapter-core": "^3.2.3",
"@iobroker/dm-utils": "^1.0.9",
"@iobroker/i18n": "^0.3.1",
"@iobroker/type-detector": "^4.2.0",
"@matter/main": "0.12.1",
"@matter/nodejs": "0.12.1",
"@project-chip/matter.js": "0.12.1",
"@matter/main": "0.12.2-alpha.0-20250201-eb5d40a2f",
"@matter/nodejs": "0.12.2-alpha.0-20250201-eb5d40a2f",
"@project-chip/matter.js": "0.12.2-alpha.0-20250201-eb5d40a2f",
"axios": "^1.7.9",
"jsonwebtoken": "^9.0.2"
},
Expand All @@ -47,7 +47,7 @@
"@iobroker/testing": "^5.0.3",
"@iobroker/types": "^7.0.6",
"@types/jsonwebtoken": "^9.0.8",
"@types/node": "^22.12.0",
"@types/node": "^22.13.0",
"chai": "^4.5.0",
"colorette": "^2.0.20",
"mocha": "^11.1.0",
Expand Down
17 changes: 9 additions & 8 deletions src-admin/src/Tabs/Bridges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import type {
DeviceDescription,
MatterConfig,
} from '../types';
import { clone, detectDevices, getText } from '../Utils';
import { clone, detectDevices, getDetectedDeviceTypes, getText } from '../Utils';
import BridgesAndDevices, {
STYLES,
type BridgesAndDevicesProps,
Expand Down Expand Up @@ -900,13 +900,13 @@ export class Bridges extends BridgesAndDevices<BridgesProps, BridgesState> {
}

// Try to detect ID out of the supported IDs
const controls =
const detectedRooms =
(await detectDevices(this.props.socket, I18n.getLanguage(), SUPPORTED_DEVICES, [oid])) ??
[];
if (!controls.length) {
const controls =
if (!detectedRooms.length) {
const detectedRooms =
(await detectDevices(this.props.socket, I18n.getLanguage(), undefined, [oid])) ?? [];
const deviceTypes = controls.map(c => c.devices[0].deviceType);
const deviceTypes = getDetectedDeviceTypes(detectedRooms);
if (deviceTypes.length) {
this.props.showToast(
I18n.t('Detected device types "%s" are not supported yet', deviceTypes.join(', ')),
Expand All @@ -927,7 +927,8 @@ export class Bridges extends BridgesAndDevices<BridgesProps, BridgesState> {
}
} else {
// Show dialog to select device type but only allow the detected ones
const deviceType = controls[0].devices[0].deviceType;
const detectedDeviceTypes = getDetectedDeviceTypes(detectedRooms);
const deviceType = detectedDeviceTypes[0];

// try to find ON state for dimmer
this.setState({
Expand All @@ -937,9 +938,9 @@ export class Bridges extends BridgesAndDevices<BridgesProps, BridgesState> {
name: name || '',
deviceType,
bridgeIndex: this.bridgeIndex as number,
hasOnState: controls[0].devices[0].hasOnState,
hasOnState: detectedRooms[0].devices[0].hasOnState, // TODO: That needs to be more dynamic if we really need it
noComposed: false,
detectedDeviceTypes: controls.map(c => c.devices[0].deviceType),
detectedDeviceTypes,
},
});
}
Expand Down
17 changes: 9 additions & 8 deletions src-admin/src/Tabs/Devices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
import { I18n, SelectID, IconDeviceType } from '@iobroker/adapter-react-v5';
import DeviceDialog, { SUPPORTED_DEVICES } from '../components/DeviceDialog';
import type { DetectedDevice, DeviceDescription, MatterConfig } from '../types';
import { clone, detectDevices, getText } from '../Utils';
import { clone, detectDevices, getDetectedDeviceTypes, getText } from '../Utils';
import InfoBox from '../components/InfoBox';

import BridgesAndDevices, {
Expand Down Expand Up @@ -608,13 +608,13 @@ class Devices extends BridgesAndDevices<DevicesProps, DevicesState> {
}

// Try to detect ID out of the supported IDs
const controls =
const detectedRooms =
(await detectDevices(this.props.socket, I18n.getLanguage(), SUPPORTED_DEVICES, [oid])) ??
[];
if (!controls.length) {
const controls =
if (!detectedRooms.length) {
const detectedRooms =
(await detectDevices(this.props.socket, I18n.getLanguage(), undefined, [oid])) ?? [];
const deviceTypes = controls.map(c => c.devices[0].deviceType);
const deviceTypes = getDetectedDeviceTypes(detectedRooms);
if (deviceTypes.length) {
this.props.showToast(
I18n.t('Detected device types "%s" are not supported yet', deviceTypes.join(', ')),
Expand All @@ -636,7 +636,8 @@ class Devices extends BridgesAndDevices<DevicesProps, DevicesState> {
}
} else {
// Show dialog to select device type but only allow the detected ones
const deviceType = controls[0].devices[0].deviceType;
const detectedDeviceTypes = getDetectedDeviceTypes(detectedRooms);
const deviceType = detectedDeviceTypes[0];

// try to find ON state for dimmer
this.setState({
Expand All @@ -645,11 +646,11 @@ class Devices extends BridgesAndDevices<DevicesProps, DevicesState> {
oid,
name: name || '',
deviceType,
hasOnState: controls[0].devices[0].hasOnState,
hasOnState: detectedRooms[0].devices[0].hasOnState, // TODO: That needs to be more dynamic if we really need it
vendorID: '0xFFF1',
productID: '0x8000',
noComposed: false,
detectedDeviceTypes: controls.map(c => c.devices[0].deviceType),
detectedDeviceTypes,
},
});
}
Expand Down
Loading
Loading