Closed korgoth closed 3 years ago
This is the Network presence part of my config - if it helps:
{
"debug": true,
"interval": 60,
"threshold": 15,
"anyoneSensor": false,
"devices": [
{
"name": "iPhone",
"ip": "xxx.xxx.xxx.xxx",
"threshold": 15
}
],
"platform": "NetworkPresence"
}
what raspberry pi are you using?
Raspberry PI 3B+
Whats - i have added this to /boot/config.txt to disable wifi and bt:
[all] dtoverlay=disable-wifi dtoverlay=disable-bt
But even if i remove it - the behavior is still the same
I'm using the exact same device with many other plugins and I haven't experienced it... if you remove this plugin it works well? maybe you installed any new plugin that takes all your memory?
Strange thing is it was working just fine until i rebooted the RPi.
I still have about 500MB of free memory.
Whats even more odd is that i currently have the plugin installed - just no devices setup - and the Homebridge process is starting and its working. If i add a device - then it hangs. If i remove the device - it starts up again. I have tried with various devices (phones, routers, computers) - every time the same result. :-/
node version?
homebridge version?
HB: 1.2.5 Node: 14.15.3
Plugin versions tried: 1.2.3, 1.2.1, 1.2.0
can you try and change the homebridge version to 1.1.7?
I just did - same error
After todays HB update to 1.3 i set the Network presence plugin to run as a separate process (a child bridge). And the result is the same:
[20/02/2021, 11:52:13] [homebridge-network-presence] Child bridge process ended
[20/02/2021, 11:52:13] [homebridge-network-presence] Process Ended. Code: null, Signal: SIGABRT
[20/02/2021, 11:52:20] [homebridge-network-presence] Restarting Process...
Initializing HAP-NodeJS v0.9.1...
[20/02/2021, 11:52:22] [homebridge-network-presence] Launched external bridge with PID 25884
[20/02/2021, 11:52:23] Registering platform 'homebridge-network-presence.NetworkPresence'
[20/02/2021, 11:52:23] [homebridge-network-presence] Loaded homebridge-network-presence v1.2.3 successfully
Preparing Advertiser for 'homebridge-network-presence 019B' using ciao backend!
[20/02/2021, 11:52:23] [homebridge-network-presence] Initiating Network Scanner...
<--- Last few GCs --->
[25884:0x52bba00] 27183 ms: Scavenge 224.7 (227.8) -> 223.6 (228.3) MB, 27.0 / 0.0 ms (average mu = 0.351, current mu = 0.224) allocation failure
[25884:0x52bba00] 27226 ms: Scavenge 225.2 (228.3) -> 224.2 (228.8) MB, 31.9 / 0.0 ms (average mu = 0.351, current mu = 0.224) allocation failure
[25884:0x52bba00] 27276 ms: Scavenge 225.6 (228.8) -> 224.7 (229.3) MB, 39.4 / 0.0 ms (average mu = 0.351, current mu = 0.224) allocation failure
<--- JS stacktrace --->
FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
[20/02/2021, 11:52:51] [homebridge-network-presence] Child bridge process ended
After more testing it seems that network presence is somehow conflicting with MagicHome Dynamic platform plugin. (guess they since they are both scanning the network for devices something times out. I removed the MagicHome Dynamic platform plugin and replaced it with the more simple Homebridge Magichome Platform (https://github.com/sahilchaddha/homebridge-magichome-platform) - where all magic home devices are required to have static IP addresses described in the config. Now everything seems to work correctly.
I have been using this plugin for about 2 weeks and so far it was working fine.
Today i had to make some tweaks to my RPi (disable wifi and bluetooth) and when i rebooted the RPi - homebridge was not starting anymore. I believe that this plugin is causing the problem since when i disable it - everything works ok. I have tried to revert my change (ie turn wifi and bluetooth back on and reboot the server) - but i homebridge still fails to start when i have anything configured with network presence.
Here is what i see in the log right before it fails:
And this goes on in an endless loop. I only had 1 accessory configured + the "Anyone" sensor.
I just can't figure out what might be the cause of that. Does anyone has any idea how to debug any further as from the log i am not getting any useful information so far