Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapter stays yellow, no BT devise found #536

Open
1 task done
Track4123 opened this issue Dec 19, 2024 · 9 comments
Open
1 task done

Adapter stays yellow, no BT devise found #536

Track4123 opened this issue Dec 19, 2024 · 9 comments
Labels
Verification Verification

Comments

@Track4123
Copy link

Track4123 commented Dec 19, 2024

Is there an existing issue for this?

  • I have searched the existing issues and no issue is describing my issue

The problem

After updating the NPM the Adapter stays yellow, no BT devise is found. Tried already the reinstall and followed the recommendations in the fix issues, no success. What can this be?

Version of the JS controller

10.8.2

Version of Node.js

20.18.1

Operating system

Linux

Anything in the logs that might be useful?

No response

Additional information

No response

@Track4123 Track4123 added Potential bug Potential bug Verification Verification labels Dec 19, 2024
@Track4123
Copy link
Author

@mrbungle64 keine Idee? Ist leider Schade das es nicht mehr funktioniert.
Dachte kann mir die Bridge sparen...

@mrbungle64
Copy link
Owner

@Track4123

Probier mal ein npm install von bluetooth-hci-socket:

cd /opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket/
npm install

@MagicPST
Copy link

MagicPST commented Jan 6, 2025

Habe das gleiche Problem ! Habe bluetooth-hci-socket neu installiert. Im log tauchen keine Fehler auf.Aber er findet nichts.
Das ganze ist erst jetzt aufgetreten nach einem update und upgrade der ubuntu systems Ubuntu 20.04.6 LTS
Node.js v20.18.1 NPM 10.8.2

@Track4123
Copy link
Author

Track4123 commented Jan 6, 2025

@mrbungle64, hab ich gemacht, leider kein Erfolg😩 sagt dir der Log was, z.B. die Warning?
FAF41223-2BA9-47BB-BFDB-23EE4A9DBFC0

Hier auch noch der Log vom Adapter Install; auch eine Warning

A797EC8F-93A6-460D-A158-AF11EB514EE0

@mrbungle64
Copy link
Owner

mrbungle64 commented Jan 6, 2025

@Track4123

Propier noch mal ein rebuild von bluetooth-hci-socket und noble

cd /opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket/
npm rebuild bluetooth-hci-socket
npm rebuild noble

Btw: Bitte keine Screenshots. Damit kann man schlecht Copy'n'Paste machen, wenn es mal notwendig ist

@mrbungle64 mrbungle64 removed the Potential bug Potential bug label Jan 6, 2025
@Track4123
Copy link
Author

Track4123 commented Jan 6, 2025

@mrbungle64 gle64 , danke.
Habe ich beides gemacht, beides succesfully.
Danach habe ich den raspberry nochmal neu gestartet, keine Änderung, Adapter noch gelb.
hier auch noch der Log

iobroker@iobroker:~ $ cd /opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket/
iobroker@iobroker:/opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket $ npm rebuild bluetooth-hci-socket
rebuilt dependencies successfully
iobroker@iobroker:/opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket $ npm rebuild noble
rebuilt dependencies successfully
iobroker@iobroker:/opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket $

