Describe The Bug:
The child bridge throws an error, then restarts. It does this in a loop, over and over. I've restarted Homebridge and fully power cycled the Mac, but no difference. Any suggestions?
To Reproduce:
It does the same thing for me, every time.
Expected behavior:
It will start and run, and not restart over and over.
Logs:
[6/4/2023, 5:51:29 PM] [Dreo Platform] Restarting Process...
[6/4/2023, 5:51:29 PM] [Dreo Platform] Launched child bridge with PID 20251
[6/4/2023, 5:51:29 PM] Registering platform 'homebridge-dreo.DreoPlatform'
[6/4/2023, 5:51:29 PM] [Dreo Platform] Loaded homebridge-dreo v2.0.2 child bridge successfully
[6/4/2023, 5:51:29 PM] [Dreo Platform] Finished initializing platform: Dreo Platform
[6/4/2023, 5:51:29 PM] Publishing bridge accessory (name: Dreo Platform, publishInfo: {
username: '[REDACTED]',
port: 42126,
pincode: '[REDACTED]',
category: 2,
bind: undefined,
mdns: undefined,
addIdentifyingMaterial: true,
advertiser: 'bonjour-hap'
}).
[6/4/2023, 5:51:29 PM] [Dreo Platform] Executed didFinishLaunching callback
[6/4/2023, 5:51:29 PM] Homebridge v1.6.1 (HAP v0.11.1) (Dreo Platform) is running on port 42126.
[6/4/2023, 5:51:29 PM] [Dreo Platform]
REMOTE:
{
access_token: '[REDACTED]',
refresh_token: '[REDACTED]',
countryCode: 'US',
scope: 'all',
token_type: 'bearer',
region: 'NA',
expires_in: 315359169,
userid: '[REDACTED]'
}
[6/4/2023, 5:51:29 PM] [Dreo Platform] Country: US
[6/4/2023, 5:51:29 PM] [Dreo Platform] Region: NA
[6/4/2023, 5:51:29 PM] [Dreo Platform]
DEVICES:
[
{
deviceId: '[REDACTED]',
sn: '[REDACTED]',
brand: 'Dreo',
model: 'DR-HAF004S',
productId: '[REDACTED]',
productName: 'Air Circulator',
deviceName: 'Air Circulator',
shared: false,
series: null,
seriesName: 'Falcon S',
controlsConf: {
template: 'DR-HAF004S',
lottie: [Object],
cards: [Array],
preference: [Array],
control: [Array],
category: 'Air Circulators',
version: [Object],
updateMcuVersion: ''
},
mainConf: {
isSmart: true,
isWifi: true,
isBluetooth: true,
isVoiceControl: true
},
resourcesConf: {
imageSmallSrc: 'https://resources.dreo-cloud.com/app/202302/15b4a846f9849144729e6d3a9fe6592d95.png',
imageFullSrc: 'https://resources.dreo-cloud.com/app/202302/158b6be82ae48e45fbb41e8d73af5e32e8.zip'
},
servicesConf: [ [Object] ]
}
]
[6/4/2023, 5:51:29 PM] [Dreo Platform] wss://wsb-us.dreo-cloud.com/websocket?accessToken=3836038c-3769-4b64-a86c-2015653442cd×tamp=1685919089853
[6/4/2023, 5:51:30 PM] [Dreo Platform] WebSocket Opened
[6/4/2023, 5:51:30 PM] [Dreo Platform] Adding new accessory: Air Circulator
[6/4/2023, 5:51:30 PM] [Dreo Platform] {
wifi_rssi: { state: -52, timestamp: 1685911146 },
poweron: { state: true, timestamp: 1685911146 },
cruiseconf: { state: '90,45,0,-45', timestamp: 1685911146 },
timeron: { state: { du: 0, ts: 424 }, timestamp: null },
fixedconf: { state: '18,-2', timestamp: 1685911146 },
mode: { state: 1, timestamp: 1685911237 },
mcuon: { state: true, timestamp: 1685911146 },
network_latency: { state: 86, timestamp: 1685911146 },
module_hardware_model: { state: 'PAI-051', timestamp: 1685911146 },
mcu_firmware_version: { state: '0.6.3', timestamp: 1685911146 },
lightsensoron: { state: true, timestamp: 1685911146 },
customconf: { state: 'temp:22222333344455667788999', timestamp: 1685911146 },
oscmode: { state: 3, timestamp: 1685911152 },
temperature: { state: 79, timestamp: 1685917006 },
module_hardware_mac: { state: '00:1c:c2:64:20:ec', timestamp: 1685911146 },
alignon: { state: true, timestamp: 1685911146 },
muteon: { state: false, timestamp: 1685911146 },
mcu_hardware_model: { state: 'SC95F8613B', timestamp: 1685911146 },
wifi_ssid: { state: '[REDACTED]', timestamp: 1685911146 },
windlevel: { state: 1, timestamp: 1685911244 },
wrong: { state: 0, timestamp: 1685911146 },
module_firmware_version: { state: '1.2.13', timestamp: 1685911146 },
connected: { state: true, timestamp: 1685911146 },
timeroff: { state: { du: 0, ts: 424 }, timestamp: null },
childlockon: { state: false, timestamp: 1685911146 }
}
TypeError: Cannot read properties of undefined (reading 'state')
at new FanAccessory (/usr/local/lib/node_modules/homebridge-dreo/src/FanAccessory.ts:40:46)
at DreoPlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-dreo/src/platform.ts:150:9)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
[6/4/2023, 5:51:30 PM] [Dreo Platform] Child bridge process ended
[6/4/2023, 5:51:30 PM] [Dreo Platform] Process Ended. Code: 1, Signal: null
Plugin Config:
{
"options": {
"email": "[REDACTED]",
"password": "[REDACTED]"
},
"name": "Dreo Platform",
"_bridge": {
"username": "[REDACTED]",
"port": 42126
},
"platform": "DreoPlatform"
}
Screenshots:
Environment:
- Plugin Version: v2.0.2
- Homebridge Version: 1.6.1
- Node.js Version: 18.16.0
- NPM Version: 9.6.4
- Operating System: macOS (Silicon M1)