ebaauw/homebridge-rpi

Error when no swap file configured

Closed this issue · 5 comments

Plugin reports error in homebridge log when swap file is configured in RPi

[7.9.2024, 16:55:12] [Homebridge_RPI] Homebridge: warning: heartbeat error: TypeError: Cannot read properties of null (reading '2')
at Function.parseSwap (file:///var/lib/homebridge/node_modules/homebridge-rpi/lib/RpiInfo.js:166:22)
at RpiInfo.getState (file:///var/lib/homebridge/node_modules/homebridge-rpi/lib/RpiInfo.js:52:21)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at RpiAccessory.heartbeat (file:///var/lib/homebridge/node_modules/homebridge-rpi/lib/RpiAccessory.js:159:19)
at RpiAccessory. (file:///var/lib/homebridge/node_modules/homebridge-rpi/lib/RpiAccessory.js:107:11)

Is this on a local or on a remote Pi? Could you please list the output of swapon --info?

Running local on Raspberry with Raspberry PI OS Debian 12. All swapping options disabled with swapoff --all, swap file deleted.

Output of swapon:

root@homebridge:# swapon --summary
root@homebridge:
# swapon --info
swapon: Unbekannte Option »--info«
Try 'swapon --help' for more information.

My bad. And plain swapon?

root@homebridge:/# swapon --show=size,used --noheadings --bytes
root@homebridge:/# swapon
root@homebridge:/# swapon -V
swapon from util-linux 2.38.1

Thanks. Should be fixed in v1.8.21.