Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Pi 3 als Bluetooth LE Scanner (Beispielscript)

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Pi 3 als Bluetooth LE Scanner (Beispielscript)

    This topic has been deleted. Only users with topic management privileges can see it.
    • lobomau
      lobomau last edited by

      @ruhr70:

      Unter "type" stand dort "float" (gibt es als Type in ioBroker nicht).

      Wenn Du das so im Skript änderst (solltest Du wg. möglicher neuer Geräte trotzdem tun), hat das keine Auswirkung, da die Datenpunkte schon angelegt sind.

      Zur Korrektur:

      Die Distanz-Datenpunkte in den Objekten korrigieren (Objekte/Datenpunkt, Zahrad für Einstellungen). Dort steht unter "Allgemein/Type"nun wahrscheinlich "boolean". Das muss für jedes Gerät auf "Zahl" geändert werden. `
      Yeah! Keine Warnungen mehr 🙂 Danke!

      1 Reply Last reply Reply Quote 0
      • S
        Solear last edited by

        So, jetzt habe ich auch das Bluetooth Script von ruhr70 auf dem NUC als Unterhost installiert 8-)

        Klappt sehr gut, die Funkfeuerkanonen namens Apple TVs zeigt er auch sofort an, aber mein iPhone 6S will er nicht anzeigen.

        Egal ob mit Ubuntu per Bluetooth verbunden oder nicht. In dem Script habe ich im ersten Teil auch die Blacklists alle sauber gemacht und auch den Spamfilter auf false gesetzt. Das iPhone will er aber nicht anzeigen 😢

        Gerade das ist mir aber wichtig, weil ich mit (nur) dessen Abwesenheit mir per Pushover Meldungen über die HM Fenstersensoren senden lassen will (davon habe ich gestern 20 Stück gelötet, also Spaß sieht anders aus!). Also quasi eine primitive Alarmanlage im Haus.

        Danke für Infos und besonderen Dank an ruhr70 für das tolle Script!

        edit: vielleicht kann man hier http://forum.iobroker.net/viewtopic.php … 976#p24976 den Fehler mit der Distanz gleich ausbessern um eine "saubere" Version zu haben. Habs per Hand bei mir vorm einkopieren gemacht.

        1 Reply Last reply Reply Quote 0
        • ruhr70
          ruhr70 last edited by

          Das iPhone ist leider nicht dafür geeignet. Außer Du findest eine App, wo es sich z.B als iBeacon nutzen lässt. Ich meine aber iOS lässt das nicht zu.

          Alternativen:

          _ diverse Fitnessarmbänder

          _ Gigaset G-Tag

          _ blukii (oder so ähnlich) die haben ganz brauchbare Schlüsselanhänger oder Tags, die man sich an der Kleidung Heften kann

          _ Beispiele stehen ganz am Anfang

          Gesendet von iPad mit Tapatalk

          1 Reply Last reply Reply Quote 0
          • S
            Solear last edited by

            Mh, ich dachte, weil beim Auto meldet es sich ja auch automatisch an… [emoji26]

            Gesendet von iPhone mit Tapatalk

            1 Reply Last reply Reply Quote 0
            • ruhr70
              ruhr70 last edited by

              @Solear:

              Mh, ich dachte, weil beim Auto meldet es sich ja auch automatisch an… [emoji26]

              Gesendet von iPhone mit Tapatalk `

              https://blog.passkit.com/configure-ipho … ansmitter/

              Von unterwegs gegoogelt. Scheint also eine Lösung zu geben.

              Dann gibt es bestimmt auch Apps.

              Gesendet von iPad mit Tapatalk

              1 Reply Last reply Reply Quote 0
              • ruhr70
                ruhr70 last edited by

                Mit der App könnte es funktionieren:

                „Beacon-tx“ von Luca Ciciriello

                https://appsto.re/de/KfQW9.i

                Gesendet von iPad mit Tapatalk

                1 Reply Last reply Reply Quote 0
                • S
                  Solear last edited by

                  Diese App, und alle die ich ausprobiert habe, hören leider auf zu senden sobald der Bildschirm aus ist.

                  Schade, aber irgendwas muss das iPhone doch standardmäßig aussenden, mit dem Auto verbindet er sich auch automatisch und sofort beim einsteigen ohne mein zutun. Aber vermutlich scannt da das iPhone nur, ob das (bekannte) Auto da ist.

                  Dann muss ich mir doch so einen Schlüsselanhänger-Beacon besorgen oder ich nutze die Geofency App.

                  @ruhr70

                  Du hast doch auch den TI Sensor. Den kann man ja auch als Beacon missbrauchen. Bei mir schaltet er sich leider nur nach einer gewissen Zeit aus und man muss ihn manuell per Knopfdruck aktivieren. Ist das bei dir auch so? Wie kann man den dann im Dauereinsatz einbinden?

                  1 Reply Last reply Reply Quote 0
                  • R
                    rascal last edited by

                    hey,

                    habe heute meinen Rasp 3 bekommen, sofort installiert und iobroker als slave eingebunden.

                    leider funktioniert das Script nicht, bekomme folgende Fehlermeldung:

                    
                    22:36:43.387	[info]	javascript.0 Stop script script.js.Bluetooth
                    22:36:43.392	[info]	javascript.1 Stop script script.js.Bluetooth
                    22:36:43.368	[info]	javascript.2 Stop script script.js.Bluetooth
                    22:36:43.466	[info]	javascript.2 Start javascript script.js.Bluetooth
                    22:36:43.467	[error]	javascript.2 script.js.Bluetooth: Cannot find module 'debug' at Module._compile (module.js:409:26), at Object.Module._extensions..js (module.js:416:10), at Module.load (module.js:343:32), at Function.Module._load (module.js:300:12), at Module.require (module.js:353:17), at require (internal/module.js:12:17), at Object. (/opt/iobroker/node_modules/iobroker.javascript/node_modules/noble/index.js:1:75), at Module._compile (module.js:409:26), at Object.Module._extensions..js (module.js:416:10), at Module.load (module.js:343:32), at Function.Module._load (module.js:300:12), at Module.require (module.js:353:17), at require (internal/module.js:12:17), at sandbox.require (/opt/iobroker/node_modules/iobroker.javascript/javascript.js:644:32), at script.js.Bluetooth:353:15
                    22:36:43.467	[info]	javascript.2 script.js.Bluetooth: --== script.js.Bluetooth ==-- gestartet. Instanz: "javascript.2.", Loglevel: debug2
                    22:36:43.467	[info]	javascript.2 script.js.Bluetooth: debug2: Vars, Loglevel und Scriptname gesetzt
                    22:36:43.468	[error]	javascript.2 script.js.Bluetooth: node.js Module "noble" steht nicht zur Verfügung
                    22:36:43.468	[error]	javascript.2 script.js.Bluetooth: Voraussetzung für noble: https://github.com/sandeepmistry/noble#prerequisites
                    22:36:43.468	[info]	javascript.2 script.js.Bluetooth: Liste bluetoothBlacklistManufacturerData auf gültige Werte geprüft. Anzahl Einträge: 3
                    22:36:43.468	[info]	javascript.2 script.js.Bluetooth: Liste bluetoothBlacklistMac auf gültige Werte geprüft. Anzahl Einträge: 2
                    22:36:43.468	[info]	javascript.2 script.js.Bluetooth: warn: Das Skript wurde nicht gestartet. Siehe Fehlermeldungen.
                    22:36:43.468	[info]	javascript.2 script.js.Bluetooth: registered 0 subscriptions and 0 schedules
                    

                    was mache ich falsch?

                    ich habe 3 javascript instanzen

                    2 auf dem "main" System

                    1 auf dem client-rasp 3

                    das logs script liegt auf dem rasp 3 im global ordner

                    das bluetooth script ebenfalls auf dem rasp 3 im "root" Verzeichnis der Scripts

                    in den Instanzen steht im Config "noble" - Ohne die " - und das Hackerl darunter ist gesetzt

                    was mache ich falsch? 😞

                    Bitte Hilfe

                    1 Reply Last reply Reply Quote 0
                    • Homoran
                      Homoran Global Moderator Administrators last edited by

                      Hast du dir diese seite mal angesehen, die im log als hinweis erscheint

                      https://github.com/sandeepmistry/noble#prerequisites

                      Gruß

                      Rainer

                      1 Reply Last reply Reply Quote 0
                      • R
                        rascal last edited by

                        ja,

                        apt-get install bluetooth bluez libbluetooth-dev libudev-dev

                        alles installiert und die neueste version

                        1 Reply Last reply Reply Quote 0
                        • R
                          rascal last edited by

                          wenn ich noble mittels npm installieren will (wie auf github beschrieben) kommt das:

                          root@Rasp-Radio-Garage:~# npm install noble
                          npm WARN optional dep failed, continuing xpc-connection@0.1.4
                          -
                          > usb@1.1.2 install /root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb
                          > node-pre-gyp install --fallback-to-build
                          
                          make: Entering directory '/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/build'
                            CC(target) Release/obj.target/libusb/libusb/libusb/core.o
                            CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
                            CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
                            CC(target) Release/obj.target/libusb/libusb/libusb/io.o
                            CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
                            CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
                            CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
                            CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
                            CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
                            CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
                            AR(target) Release/obj.target/usb.a
                            COPY Release/usb.a
                            CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
                            CXX(target) Release/obj.target/usb_bindings/src/device.o
                            CXX(target) Release/obj.target/usb_bindings/src/transfer.o
                            SOLINK_MODULE(target) Release/obj.target/usb_bindings.node
                            COPY Release/usb_bindings.node
                            COPY /root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding/usb_bindings.node
                            TOUCH Release/obj.target/action_after_build.stamp
                          make: Leaving directory '/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/build'
                          
                          > bluetooth-hci-socket@0.4.4 install /root/node_modules/noble/node_modules/bluetooth-hci-socket
                          > node-gyp rebuild
                          
                          make: Entering directory '/root/node_modules/noble/node_modules/bluetooth-hci-socket/build'
                            CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
                            SOLINK_MODULE(target) Release/obj.target/binding.node
                            COPY Release/binding.node
                          make: Leaving directory '/root/node_modules/noble/node_modules/bluetooth-hci-socket/build'
                          noble@1.6.0 node_modules/noble
                          ├── bplist-parser@0.0.6
                          ├── debug@2.2.0 (ms@0.7.1)
                          └── bluetooth-hci-socket@0.4.4 (nan@2.3.5, usb@1.1.2)
                          root@Rasp-Radio-Garage:~#
                          
                          
                          1 Reply Last reply Reply Quote 0
                          • ruhr70
                            ruhr70 last edited by

                            @rascal:

                            ja,

                            apt-get install bluetooth bluez libbluetooth-dev libudev-dev

                            alles installiert und die neueste version `
                            Ist noble vorhanden?

                            In den Einstellungen des JavaScript Adapters unter "zusätzliche npm Module laden" eingetragen?

                            Und auf dem Slave auch wirklich installiert?

                            /opt/iobroker/node_modules/iobroker.javascript/node_modules/noble

                            (Aus dem Kopf)

                            Gesendet von iPad mit Tapatalk

                            1 Reply Last reply Reply Quote 0
                            • R
                              rascal last edited by

                              dass habe ich in dem von dir angegebenem Verzeichnis:

                              root@Rasp-Radio-Garage:/opt/iobroker/node_modules/iobroker.javascript/node_modules/noble# ls
                              CHANGELOG.md  examples  index.js  lib  LICENSE  package.json  README.md  test  test.js  with-bindings.js  ws-slave.js
                              root@Rasp-Radio-Garage:/opt/iobroker/node_modules/iobroker.javascript/node_modules/noble#
                              
                              
                              1 Reply Last reply Reply Quote 0
                              • ruhr70
                                ruhr70 last edited by

                                Ja, sorry. Steht ja auch oben im Log.

                                Mmmh…

                                Gesendet von iPad mit Tapatalk

                                1 Reply Last reply Reply Quote 0
                                • R
                                  rascal last edited by

                                  meine Adapter Konfig:
                                  421_unbenannt.jpg

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    rascal last edited by

                                    ist das hier normal?

                                    root@Rasp-Radio-Garage:~# service bluetooth status
                                    * bluetooth.service - Bluetooth service
                                       Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
                                       Active: active (running) since Mit 2016-06-08 23:01:46 CEST; 1min 52s ago
                                         Docs: man:bluetoothd(8)
                                     Main PID: 1007 (bluetoothd)
                                       Status: "Running"
                                       CGroup: /system.slice/bluetooth.service
                                               `-1007 /usr/lib/bluetooth/bluetoothd
                                    
                                    Jun 08 23:01:46 Rasp-Radio-Garage bluetoothd[1007]: Bluetooth daemon 5.23
                                    Jun 08 23:01:46 Rasp-Radio-Garage bluetoothd[1007]: Starting SDP server
                                    Jun 08 23:01:46 Rasp-Radio-Garage systemd[1]: Started Bluetooth service.
                                    Jun 08 23:01:46 Rasp-Radio-Garage bluetoothd[1007]: Bluetooth management interface 1.10 initialized
                                    Jun 08 23:01:46 Rasp-Radio-Garage bluetoothd[1007]: Sap driver initialization failed.
                                    Jun 08 23:01:46 Rasp-Radio-Garage bluetoothd[1007]: sap-server: Operation not permitted (1)
                                    root@Rasp-Radio-Garage:~#
                                    
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • ruhr70
                                      ruhr70 last edited by

                                      Das passt schon.

                                      Ich werde aus dem ersten Fehler nach "Start Skript" nicht schlau. Module Debug?

                                      Als ob noble ein Problem hat.

                                      Node Version ist 4.x?

                                      Ich kann leider erst am Wochenende mir die Details ansehen

                                      Gesendet von iPad mit Tapatalk

                                      1 Reply Last reply Reply Quote 0
                                      • ruhr70
                                        ruhr70 last edited by

                                        Das passt schon bezog sich auf deinen Post davor 🙂

                                        Gesendet von iPad mit Tapatalk

                                        1 Reply Last reply Reply Quote 0
                                        • R
                                          rascal last edited by

                                          root@Rasp-Radio-Garage:~# node -v
                                          v4.4.5
                                          
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            rascal last edited by

                                            soll ich alles, inklusive, raspbian nochmals installieren?

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            613
                                            Online

                                            31.8k
                                            Users

                                            80.0k
                                            Topics

                                            1.3m
                                            Posts

                                            28
                                            254
                                            57359
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo