Open morning3tar opened 1 month ago
Did this work for you on previous versions?
Getting the same issue. I disabled the Switchbot plugin and everything is working now.
+1 Same issue here.
I rolled back 3.4.0, and everything is working as intended.
And is this only on Bots for everyone?
And is this only on Bots for everyone?
Yep. I have the same error message as OP.
+1 Same issue here.
I rolled back 3.4.0, and everything is working as intended.
I rolled back to the 3.4.0 version but the issue persists and not working.
I have found part of the issue, just need to figure out a fix and resolve it. I will do it as quick as I can as life allows.
Hi, idk if can be of any help, I think the error is also present for hubs, or at least I have a similar error for the humidity retrieving of hub2, the error message seems the same, so it could be related.
TypeError: Cannot read properties of undefined (reading 'CurrentRelativeHumidity')
at Hub.updateHomeKitCharacteristics (file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/hub.ts: 345:37)
at new Hub (file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/hub.ts:141:10)
at SwitchBotPlatform.createHub2 (file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/platform.ts: 1094:9)
at processTicksAndRejections (node: internal/process/task_queues: 95:5)
Similar issue as above. Fixed by reverting the version.
[05/06/2024, 12:17:10 pm] [SwitchBot] Restoring existing accessory from cache: Hub 2 DeviceID: ABC123
TypeError: Cannot read properties of undefined (reading 'battery')
at Meter.BLEparseStatus (file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meter.ts:155:52)
at file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meter.ts:267:18
at runNextTicks (node:internal/process/task_queues:60:5)
at listOnTimeout (node:internal/timers:540:9)
at processTimers (node:internal/timers:514:7)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I don't believe this is stale; I'm still on 3.4. In case it helps, I'm running on a Raspberry Pi.
[21/06/2024, 8:49:41 am] [SwitchBot] Restoring existing accessory from cache: Hub 2 DeviceID: MY_DEVICE_ID
TypeError: Cannot read properties of undefined (reading 'battery')
at Meter.BLEparseStatus (file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meter.ts:155:52)
at file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meter.ts:267:18
at runNextTicks (node:internal/process/task_queues:60:5)
at listOnTimeout (node:internal/timers:540:9)
at processTimers (node:internal/timers:514:7)
[21/06/2024, 8:49:47 am] [SwitchBot] Child bridge process ended
I don't believe this is stale; I'm still on 3.4. In case it helps, I'm running on a Raspberry Pi.
[21/06/2024, 8:49:41 am] [SwitchBot] Restoring existing accessory from cache: Hub 2 DeviceID: MY_DEVICE_ID TypeError: Cannot read properties of undefined (reading 'battery') at Meter.BLEparseStatus (file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meter.ts:155:52) at file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meter.ts:267:18 at runNextTicks (node:internal/process/task_queues:60:5) at listOnTimeout (node:internal/timers:540:9) at processTimers (node:internal/timers:514:7) [21/06/2024, 8:49:47 am] [SwitchBot] Child bridge process ended
can you try the latest beta?
Issue is still occurring.
[21/06/2024, 4:48:10 pm] [SwitchBot] MeterPlus: Server Meter ad: {
"id": "ab1c234567d8",
"address": "ab:1c:23:45:67:d8",
"rssi": -32,
"serviceData": {
"model": "i",
"modelName": "WoSensorTH",
"modelfriendlyName": "Meter",
"temperature": {
"c": 18.6,
"f": 65.5
},
"fahrenheit": false,
"humidity": 51,
"battery": 100
}
}
[21/06/2024, 4:48:12 pm] [SwitchBot] MeterPlus: Server Meter ad: {
"id": "ab1c234567d8",
"address": "ab:1c:23:45:67:d8",
"rssi": -27,
"serviceData": {
"model": "i",
"modelName": "WoSensorTH",
"modelfriendlyName": "Meter",
"temperature": {
"c": 18.6,
"f": 65.5
},
"fahrenheit": false,
"humidity": 51,
"battery": 100
}
}
[21/06/2024, 4:48:14 pm] [SwitchBot] MeterPlus: Server Meter ad: {
"id": "ab1c234567d8",
"address": "ab:1c:23:45:67:d8",
"rssi": -28,
"serviceData": {
"model": "i",
"modelName": "WoSensorTH",
"modelfriendlyName": "Meter",
"temperature": {
"c": 18.6,
"f": 65.5
},
"fahrenheit": false,
"humidity": 51,
"battery": 100
}
}
TypeError: Cannot read properties of undefined (reading 'c')
at Meter.BLEparseStatus (file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meter.ts:164:47)
at runNextTicks (node:internal/process/task_queues:60:5)
at listOnTimeout (node:internal/timers:540:9)
at processTimers (node:internal/timers:514:7)
at file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meter.ts:263:11
[21/06/2024, 4:48:15 pm] [SwitchBot] Child bridge process ended
v3.5.1 has been released, please install and let me know if this has been resolved.
Negative; same problem.
On Fri, 28 Jun 2024 at 12:46 PM, Donavan Becker @.***> wrote:
v3.5.1 has been released, please install and let me know if this has been resolved.
— Reply to this email directly, view it on GitHub https://github.com/OpenWonderLabs/homebridge-switchbot/issues/977#issuecomment-2196007699 or unsubscribe https://github.com/notifications/unsubscribe-auth/AADXWRJNITBZD3BLPX7N2HTZJTE7TBFKMF2HI4TJMJ2XIZLTSSBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLAVFOZQWY5LFVIZTEMJRHAYTAMBUGWSG4YLNMWUWQYLTL5WGCYTFNSWHG5LCNJSWG5C7OR4XAZNMJFZXG5LFINXW23LFNZ2KM5DPOBUWG44TQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKJTHEYDONZUHE3THAVEOR4XAZNFNFZXG5LFUV3GC3DVMWVDEMZRHEYTQMZRGU4IFJDUPFYGLJLMMFRGK3FFOZQWY5LFVIZTEMJRHAYTAMBUGWTXI4TJM5TWK4VGMNZGKYLUMU . You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .
Still have some issues.
[01/07/2024, 10:22:15] [SwitchBot] Process Ended. Code: 1, Signal: null
[01/07/2024, 10:22:22] [SwitchBot] Restarting Process...
[01/07/2024, 10:22:22] [SwitchBot] Launched child bridge with PID 3737
[01/07/2024, 10:22:23] Registering platform '@switchbot/homebridge-switchbot.SwitchBot'
[01/07/2024, 10:22:23] [SwitchBot] Loaded @switchbot/homebridge-switchbot v3.5.1 child bridge successfully
[01/07/2024, 10:22:23] Loaded 1 cached accessories from cachedAccessories.0xx4xxxxD43x.
[01/07/2024, 10:22:23] Homebridge v1.8.3 (HAP v0.12.2) (SwitchBot) is running on port 32125.
[01/07/2024, 10:22:24] [SwitchBot] Total SwitchBot Devices Found: 1
[01/07/2024, 10:22:24] [SwitchBot] Restoring existing accessory from cache: SwitchBot deviceId: Dxx533xxxxxx
[01/07/2024, 10:22:29] [SwitchBot] Bot: SwitchBot failed to get serviceData, serviceData: [object Object]
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Timeout'
| property '_idlePrev' -> object with constructor 'TimersList'
--- property '_idleNext' closes the circle
at JSON.stringify (<anonymous>)
at Bot.BLERefreshConnection (file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/bot.ts:1392:90)
at file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/bot.ts:680:22
[01/07/2024, 10:22:29] [SwitchBot] Child bridge process ended
[01/07/2024, 10:22:29] [SwitchBot] Process Ended. Code: 1, Signal: null
[01/07/2024, 10:22:36] [SwitchBot] Restarting Process...
Describe the Bug
Hello, I am experiencing an issue with the plugin when attempting to use the bot in BLE mode. The plugin is not working correctly and keeps causing the child bridge to reboot.
To Reproduce
Expected Behavior
The plugin should be able to control the SwitchBot devices in BLE mode without causing the child bridge to reboot.
Relevant Log Output
Config for homebridge-switchbot
Screenshots
No response
Device and Model
SwitchBot V6.6
Node.js Version
v20.13.1
NPM Version
v8.19.4
Homebridge Version
v1.8.2
Homebridge Switchbot Plugin Version
v3.5.0
Homebridge Config UI X Plugin Version
No response
Operating System
Raspbian