You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently implementing vacuum devices with RvcOperationalStateServer. Following the Matter specification,
attribute operationalState should accept all values from OperationalState and in addition all values from RvcOperationalState:
Value
Name
Summary
Conformance
0x00
Stopped
The device is stopped
M
0x01
Running
The device is operating
M
0x02
Paused
The device is paused during an operation
M
0x03
Error
The device is in an error state
M
0x40
SeekingCharger
The device is en route to the charging dock
M
0x41
Charging
The device is charging
M
0x42
Docked
The device is on the dock, not charging
M
Unfortunately, matter.js does only accept the rvc specific values (0x40, 0x41, 0x42).
First, the enum only includes those three values and does not derive the other values.
Second, if I just use number as type and pass in 0x02, it fails initializing the behavior / setting the value.
SAME thing happens for operationalError.errorStateId, and probably even more.
I tried with 0.11.9 and 0.12.0-alpha.0-20250103-ba0c01a01.
Minimal repro:
import{RvcOperationalStateServerasBase}from"@matter/main/behaviors/rvc-operational-state";import{RvcOperationalState}from"@matter/main/clusters/rvc-operational-state";exportclassRvcOperationalStateServerextendsBase{overrideasyncinitialize(){awaitsuper.initialize();// just 0x02 without typecast will produce a type error, since it's not in the enumthis.state.operationalState=0x02asnumber;// or as RvcOperationalState.OperationalState}}
Log output
Validating 4b34da8cb2bd4315bba08fee27e02ca6.aggregator.vacuum_roborock_s7_pro_ultra.rvcOperationalState.state: Value "2" is not defined in enum (135)
at <anonymous> (/Users/t0bst4r/Projects/t0bst4r/home-assistant-matter-hub/node_modules/@matter/node/src/behavior/state/validation/ValueValidator.ts:141:19)
at <anonymous> (/Users/t0bst4r/Projects/t0bst4r/home-assistant-matter-hub/node_modules/@matter/node/src/behavior/state/validation/conformance.ts:32:13)
at <anonymous> (/Users/t0bst4r/Projects/t0bst4r/home-assistant-matter-hub/node_modules/@matter/node/src/behavior/state/managed/values/StructManager.ts:230:25)
at Object.change (/Users/t0bst4r/Projects/t0bst4r/home-assistant-matter-hub/node_modules/@matter/node/src/behavior/state/managed/Datasource.ts:378:13)
at RvcOperationalState$State.set (/Users/t0bst4r/Projects/t0bst4r/home-assistant-matter-hub/node_modules/@matter/node/src/behavior/state/managed/values/StructManager.ts:182:38)
at Function.assign (<anonymous>)
at applyPatchState (/Users/t0bst4r/Projects/t0bst4r/home-assistant-matter-hub/packages/backend/src/utils/apply-patch-state.ts:20:14)
at RvcOperationalStateServer.update (/Users/t0bst4r/Projects/t0bst4r/home-assistant-matter-hub/packages/backend/src/matter/behaviors/rvc-operational-state-server.ts:20:5)
at RvcOperationalStateServer.initialize (/Users/t0bst4r/Projects/t0bst4r/home-assistant-matter-hub/packages/backend/src/matter/behaviors/rvc-operational-state-server.ts:14:10)
a bit off topic
When using 0.12.0-alpha.0-20250103-ba0c01a01, the log output does not include the error details anymore.
[ 2025-01-06T10:44:46.038Z ] [ ERROR ] [ Bridge / 4b34da8cb2bd4315bba08fee27e02ca6 ]: Failed to start bridge due to error: EndpointBehaviorsError [AggregateError]: Behaviors have errors
at <anonymous> (/Users/t0bst4r/Projects/t0bst4r/home-assistant-matter-hub/node_modules/@matter/node/src/endpoint/properties/Behaviors.ts:173:27)
at all (/Users/t0bst4r/Projects/t0bst4r/home-assistant-matter-hub/node_modules/@matter/general/src/util/Construction.ts:705:25)
at <anonymous> (/Users/t0bst4r/Projects/t0bst4r/home-assistant-matter-hub/node_modules/@matter/general/src/util/Construction.ts:695:17) {
[errors]: [Array]
}
I added a try catch and logged the error by myself to validate it's the SAME error message.
The text was updated successfully, but these errors were encountered:
I am currently implementing vacuum devices with
RvcOperationalStateServer
. Following the Matter specification,attribute
operationalState
should accept all values fromOperationalState
and in addition all values fromRvcOperationalState
:Unfortunately, matter.js does only accept the rvc specific values (
0x40
,0x41
,0x42
).First, the enum only includes those three values and does not derive the other values.
Second, if I just use
number
as type and pass in0x02
, it fails initializing the behavior / setting the value.SAME thing happens for
operationalError.errorStateId
, and probably even more.I tried with
0.11.9
and0.12.0-alpha.0-20250103-ba0c01a01
.Minimal repro:
Log output
a bit off topic
When using
0.12.0-alpha.0-20250103-ba0c01a01
, the log output does not include the error details anymore.I added a try catch and logged the error by myself to validate it's the SAME error message.
The text was updated successfully, but these errors were encountered: