Apollon77 / hap-controller-node

Node.js library to implement a HAP (HomeKit) controller
Mozilla Public License 2.0
54 stars 16 forks source link

Fails to start when using just IP Discovery without a bluetooth adapter #202

Open mod812 opened 9 months ago

mod812 commented 9 months ago

Describe the bug
The library works great when you have a bluetooth adapter available, however if just wanting to use IP based discovery without a bluetooth adapter installed, it will fail to start.

To Reproduce
Steps to reproduce the behavior:

  1. Installed Library via NPM.
  2. Copied the IP Discovery Sample from the examples directory in the git repo.
  3. Run the sample.

Expected behavior
IP DIscovery should start without a Bluetooth adapter.

Screenshots & Logfiles
/mnt/c/Users/mod812/source/homehub/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js:9 super(...args); ^

Error: EAFNOSUPPORT, Address family not supported by protocol at new BluetoothHciSocketWrapped (/mnt/c/Users/mod812/source/homehub/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js:9:5) at new Hci (/mnt/c/Users/mod812/source/homehub/node_modules/@abandonware/noble/lib/hci-socket/hci.js:99:18) at new NobleBindings (/mnt/c/Users/mod812/source/homehub/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:27:15) at module.exports (/mnt/c/Users/mod812/source/homehub/node_modules/@abandonware/noble/lib/resolve-bindings.js:34:12) at module.exports (/mnt/c/Users/mod812/source/homehub/node_modules/@abandonware/noble/with-custom-binding.js:3:53) at Object. (/mnt/c/Users/mod812/source/homehub/node_modules/@abandonware/noble/index.js:1:50) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) { errno: 97, code: 'EAFNOSUPPORT', syscall: 'socket' }

Versions:

Additional context
Tried on a linux box with a bluetooth adapter and it works great.

Thanks, Derrick

Apollon77 commented 9 months ago

It seems that ths lazy BLE loading is not functioning correctly .. hmm ... need to look into it

stale[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.