wie gesagt, kein Erfolg :-(

@Track4123
Copy link
Author

@mrbungle64 , hast du noch eine Idee was es sein kann? Habe meines Wissens alles Mögliche geprüft und ich bin auch nicht der Einzige mit dem Problem😥🫣🤔

@mrbungle64
Copy link
Owner

@Track4123

@mrbungle64 , hast du noch eine Idee was es sein kann? Habe meines Wissens alles Mögliche geprüft und ich bin auch nicht der Einzige mit dem Problem😥🫣🤔

Leider nein. Ich sehe in deinen Screenshots auch keinen Fehler (Warnings sind keine Fehler).
Du müsstest noch mal eine vollständige Log-Ausgabe als Text posten. Vielleicht ist da mehr zu sehen.

@Track4123
Copy link
Author

Track4123 commented Jan 15, 2025

@mrbungle64, here we are:

Adapter Installation:

$ iobroker url https://github.com/mrbungle64/ioBroker.switchbot-ble --host iobroker --debug
install mrbungle64/ioBroker.switchbot-ble#3e7cf9932d474a2d5b6ece92c96c1a36bb90d329
NPM version: 10.8.2
Installing mrbungle64/ioBroker.switchbot-ble#3e7cf9932d474a2d5b6ece92c96c1a36bb90d329... (System call)
npm warn skipping integrity check for git dependency ssh://[email protected]/mrbungle64/ioBroker.switchbot-ble.git

@abandonware/[email protected] install> node-pre-gyp install --build-from-source
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected] | linux | arm64
node-pre-gyp info build requesting source compile
gyp info it worked if it ends with okgyp info using [email protected] info using [email protected] | linux | arm64
gyp info ok
gyp info it worked if it ends with okgyp info using [email protected] info using [email protected] | linux | arm64
gyp info find Python using Python version 3.11.2 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',gyp info spawn args 'binding.gyp',gyp info spawn args '-f',gyp info spawn args 'make',gyp info spawn args '-I',gyp info spawn args '/opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket/build/config.gypi',gyp info spawn args '-I',gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',gyp info spawn args '-I',gyp info spawn args '/home/iobroker/.cache/node-gyp/20.18.1/include/node/common.gypi',gyp info spawn args '-Dlibrary=shared_library',gyp info spawn args '-Dvisibility=default',gyp info spawn args '-Dnode_root_dir=/home/iobroker/.cache/node-gyp/20.18.1',gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',gyp info spawn args '-Dnode_lib_file=/home/iobroker/.cache/node-gyp/20.18.1/<(target_arch)/node.lib',gyp info spawn args '-Dmodule_root_dir=/opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket',gyp info spawn args '-Dnode_engine=v8',gyp info spawn args '--depth=.',gyp info spawn args '--no-parallel',gyp info spawn args '--generator-output',gyp info spawn args 'build',gyp info spawn args '-Goutput_dir=.'gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected] info using [email protected] | linux | arm64
gyp info spawn make
make: Entering directory '/opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket/build' CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.ogyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
In file included from /home/iobroker/.cache/node-gyp/20.18.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:/home/iobroker/.cache/node-gyp/20.18.1/include/node/node.h:1232:7: warning: cast between incompatible function types from ‘void ()(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void ()(v8::Localv8::Object)’} to ‘node::addon_register_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, void)’} [-Wcast-function-type] 1232 | (node::addon_register_func) (regfunc), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/home/iobroker/.cache/node-gyp/20.18.1/include/node/node.h:1266:3: note: in expansion of macro ‘NODE_MODULE_X’ 1266 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage) | ^~~~~~~~~~~~~../src/BluetoothHciSocket.cpp:860:1: note: in expansion of macro ‘NODE_MODULE’ 860 | NODE_MODULE(binding, BluetoothHciSocket::Init); | ^~~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/bluetooth_hci_socket.node
COPY Release/bluetooth_hci_socket.node
COPY /opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket/build'
node-pre-gyp info ok
@abandonware/[email protected] install> node-gyp-build
gyp info it worked if it ends with ok
gyp info using [email protected] info using [email protected] | linux | arm64
gyp info find Python using Python version 3.11.2 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3gyp info spawn args [gyp info spawn args '/opt/iobroker/node_modules/node-gyp/gyp/gyp_main.py',gyp info spawn args 'binding.gyp',gyp info spawn args '-f',gyp info spawn args 'make',gyp info spawn args '-I',gyp info spawn args '/opt/iobroker/node_modules/@abandonware/noble/build/config.gypi',gyp info spawn args '-I',gyp info spawn args '/opt/iobroker/node_modules/node-gyp/addon.gypi',gyp info spawn args '-I',gyp info spawn args '/home/iobroker/.cache/node-gyp/20.18.1/include/node/common.gypi',gyp info spawn args '-Dlibrary=shared_library',gyp info spawn args '-Dvisibility=default',gyp info spawn args '-Dnode_root_dir=/home/iobroker/.cache/node-gyp/20.18.1',gyp info spawn args '-Dnode_gyp_dir=/opt/iobroker/node_modules/node-gyp',gyp info spawn args '-Dnode_lib_file=/home/iobroker/.cache/node-gyp/20.18.1/<(target_arch)/node.lib',gyp info spawn args '-Dmodule_root_dir=/opt/iobroker/node_modules/@abandonware/noble',gyp info spawn args '-Dnode_engine=v8',gyp info spawn args '--depth=.',gyp info spawn args '--no-parallel',gyp info spawn args '--generator-output',gyp info spawn args 'build',gyp info spawn args '-Goutput_dir=.'gyp info spawn args ]
gyp info spawn makegyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/opt/iobroker/node_modules/@abandonware/noble/build' SOLINK_MODULE(target) Release/obj.target/noble.node
COPY Release/noble.node
gyp info ok
added 30 packages in 10s196 packages are looking for funding run npm fund for details
upload [4] switchbot-ble.admin /opt/iobroker/node_modules/iobroker.switchbot-ble/admin/admin.d.ts admin.d.ts video/mp2t
upload [2] switchbot-ble.admin /opt/iobroker/node_modules/iobroker.switchbot-ble/admin/style.css style.css text/css
upload [1] switchbot-ble.admin /opt/iobroker/node_modules/iobroker.switchbot-ble/admin/switchbot-ble.png switchbot-ble.png image/png
Updating objects from io-package.json for adapter "switchbot-ble" with version "0.4.9"
Process exited with code 0

Anlegen der Instanz:

$ iobroker add switchbot-ble auto --host iobroker --debug
host.iobroker create instance switchbot-ble
host.iobroker object system.adapter.switchbot-ble.0.alive created
host.iobroker object system.adapter.switchbot-ble.0.connected created
host.iobroker object system.adapter.switchbot-ble.0.compactMode created
host.iobroker object system.adapter.switchbot-ble.0.cpu created
host.iobroker object system.adapter.switchbot-ble.0.cputime created
host.iobroker object system.adapter.switchbot-ble.0.memHeapUsed created
host.iobroker object system.adapter.switchbot-ble.0.memHeapTotal created
host.iobroker object system.adapter.switchbot-ble.0.memRss created
host.iobroker object system.adapter.switchbot-ble.0.uptime created
host.iobroker object system.adapter.switchbot-ble.0.inputCount created
host.iobroker object system.adapter.switchbot-ble.0.eventLoopLag created
host.iobroker object system.adapter.switchbot-ble.0.sigKill created
host.iobroker object system.adapter.switchbot-ble.0.logLevel created
host.iobroker object switchbot-ble.0.info created
host.iobroker object switchbot-ble.0.info.connection created
host.iobroker Set default value of switchbot-ble.0.info.connection: false
host.iobroker object system.adapter.switchbot-ble.0 created
Process exited with code 0

Log vom Start der Instanz:

2025-01-15 23:21:46.301 - info: host.iobroker instance system.adapter.switchbot-ble.0 in version "0.4.9" (non-npm: mrbungle64/ioBroker.switchbot-ble#3e7cf9932d474a2d5b6ece92c96c1a36bb90d329) started with pid 543147

2025-01-15 23:21:46.831 - debug: switchbot-ble.0 (543147) Redis Objects: Use Redis connection: 127.0.0.1:9001
2025-01-15 23:21:46.842 - debug: switchbot-ble.0 (543147) Objects client ready ... initialize now
2025-01-15 23:21:46.843 - debug: switchbot-ble.0 (543147) Objects create System PubSub Client
2025-01-15 23:21:46.844 - debug: switchbot-ble.0 (543147) Objects create User PubSub Client
2025-01-15 23:21:46.854 - debug: switchbot-ble.0 (543147) Objects client initialize lua scripts
2025-01-15 23:21:46.857 - debug: switchbot-ble.0 (543147) Objects connected to redis: 127.0.0.1:9001
2025-01-15 23:21:46.858 - silly: switchbot-ble.0 (543147) redis psubscribe cfg.o.system.user.*
2025-01-15 23:21:46.864 - silly: switchbot-ble.0 (543147) redis psubscribe cfg.o.enum.*
2025-01-15 23:21:46.865 - silly: switchbot-ble.0 (543147) objectDB connected
2025-01-15 23:21:46.867 - debug: switchbot-ble.0 (543147) Redis States: Use Redis connection: 127.0.0.1:9000
2025-01-15 23:21:46.870 - debug: switchbot-ble.0 (543147) States create System PubSub Client
2025-01-15 23:21:46.871 - debug: switchbot-ble.0 (543147) States create User PubSub Client
2025-01-15 23:21:46.916 - debug: switchbot-ble.0 (543147) States connected to redis: 127.0.0.1:9000
2025-01-15 23:21:46.917 - silly: switchbot-ble.0 (543147) statesDB connected
2025-01-15 23:21:46.982 - info: switchbot-ble.0 (543147) starting. Version 0.4.9 (non-npm: mrbungle64/ioBroker.switchbot-ble#3e7cf9932d474a2d5b6ece92c96c1a36bb90d329) in /opt/iobroker/node_modules/iobroker.switchbot-ble, node: v20.18.1, js-controller: 7.0.6
2025-01-15 23:21:46.990 - debug: switchbot-ble.0 (543147) Init interval: 5000
2025-01-15 23:21:46.990 - debug: switchbot-ble.0 (543147) Init scanDevicesWait: 5000
2025-01-15 23:21:46.991 - debug: switchbot-ble.0 (543147) Init pressDevicesWait: 5000
2025-01-15 23:21:46.991 - debug: switchbot-ble.0 (543147) Init maxRetriesDeviceAction: 10
2025-01-15 23:21:46.991 - info: switchbot-ble.0 (543147) Set the NOBLE_HCI_DEVICE_ID environment variable to 0 (hci0)
2025-01-15 23:21:47.019 - silly: switchbot-ble.0 (543147) States system redis pmessage system.adapter.switchbot-ble.0.logLevel/system.adapter.switchbot-ble.0.logLevel:{"val":"silly","ack":true,"ts":1736979707008,"q":0,"from":"system.adapter.switchbot-ble.0","lc":1736979496504}
2025-01-15 23:21:47.024 - silly: switchbot-ble.0 (543147) States user redis pmessage switchbot-ble.0.*/switchbot-ble.0.info.connection:{"val":false,"ack":true,"ts":1736979707023,"q":0,"from":"system.adapter.switchbot-ble.0","user":"system.user.xxxxx","lc":1736979172488}
2025-01-15 23:21:47.025 - debug: switchbot-ble.0 (543147) [onStateChange] state switchbot-ble.0.info.connection changed: false (ack = true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Verification Verification
Projects
None yet
Development

No branches or pull requests

3 participants