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

Cannot use 'in' operator to search for 'repositories' in -3 #1106

Open
ar7bd opened this issue Dec 26, 2023 · 0 comments
Open

Cannot use 'in' operator to search for 'repositories' in -3 #1106

ar7bd opened this issue Dec 26, 2023 · 0 comments

Comments

@ar7bd
Copy link

ar7bd commented Dec 26, 2023

Describe the bug
Importing a HM-Dis-EP-WM55 device throws an error for me:

hm-rpc.0 (2344375) binrpc -> getParamsetDescription ["NEQ0711389:4","VALUES"]
Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Caught by controller[1]: TypeError: Cannot use 'in' operator to search for 'repositories' in -3
Caught by controller[1]: at HomematicRpc._extendObject (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/src/lib/adapter/adapter.ts:3137:54)

It seems that it tries to read a NEQ0711389:4 VALUES paramset, which does not exist.

To Reproduce
Steps to reproduce the behavior:

  1. Connect HM-Dis-EP-WM55 device to Homematic CCU2
  2. Go to instance hm-rpc.0 and select "Geräte neu einlesen (einmalig)"
  3. Click on "Speichern und Schliessen"
  4. The instance tries to read all devices and crashes
  5. Go to logs
  6. Error message "TypeError: Cannot use 'in' operator to search for 'repositories' in -3"

Expected behavior
Instance should initialize all devices and start.

Screenshots & Logfiles

sendTo('hm-rpc.0', 'listDevices', {}, res => {
    log(JSON.stringify(res));
});

{
    "result": [
        /// ....
        {
            "ADDRESS": "NEQ0711389",
            "AVAILABLE_FIRMWARE": "1.2",
            "CHILDREN": [
                "NEQ0711389:0",
                "NEQ0711389:1",
                "NEQ0711389:2",
                "NEQ0711389:3",
                "NEQ0711389:4",
                "NEQ0711389:5",
                "NEQ0711389:6",
                "NEQ0711389:7",
                "NEQ0711389:8"
            ],
            "FIRMWARE": "1.2",
            "FLAGS": 1,
            "INTERFACE": "MEQ1608703",
            "PARAMSETS": [
                "MASTER"
            ],
            "PARENT": "",
            "RF_ADDRESS": 4969274,
            "ROAMING": 0,
            "RX_MODE": 2,
            "TYPE": "HM-Dis-EP-WM55",
            "UPDATABLE": 1,
            "VERSION": 11
        },
        {
            "ADDRESS": "NEQ0711389:0",
            "AES_ACTIVE": 0,
            "DIRECTION": 0,
            "FLAGS": 3,
            "INDEX": 0,
            "LINK_SOURCE_ROLES": "",
            "LINK_TARGET_ROLES": "",
            "PARAMSETS": [
                "MASTER",
                "VALUES"
            ],
            "PARENT": "NEQ0711389",
            "PARENT_TYPE": "HM-Dis-EP-WM55",
            "TYPE": "MAINTENANCE",
            "VERSION": 11
        },
        {
            "ADDRESS": "NEQ0711389:1",
            "AES_ACTIVE": 0,
            "DIRECTION": 1,
            "FLAGS": 1,
            "GROUP": "NEQ0711389:2",
            "INDEX": 1,
            "LINK_SOURCE_ROLES": "KEYMATIC REMOTECONTROL_RECEIVER SWITCH WINMATIC",
            "LINK_TARGET_ROLES": "",
            "PARAMSETS": [
                "LINK",
                "MASTER",
                "VALUES"
            ],
            "PARENT": "NEQ0711389",
            "PARENT_TYPE": "HM-Dis-EP-WM55",
            "TYPE": "KEY",
            "VERSION": 11
        },
        {
            "ADDRESS": "NEQ0711389:2",
            "AES_ACTIVE": 0,
            "DIRECTION": 1,
            "FLAGS": 1,
            "GROUP": "NEQ0711389:1",
            "INDEX": 2,
            "LINK_SOURCE_ROLES": "KEYMATIC REMOTECONTROL_RECEIVER SWITCH WINMATIC",
            "LINK_TARGET_ROLES": "",
            "PARAMSETS": [
                "LINK",
                "MASTER",
                "VALUES"
            ],
            "PARENT": "NEQ0711389",
            "PARENT_TYPE": "HM-Dis-EP-WM55",
            "TYPE": "KEY",
            "VERSION": 11
        },
        {
            "ADDRESS": "NEQ0711389:3",
            "AES_ACTIVE": 0,
            "DIRECTION": 0,
            "FLAGS": 1,
            "INDEX": 3,
            "LINK_SOURCE_ROLES": "",
            "LINK_TARGET_ROLES": "",
            "PARAMSETS": [
                "MASTER",
                "VALUES"
            ],
            "PARENT": "NEQ0711389",
            "PARENT_TYPE": "HM-Dis-EP-WM55",
            "TYPE": "KEY",
            "VERSION": 11
        },
        {
            "ADDRESS": "NEQ0711389:4",
            "AES_ACTIVE": 0,
            "DIRECTION": 0,
            "FLAGS": 1,
            "INDEX": 4,
            "LINK_SOURCE_ROLES": "",
            "LINK_TARGET_ROLES": "",
            "PARAMSETS": [
                "MASTER"
                // I'm not familiar with how this works, though it seems that channel 4 has no VALUES paramset
                // So it shouldn't try to read it, right?
            ],
            "PARENT": "NEQ0711389",
            "PARENT_TYPE": "HM-Dis-EP-WM55",
            "TYPE": "KEY",
            "VERSION": 11
        },
        {
            "ADDRESS": "NEQ0711389:5",
            "AES_ACTIVE": 0,
            "DIRECTION": 0,
            "FLAGS": 1,
            "INDEX": 5,
            "LINK_SOURCE_ROLES": "",
            "LINK_TARGET_ROLES": "",
            "PARAMSETS": [
                "MASTER"
            ],
            "PARENT": "NEQ0711389",
            "PARENT_TYPE": "HM-Dis-EP-WM55",
            "TYPE": "KEY",
            "VERSION": 11
        },
        {
            "ADDRESS": "NEQ0711389:6",
            "AES_ACTIVE": 0,
            "DIRECTION": 0,
            "FLAGS": 1,
            "INDEX": 6,
            "LINK_SOURCE_ROLES": "",
            "LINK_TARGET_ROLES": "",
            "PARAMSETS": [
                "MASTER"
            ],
            "PARENT": "NEQ0711389",
            "PARENT_TYPE": "HM-Dis-EP-WM55",
            "TYPE": "KEY",
            "VERSION": 11
        },
        {
            "ADDRESS": "NEQ0711389:7",
            "AES_ACTIVE": 0,
            "DIRECTION": 0,
            "FLAGS": 1,
            "INDEX": 7,
            "LINK_SOURCE_ROLES": "",
            "LINK_TARGET_ROLES": "",
            "PARAMSETS": [
                "MASTER"
            ],
            "PARENT": "NEQ0711389",
            "PARENT_TYPE": "HM-Dis-EP-WM55",
            "TYPE": "KEY",
            "VERSION": 11
        },
        {
            "ADDRESS": "NEQ0711389:8",
            "AES_ACTIVE": 0,
            "DIRECTION": 0,
            "FLAGS": 1,
            "INDEX": 8,
            "LINK_SOURCE_ROLES": "",
            "LINK_TARGET_ROLES": "",
            "PARAMSETS": [
                "MASTER"
            ],
            "PARENT": "NEQ0711389",
            "PARENT_TYPE": "HM-Dis-EP-WM55",
            "TYPE": "KEY",
            "VERSION": 11
        },
        // ....
};

sendTo('hm-rpc.0', 'getParamset', {ID: 'NEQ0711389', paramType: 'MASTER'}, res => {
    log(JSON.stringify(res));
});

{
    "result": {
        "DISPLAY_INVERTING": false,
        "LOCAL_RESET_DISABLE": false,
        "POWER_SUPPLY": 1,
        "STATUS_MESSAGE_TEXT_ALIGNMENT_LEFT_ALIGNED": true,
        "WAKEUP_BEHAVIOUR_STATUS_MSG_CONFIRMATION": true,
        "WAKEUP_BEHAVIOUR_STATUS_MSG_RESISTANCE": true,
        "WAKEUP_BEHAVIOUR_STATUS_SIGNALIZATION_CONFIRMATION": true
    },
    "error": null
}

// This works fine
sendTo('hm-rpc.0', 'getParamsetDescription', {ID: 'NEQ0711389:3', paramType: 'VALUES'}, res => {
    log(JSON.stringify(res));
});

{
    "result": {
        "SUBMIT": {
            "CONTROL": "NONE",
            "DEFAULT": "",
            "FLAGS": 1,
            "ID": "SUBMIT",
            "MAX": "",
            "MIN": "",
            "OPERATIONS": 2,
            "TAB_ORDER": 0,
            "TYPE": "STRING",
            "UNIT": ""
        }
    },
    "error": null
}

// This channel seems to have no paramset
sendTo('hm-rpc.0', 'getParamsetDescription', {ID: 'NEQ0711389:4', paramType: 'VALUES'}, res => {
    log(JSON.stringify(res));
});

{
    "result": {
        "faultCode": -3,
        "faultString": "Unknown paramset"
    },
    "error": null
}

Versions:

  • hm-rpc version: v1.15.19
  • hm-rega version: v4.0.0
  • JS-Controller version: 5.0.17
  • Node version: v18.19.0 (had same issue with v16.something)
  • Operating system: Ubuntu 22.04
  • CCU model: CCU2
  • CCU firmware: 2.61.7

Additional context
The fix in ioBroker/ioBroker.js-controller#2567 should solve the adapter crashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant