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

Bug: TypeError: Cannot read properties of undefined (reading 'moving') on version 3.8.1+ #1050

Open
dnicolson opened this issue Sep 14, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dnicolson
Copy link
Collaborator

Describe the Bug

The plug-in fails to initialize when using BLE.

To Reproduce

  1. Start Homebridge.

Expected Behavior

No error.

Relevant Log Output

TypeError: Cannot read properties of undefined (reading 'moving')
    at Curtain.getCurrentPostion (file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/curtain.ts:841:48)
    at Curtain.BLEparseStatus (file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/curtain.ts:385:5)
    at file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/curtain.ts:495:11

Config for homebridge-switchbot

{
    "deviceId": "XXXXXXXXXXXX",
    "configDeviceName": "Curtain",
    "configDeviceType": "Curtain",
    "connectionType": "BLE",
    "curtain": {
        "set_min": 10,
        "set_max": 90,
        "setOpenMode": "1",
        "setCloseMode": "1",
        "hide_lightsensor": false,
        "set_minlux": 1,
        "set_maxlux": 6001
    },
    "maxRetry": 50,
    "logging": "standard"
}

Screenshots

No response

Device and Model

SwitchBot Curtain

Node.js Version

v18.18.2

NPM Version

v9.8.1

Homebridge Version

v1.8.4

Homebridge Switchbot Plugin Version

v3.8.1

Homebridge Config UI X Plugin Version

v4.58.0

Operating System

Raspian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants