Open nfoonf opened 1 month ago
Hi! did I forget any vital information in this bug report or did I miss something?
No I just haven't had time to figure it out
@nfoonf Can you try the latest beta?
Somehow it got even worse....
[6/23/2024, 11:25:33 AM] [SwitchBot] WoIOSensor: Bad ad: {
"id": "c13932334890",
"address": "c1:39:32:33:48:90",
"rssi": -71,
"serviceData": {
"model": "w",
"modelName": "WoIOSensorTH",
"modelFriendlyName": "Outdoor Meter",
"temperature": {
"c": 24.4,
"f": 75.9
},
"fahrenheit": false,
"humidity": 51,
"battery": 89
}
}
[6/23/2024, 11:25:35 AM] TypeError: Cannot read properties of undefined (reading 'c')
at IOSensor.BLEparseStatus (file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/iosensor.ts:182:47)
at file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/iosensor.ts:279:11
[6/23/2024, 11:25:35 AM] Got SIGTERM, shutting down Homebridge...
[6/23/2024, 11:25:35 AM] TypeError: Cannot read properties of undefined (reading 'c')
at IOSensor.BLEparseStatus (file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/iosensor.ts:182: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:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/iosensor.ts:279:11
[6/23/2024, 11:25:35 AM] [SwitchBot] MeterPlus: Fritzbox failed to get serviceData, serviceData: [object Object]
[6/23/2024, 11:25:35 AM] 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 MeterPlus.BLERefreshConnection (file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meterplus.ts:338:90)
at file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meterplus.ts:272:22
at runNextTicks (node:internal/process/task_queues:60:5)
at listOnTimeout (node:internal/timers:540:9)
at processTimers (node:internal/timers:514:7)
[6/23/2024, 11:25:35 AM] TypeError: Cannot read properties of undefined (reading 'c')
at MeterPlus.BLEparseStatus (file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meterplus.ts:169:47)
at file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meterplus.ts:268:11
It also does not work again after downgrading to 3.4.0 again. So probably the sensors are broken now?
sorry, different accountname here because of different laptop.
i tested once more with the latest beta
humidity goes through, and the sensors are queried correctly a couple of times but then we get another error:
6/28/2024, 1:49:48 AM] [SwitchBot] MeterPlus: Fritzbox ad: {
"id": "ea7d00692354",
"address": "ea:7d:00:69:23:54",
"rssi": -59,
"serviceData": {
"model": "i",
"modelName": "WoSensorTH",
"modelfriendlyName": "Meter",
"temperature": {
"c": 29.1,
"f": 84.4
},
"fahrenheit": false,
"humidity": 52,
"battery": 21
}
}
[6/28/2024, 1:49:49 AM] [SwitchBot] MeterPlus: Fritzbox failed to get serviceData, serviceData: [object Object]
[6/28/2024, 1:49:49 AM] 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 MeterPlus.BLERefreshConnection (file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meterplus.ts:365:90)
at file:///homebridge/node_modules/@switchbot/homebridge-switchbot/src/device/meterplus.ts:297:22
[6/28/2024, 1:49:49 AM] Got SIGTERM, shutting down Homebridge...
v3.5.1 has been released, please install and let me know if this has been resolved.
Describe the Bug
in v3.4.0 the IOSensor support loses values for humidity during parsing. In the debug log, one can see that the values are received but change to undefined during parsing
To Reproduce
install v3.4.0 v3.5.0 puts home bridge into a reboot cycle of death, but the bug is in the code as well as far as I can see
Expected Behavior
get humidity data, obviously
Relevant Log Output
Config for homebridge-switchbot
Screenshots
No response
Device and Model
raspberry pi model 4 running docker
Node.js Version
v20.12.2
NPM Version
10.5.0
Homebridge Version
Homebridge v1.8.2 in docker container homebridge/homebridge:2024-05-02
Homebridge Switchbot Plugin Version
3.4.0
Homebridge Config UI X Plugin Version
No response
Operating System
Raspian