homebridge-switchbot icon indicating copy to clipboard operation
homebridge-switchbot copied to clipboard

After update to latest version 1.14.2 errors

Open PvdGulik opened this issue 2 years ago • 18 comments

Describe The Bug

repeating TypeError message: processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')

Stopping de Hombridge Switcht plugin stops the errors in the logging.

To Reproduce

Update from 1.14.1 ->> 1.14.2

Expected behavior

no TypeError

Relevant log output

[20/08/2022, 11:45:07] [HB Supervisor] OS: Linux 5.15.56-v7+ arm
[20/08/2022, 11:45:07] [HB Supervisor] Node.js v16.17.0 /opt/homebridge/bin/node
[20/08/2022, 11:45:07] [HB Supervisor] Homebridge Path: /var/lib/homebridge/node_modules/homebridge/bin/homebridge
[20/08/2022, 11:45:07] [HB Supervisor] UI Path: /opt/homebridge/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js
[20/08/2022, 11:45:17] [Homebridge UI] Homebridge Config UI X v4.50.1 is listening on :: port 8581
[20/08/2022, 11:45:18] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[20/08/2022, 11:45:19] [HB Supervisor] Started Homebridge v1.5.0 with PID: 966
[20/08/2022, 11:45:21] Loaded config.json with 6 accessories and 9 platforms.
[20/08/2022, 11:45:22] Loaded 20 cached accessories from cachedAccessories.
[20/08/2022, 11:45:22] ---
[20/08/2022, 11:45:23] Loaded plugin: [email protected]
[20/08/2022, 11:45:23] Registering platform 'homebridge-edomoticz.eDomoticz'
[20/08/2022, 11:45:23] ---
[20/08/2022, 11:45:24] Disabled plugin: [email protected]
[20/08/2022, 11:45:24] ---
[20/08/2022, 11:45:24] Loaded plugin: [email protected]
[20/08/2022, 11:45:27] Registering platform 'homebridge-fritz-platform.FritzPlatform'
[20/08/2022, 11:45:27] ---
[20/08/2022, 11:45:33] Disabled plugin: [email protected]
[20/08/2022, 11:45:33] ---
[20/08/2022, 11:45:34] Disabled plugin: [email protected]
[20/08/2022, 11:45:34] ---
[20/08/2022, 11:45:34] Loaded plugin: [email protected]
[20/08/2022, 11:45:34] Registering accessory 'homebridge-nodemcu-roomba876.Roomba876'
[20/08/2022, 11:45:34] ---
[20/08/2022, 11:45:34] Disabled plugin: [email protected]
[20/08/2022, 11:45:34] ---
[20/08/2022, 11:45:34] Loaded plugin: [email protected]
[20/08/2022, 11:45:34] Registering accessory 'homebridge-pihole.Pihole'
[20/08/2022, 11:45:34] ---
[20/08/2022, 11:45:39] Loaded plugin: [email protected]
[20/08/2022, 11:45:39] Registering platform 'homebridge-ring.Ring'
[20/08/2022, 11:45:39] ---
[20/08/2022, 11:45:39] Disabled plugin: [email protected]
[20/08/2022, 11:45:39] ---
[20/08/2022, 11:45:39] Loaded plugin: [email protected]
[20/08/2022, 11:45:41] Registering platform 'homebridge-shelly.Shelly'
[20/08/2022, 11:45:41] ---
[20/08/2022, 11:45:41] Loaded plugin: [email protected]
[20/08/2022, 11:45:41] Registering accessory 'homebridge-tiedyegeek-hyperion-ng.Hyperion'
[20/08/2022, 11:45:41] ---
[20/08/2022, 11:45:48] Loaded plugin: @switchbot/[email protected]
[20/08/2022, 11:45:48] Registering platform '@switchbot/homebridge-switchbot.SwitchBot'
[20/08/2022, 11:45:48] ---
[20/08/2022, 11:45:48] Loading 9 platforms...
[20/08/2022, 11:45:48] Ignoring config for the platform "eveatmo" in your config.json as the plugin "homebridge-eveatmo" has been disabled.
[20/08/2022, 11:45:48] Ignoring config for the platform "OTGW" in your config.json as the plugin "homebridge-otgw" has been disabled.
[20/08/2022, 11:45:48] [Shelly] Initializing Shelly platform...
[20/08/2022, 11:45:48] Ignoring config for the platform "netcasttv" in your config.json as the plugin "homebridge-netcast-tv" has been disabled.
[20/08/2022, 11:45:48] [FritzPlatform] Initializing FritzPlatform platform...
[20/08/2022, 11:45:54] [Domoticz] Initializing eDomoticz platform...
[20/08/2022, 11:45:54] [SwitchBot] Initializing SwitchBot platform...
[20/08/2022, 11:45:54] [SwitchBot] Platform Config: {"logging":"standard"}
[20/08/2022, 11:45:54] [Ring] Initializing Ring platform...
[20/08/2022, 11:45:54] Loading 6 accessories...
[20/08/2022, 11:45:54] [Roomba] Initializing Roomba876 accessory...
[20/08/2022, 11:45:54] [Roomba] Initialised Roomba with Name: [Roomba] Hostname: [http://192.168.1.125] Model: [606]
[20/08/2022, 11:45:54] [Roomba] Services requested
[20/08/2022, 11:45:54] [Roomba] Reporting that we support AccessoryInformation, SwitchService and BatteryService
[20/08/2022, 11:45:54] [TV Backlight] Initializing Hyperion accessory...
[20/08/2022, 11:45:54] [TV Backlight] Starting Hyperion Accessory
[20/08/2022, 11:45:54] [Pihole] Initializing Pihole accessory...
[20/08/2022, 11:45:54] Ignoring config for the accessory "mqttthing" in your config.json as the plugin "homebridge-mqttthing" has been disabled.
[20/08/2022, 11:45:54] Ignoring config for the accessory "mqttthing" in your config.json as the plugin "homebridge-mqttthing" has been disabled.
[20/08/2022, 11:45:54] Ignoring config for the accessory "mqttthing" in your config.json as the plugin "homebridge-mqttthing" has been disabled.
[20/08/2022, 11:45:54] [Ring] Configuring cached accessory d583db62-f2e0-4b43-8b37-6aa1a37c0721 Voordeur
[20/08/2022, 11:45:54] [Ring] Configuring cached accessory b4b0e9e6-8277-46cb-907d-06f58f321df3 Gang
[20/08/2022, 11:45:54] [Ring] Configuring cached accessory 13ac7f2a-0f10-47d5-9c4c-43c686184559 Thuis Mode
[20/08/2022, 11:45:54] [Shelly] 1 accessory loaded from cache
[20/08/2022, 11:45:55] [Domoticz] synchronizeAccessories in progress...
Setup Payload:
X-HM://0023T6VP45BJ9
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 205-90-328 │     
    └────────────┘     
                       
[20/08/2022, 11:45:55] Homebridge v1.5.0 (HAP v0.10.2) (Homebridge 8242) is running on port 51070.
[20/08/2022, 11:45:55] [Shelly] Admin server is running on port 8181
[20/08/2022, 11:45:55] [FritzPlatform]  FRITZ Box 7590: Configuring cached accessory...
[20/08/2022, 11:45:55] [FritzPlatform]  FRITZ Box 7590 Wifi 2ghz: Configuring cached accessory...
[20/08/2022, 11:45:55] [FritzPlatform]  FRITZ Box 7590 Wifi 5ghz: Configuring cached accessory...
[20/08/2022, 11:45:55] [FritzPlatform]  FRITZ Box 7590: Setup accessory...
[20/08/2022, 11:45:55] [FritzPlatform]  FRITZ Box 7590 Wifi 2ghz: Setup accessory...
[20/08/2022, 11:45:55] [FritzPlatform]  FRITZ Box 7590 Wifi 5ghz: Setup accessory...
[20/08/2022, 11:45:55] [SwitchBot] Total SwitchBot Devices Found: 1
[20/08/2022, 11:45:55] [SwitchBot] Restoring existing accessory from cache: Curtain 90 DeviceID: E3255EA70290
[20/08/2022, 11:45:55] [SwitchBot] Curtain: Curtain 90 scanDuration is less then updateRate, overriding scanDuration with updateRate
[20/08/2022, 11:45:55] [SwitchBot] Curtain: Curtain 90 Config: {"set_minStep":20,"setOpenMode":"0","setCloseMode":"0","ble":true,"logging":"standard"}
[20/08/2022, 11:45:56] [Roomba] Power state requested for Roomba
[20/08/2022, 11:45:56] [Roomba] Battery level requested for Roomba
[20/08/2022, 11:45:56] [Roomba] Charging status requested for Roomba
[20/08/2022, 11:45:57] [Pihole] {"data":{"status":"enabled"},"status":200,"statusText":"OK","headers":{"set-cookie":["PHPSESSID=o2aig8fuqvfego4bf3isjm9b2d; path=/; HttpOnly"],"expires":"Thu, 19 Nov 1981 08:52:00 GMT","cache-control":"no-store, no-cache, must-revalidate","pragma":"no-cache","content-type":"application/json","x-pi-hole":"The Pi-hole Web interface is working!","x-frame-options":"DENY","content-length":"20","connection":"close","date":"Sat, 20 Aug 2022 09:45:57 GMT","server":"lighttpd/1.4.59"},"request":{"method":"GET","url":"api.php","params":{"status":1},"baseURL":"http://192.168.1.111:80/admin/","responseType":"json"}}
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
[20/08/2022, 11:45:58] [Ring] Found the following locations:
[20/08/2022, 11:45:58] [Ring]   locationId: 3ebb8044-423c-4d30-9a97-b9ac67680962 - Thuis
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
[20/08/2022, 11:45:59] [Ring] Configuring 1 cameras and 3 devices for location "Thuis" - locationId: 3ebb8044-423c-4d30-9a97-b9ac67680962
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
[20/08/2022, 11:45:59] [homebridge-nodemcu-roomba876] This plugin slows down Homebridge. The read handler for the characteristic 'Battery Level' was slow to respond! See https://homebridge.io/w/JtMGR for more info.
[20/08/2022, 11:45:59] [homebridge-nodemcu-roomba876] This plugin slows down Homebridge. The read handler for the characteristic 'Charging State' was slow to respond! See https://homebridge.io/w/JtMGR for more info.
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
[20/08/2022, 11:46:00] [Roomba] Failed to get roomba battery level
[20/08/2022, 11:46:00] [Roomba] FetchError: request to http://192.168.1.125/status failed, reason: connect EHOSTUNREACH 192.168.1.125:80
    at ClientRequest.<anonymous> (/var/lib/homebridge/node_modules/homebridge-nodemcu-roomba876/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (node:events:513:28)
    at Socket.socketErrorListener (node:_http_client:481:9)
    at Socket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'EHOSTUNREACH',
  code: 'EHOSTUNREACH'
}
[20/08/2022, 11:46:00] [Roomba] Failed to get roomba charging status
[20/08/2022, 11:46:00] [Roomba] FetchError: request to http://192.168.1.125/status failed, reason: connect EHOSTUNREACH 192.168.1.125:80
    at ClientRequest.<anonymous> (/var/lib/homebridge/node_modu

Config for homebridge-switchbot

{
    "name": "SwitchBot",
    "credentials": {
        "openToken": "8668c1cd56faef6d66e6226497b815c36ea08c41c1a47b8a715a548c83d4258c0ff370ad65f65fffe050e1d84a811ba0",
        "notice": "Keep your token a secret!"
    },
    "options": {
        "devices": [
            {
                "deviceId": "E3:25:5E:A7:02:90",
                "configDeviceName": "Curtain 90",
                "configDeviceType": "Curtain",
                "ble": true,
                "curtain": {
                    "set_minStep": 20,
                    "setOpenMode": "0",
                    "setCloseMode": "0"
                },
                "logging": "standard"
            }
        ],
        "logging": "standard"
    },
    "platform": "SwitchBot"
}

Screenshots

No response

Device & Model

Curtain 90

Node.js Version

v16.17.0

NPM Version

8.15.0

Homebridge Version

v1.5.0

Homebridge Switchbot Plugin Version

v1.14.2

Homebridge Config UI X Plugin Version

v4.50.1

Operating System

Raspian

PvdGulik avatar Aug 20 '22 09:08 PvdGulik

I have this error too and it persists when returning to 1.14.0

grunkyb avatar Aug 21 '22 11:08 grunkyb

None of those errors look like they are coming from SwitchBot

donavanbecker avatar Aug 21 '22 12:08 donavanbecker

Hello Donavan,

That is a little fast concluded. After upgrading to the latest plugin it started with this error. And when you dis-enable the Switcht plugin, the error disappears. so how can you tell "None of those errors look like they are coming from SwitchBot.

Thanks!

greet Pieter

Op 21 aug. 2022, om 14:04 heeft Donavan Becker @.***> het volgende geschreven:

Closed #444 https://github.com/OpenWonderLabs/homebridge-switchbot/issues/444 as not planned.

— Reply to this email directly, view it on GitHub https://github.com/OpenWonderLabs/homebridge-switchbot/issues/444#event-7227616129, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACH4FISU7URGICCSCGYAFVLV2ILLNANCNFSM57C7CYSA. You are receiving this because you authored the thread.

PvdGulik avatar Aug 21 '22 12:08 PvdGulik

Can confirm as well, got the same after updating to 1.14.2, but it seems to persist even if rolling back to the older version. Disabling the plugin stops the log from spamming.

image

zaki-hanafiah avatar Aug 21 '22 12:08 zaki-hanafiah

Hello Donavan,

Please reopen this issue, there are more people having this issue.

Thanks

vriendelijke groet,

Pieter

PvdGulik avatar Aug 21 '22 12:08 PvdGulik

SwitchBot are the only BLE devices I’m running from Homebridge

grunkyb avatar Aug 21 '22 12:08 grunkyb

Same with @grunkyb here.

zaki-hanafiah avatar Aug 21 '22 12:08 zaki-hanafiah

Same as @zaki and @grunkyb Switchbot is my only ble device in Homebridge....

PvdGulik avatar Aug 21 '22 13:08 PvdGulik

@PvdGulik I am not experiencing this and that is why it is closed as cannot reproduce.

donavanbecker avatar Aug 21 '22 13:08 donavanbecker

@PvdGulik I am not experiencing this and that is why it is closed as cannot reproduce.

I am also experiencing this as well after update, seems it might be an API you use as even rolling back, or switching to the other Verified Switchbot plug-in that is Bluetooth only has the same error. Only disabling the plug-in the issue goes away.

TommyGKiwi avatar Aug 21 '22 23:08 TommyGKiwi

I'm having the same issue, and v1.14.2 seems to be the cause.

teh-hippo avatar Aug 22 '22 03:08 teh-hippo

same issue here. rollback to 1.14.1 makes the error disappear for me.

galaxydpw avatar Aug 22 '22 16:08 galaxydpw

Here's how it looks with my debug logs turned on for SwitchBot

[22/08/2022, 17:55:35] [SwitchBot] 01:23:45:67:89:ab
[22/08/2022, 17:55:35] [SwitchBot] 01:23:45:67:89:ab
[22/08/2022, 17:55:35] [SwitchBot] Humidifier: Humidifier BLE Address Found: 01:23:45:67:89:ab
[22/08/2022, 17:55:35] [SwitchBot] Humidifier: Humidifier Config BLE Address: 01:23:45:67:89:ab
[22/08/2022, 17:55:35] [SwitchBot] [DEBUG] Humidifier: Humidifier serviceData: {"model":"e","modelName":"WoHumi","onState":true,"autoMode":false,"percentage":27}
[22/08/2022, 17:55:35] [SwitchBot] [DEBUG] Humidifier: Humidifier model: e, modelName: WoHumi,autoMode: false, onState: true, percentage: 27
[22/08/2022, 17:55:35] [SwitchBot] [DEBUG] Humidifier: Humidifier connected: true
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
Show more of the log
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')

This repeats itself a few times with varying numbers of repeats of the TypeError then this

[22/08/2022, 17:55:43] [SwitchBot] 01:23:45:67:89:ab
[22/08/2022, 17:55:43] [SwitchBot] 01:23:45:67:89:ab
[22/08/2022, 17:55:43] [SwitchBot] Humidifier: Humidifier BLE Address Found: 01:23:45:67:89:ab
[22/08/2022, 17:55:43] [SwitchBot] Humidifier: Humidifier Config BLE Address: 01:23:45:67:89:ab
[22/08/2022, 17:55:43] [SwitchBot] [DEBUG] Humidifier: Humidifier serviceData: {"model":"e","modelName":"WoHumi","onState":true,"autoMode":false,"percentage":27}
[22/08/2022, 17:55:43] [SwitchBot] [DEBUG] Humidifier: Humidifier model: e, modelName: WoHumi,autoMode: false, onState: true, percentage: 27
[22/08/2022, 17:55:43] [SwitchBot] [DEBUG] Humidifier: Humidifier connected: true
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
Show more of the log
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')
[22/08/2022, 17:55:44] [SwitchBot] [DEBUG] Humidifier: Humidifier BLE parseStatus
[22/08/2022, 17:55:44] [SwitchBot] [DEBUG] Humidifier: Humidifier CurrentRelativeHumidity: 27
[22/08/2022, 17:55:44] [SwitchBot] [DEBUG] Humidifier: Humidifier Active: 1
[22/08/2022, 17:55:44] [SwitchBot] [DEBUG] Humidifier: Humidifier updateCharacteristic CurrentRelativeHumidity: 27
[22/08/2022, 17:55:44] [SwitchBot] [DEBUG] Humidifier: Humidifier updateCharacteristic CurrentHumidifierDehumidifierState: 0
[22/08/2022, 17:55:44] [SwitchBot] [DEBUG] Humidifier: Humidifier updateCharacteristic TargetHumidifierDehumidifierState: 1
[22/08/2022, 17:55:44] [SwitchBot] [DEBUG] Humidifier: Humidifier updateCharacteristic Active: 1
[22/08/2022, 17:55:44] [SwitchBot] [DEBUG] Humidifier: Humidifier updateCharacteristic RelativeHumidityHumidifierThreshold: 0

grunkyb avatar Aug 22 '22 17:08 grunkyb

Hello Donavan, Please reopen this issue, as you can see there are more and more people having this issue. Thanks

PvdGulik avatar Aug 23 '22 18:08 PvdGulik

I'm able to connect to the device through the OpenAPI, e.g., curl -X GET -k -H 'Authorization: xxxx' -i 'https://api.switch-bot.com/v1.0/devices/0123456789AB/status'

What's everyone using here? I'm on a Raspberry Pi 4B running 64-bit Bullseye.

I'm wondering if it's a Pi + BLE thing but need others to confirm.

grunkyb avatar Aug 23 '22 21:08 grunkyb

For me at least, you can still activate the Switchbot, but there is a lot of spam in the log. I have pi 3B and using BLE I also noticed there were some build errors In the post upgrade process with a 404 error for abandonware, but that might be a red herring

TommyGKiwi avatar Aug 23 '22 23:08 TommyGKiwi

Like @TommyGKiwi mentioned, I can also still use my Switchbot and the existing automations all work fine, it's just the issue with the errors that are spamming the homebridge logs.

zaki-hanafiah avatar Aug 24 '22 03:08 zaki-hanafiah

Thanks for reopening.

For me the SwitchBot works, just the spam in the log. I’m using a Raspberry Pi 3B+

Thanks

Pieter

PvdGulik avatar Aug 24 '22 05:08 PvdGulik

I'm having the same issue in version 1.14.2

CyberMrProper avatar Aug 25 '22 18:08 CyberMrProper

same issue here. rollback to 1.14.1 makes the error disappear for me.

I reported the error in my lab env, a pi zero 2, with raspbian homebridge and nothing else.

However, I did the installation of the plugin in my prod env, pi4, with many other plugins, and I don't have the error.

galaxydpw avatar Aug 25 '22 19:08 galaxydpw

Seems to only be a raspberryPi noisily log issue.

donavanbecker avatar Aug 27 '22 13:08 donavanbecker

I found that during the installation I get the following error:

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-8/bluetooth_hci_socket-0.5.3-8-node-v93-linux-arm.tar.gz

When I browse following that link, there's nothing in https://github.com/abandonware/node-bluetooth-hci-socket/releases/. Is this related to the Issue #444?

Thanks

PvdGulik avatar Aug 30 '22 17:08 PvdGulik

This is a node-SwitchBot/noble issue. It will have to resolve at those repos before it can be resolved here.

donavanbecker avatar Aug 30 '22 17:08 donavanbecker

Has anyone tried this: https://github.com/OpenWonderLabs/homebridge-switchbot/issues/425#issuecomment-1190864279

donavanbecker avatar Aug 31 '22 13:08 donavanbecker

Yes, I had to use that to connect Pi to BLE.

grunkyb avatar Aug 31 '22 13:08 grunkyb

Can anyone spot anything in this function in noble? You can see that this could be throwing it.

Hci.prototype.processLeAdvertisingReport = function (numReports, data) {
  try {
    for (let i = 0; i < numReports; i++) {
      const type = data.readUInt8(0);
      const addressType = data.readUInt8(1) === 0x01 ? 'random' : 'public';
      const address = data
        .slice(2, 8)
        .toString('hex')
        .match(/.{1,2}/g)
        .reverse()
        .join(':');
      const eirLength = data.readUInt8(8);
      const eir = data.slice(9, eirLength + 9);
      const rssi = data.readInt8(eirLength + 9);

      debug(`\t\t\ttype = ${type}`);
      debug(`\t\t\taddress = ${address}`);
      debug(`\t\t\taddress type = ${addressType}`);
      debug(`\t\t\teir = ${eir.toString('hex')}`);
      debug(`\t\t\trssi = ${rssi}`);

      this.emit(
        'leAdvertisingReport',
        0,
        type,
        address,
        addressType,
        eir,
        rssi
      );

      data = data.slice(eirLength + 10);
    }
  } catch (e) {
    console.warn(
      `processLeAdvertisingReport: Caught illegal packet (buffer overflow): ${e}`
    );
  }
};

grunkyb avatar Aug 31 '22 13:08 grunkyb

I have the same error too.

csyee avatar Sep 01 '22 00:09 csyee

Has anyone tried this: https://github.com/OpenWonderLabs/homebridge-switchbot/issues/425#issuecomment-1190864279

Yes, but did not resolve the issue.. Still continues errors in the logging

PvdGulik avatar Sep 05 '22 05:09 PvdGulik

I have the same issue. It switches from local BLE to mini hub, therefore, no operation problem, but log are full of this error.

Niklas31 avatar Sep 05 '22 21:09 Niklas31

Not sure why there seems to be two bug reports for the same issue, but I'll chime in. I have the same issue (Raspberry Pi). I suspected SwitchBot since it started after I upgraded to 1.14.2 but when I rolled back the issue persisted. So I wasn't sure. Then I was away on vacation for two weeks. Came back to the issue still happening and I see others have reported the issue here.

nyjklein avatar Sep 10 '22 13:09 nyjklein