Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Hardware
    4. Xiaomi Temp and Humidity Monitor 2 + BLE Adapter

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    Xiaomi Temp and Humidity Monitor 2 + BLE Adapter

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

      @smarthome2020 sagte in Xiaomi Temp and Humidity Monitor 2 + BLE Adapter:

      Hi,

      ich hab mir auch mal eines der kleinen Thermometer von Xiaomi besorgt. Nach Flashen der alternativen Firmware kann ich es auch einbinden über den BLE-Adapter in den ioBroker.
      Mir ist aufgefallen, dass jeweils am nächsten Tag keine Aktualisierung der Temperatur mehr erfolgt. Heute zB war der letzte Wert um 7:47 Uhr gesendet worden. Nach Neustart des Adapters geht es dann wieder.
      Der BLE-Adapter liegt in der Version v0.13.4 vor. ioBroker ist per Proxmox-VM neu aufgesetzt am Laufen.
      Man könnte nun den Adapter per Skript neu starten, ich wäre jedoch an einer Lösung ohne Neustart interessiert.

      Hat keiner ein ähnliches Problem? Bzw. eine Lösung ? Ich kann den Adapter vllt per Blockly oder Script neustarten, ist aber eher ein Workaround .

      SBorg 1 Reply Last reply Reply Quote 0
      • SBorg
        SBorg Forum Testing Most Active @Dezi last edited by

        @dezi Sieht so aus als wären nicht alle nötigen Pakete installiert?
        sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev libcap2-bin
        hast du ausgeführt und keinen Fehler erhalten?

        D 1 Reply Last reply Reply Quote 0
        • SBorg
          SBorg Forum Testing Most Active @smarthome2020 last edited by

          @smarthome2020 sagte in Xiaomi Temp and Humidity Monitor 2 + BLE Adapter:

          Hat keiner ein ähnliches Problem? Bzw. eine Lösung ?

          Doch, hatte ich oben bereits erwähnt. Stabil lief es bei mir nie. Dein Problem hatte sich dann bei mir erledigt, als ich Nachts nach dem Backup nochmals den ioB durchstartete (tat dem ioB auch gut 😉 ).
          ...aber im Grunde auch nichts anderes als den BLE-Adapter neu zu starten...

          S 1 Reply Last reply Reply Quote 0
          • S
            smarthome2020 @SBorg last edited by

            @sborg
            Also ich starte den ioBroker jeden Morgen um 05:00 Uhr neu. Dennoch ist um 7 Uhr teilweise keine Verbindung mehr da. Ich wollte nun über die RSSI-Variable schauen, ob ich den Adapter neustarten kann. Wenn es keine Aktualisierung des RSSI-Wertes gibt --> Adapterneustart.

            SBorg 1 Reply Last reply Reply Quote 0
            • SBorg
              SBorg Forum Testing Most Active @smarthome2020 last edited by

              @smarthome2020
              2 Stunden hat er bei mir schon durchgehalten, aber nach 1-2 Tagen war immer Schicht im Schacht.

              Ist zwar nicht die schönste Lösung, wenn es aber sonst nicht anders geht. Könntest höchstens mal den Adapter umstellen ob ihm da was nicht "schmeckt".
              Nutzt du einen MiniPC als ioB-Server oder einen PI? Ev. geht ihm dann nämlich der RAM aus.

              S 1 Reply Last reply Reply Quote 0
              • S
                smarthome2020 @SBorg last edited by

                @sborg
                Hab einen Mini PC mit 8GB RAM. Sollte also reichen . Probiere es mal mit dem Blockly.

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

                  Hier mal mein Blockly, Adapter wurde schon 2x damit neugestartet:

                  
                  <xml xmlns="https://developers.google.com/blockly/xml">
                    <variables>
                      <variable type="timeout" id="BLE-Adapter-Neustart">BLE-Adapter-Neustart</variable>
                    </variables>
                    <block type="on_ext" id="mx#5OD`.VyZDq=4Up2tj" x="163" y="113">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                      <field name="CONDITION">ne</field>
                      <field name="ACK_CONDITION"></field>
                      <value name="OID0">
                        <shadow type="field_oid" id="H+w#Kn139V0tWHK/uXQi">
                          <field name="oid">ble.0.a4:c1:38:57:74:74.rssi</field>
                        </shadow>
                      </value>
                      <statement name="STATEMENT">
                        <block type="timeouts_cleartimeout" id="F1FmC9B1IO7ZrftLA9vB">
                          <field name="NAME">BLE-Adapter-Neustart</field>
                          <next>
                            <block type="timeouts_settimeout" id="uqqZ#KU1Q%b_tt5ZujXy">
                              <field name="NAME">BLE-Adapter-Neustart</field>
                              <field name="DELAY">5</field>
                              <field name="UNIT">min</field>
                              <statement name="STATEMENT">
                                <block type="control" id="V#U6WMi[{+2(-4Sbtbse">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">system.adapter.ble.0.alive</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="logic_boolean" id="0{:#OFY4|?Y7|+/Uv%PS">
                                      <field name="BOOL">FALSE</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="control" id="GvzYu^KLA0BJgSuONBC`">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                      <field name="OID">system.adapter.ble.0.alive</field>
                                      <field name="WITH_DELAY">TRUE</field>
                                      <field name="DELAY_MS">10</field>
                                      <field name="UNIT">sec</field>
                                      <field name="CLEAR_RUNNING">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="Jr%V,C;g(5gP*9!gZQik">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="timeouts_cleartimeout" id="$c#~oXyhd{;1,$m`^4:b">
                                          <field name="NAME">BLE-Adapter-Neustart</field>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </xml>
                  

                  IMG_2187.jpeg

                  1 Reply Last reply Reply Quote 0
                  • D
                    Dezi @SBorg last edited by

                    @sborg

                    Paketlisten werden gelesen... Fertig
                    Abhängigkeitsbaum wird aufgebaut.
                    Statusinformationen werden eingelesen.... Fertig
                    libcap2-bin ist schon die neueste Version (1:2.25-2).
                    libudev-dev ist schon die neueste Version (241-7~deb10u9+rpi1).
                    bluetooth ist schon die neueste Version (5.50-1.2~deb10u3+rpt1).
                    bluez ist schon die neueste Version (5.50-1.2~deb10u3+rpt1).
                    libbluetooth-dev ist schon die neueste Version (5.50-1.2~deb10u3+rpt1).
                    0 aktualisiert, 0 neu installiert, 0 zu entfernen und 11 nicht aktualisiert.
                    

                    Davon hab ich scheinbar auch schon alle

                    Thomas Braun 1 Reply Last reply Reply Quote 0
                    • Thomas Braun
                      Thomas Braun Most Active @Dezi last edited by

                      @dezi sagte in Xiaomi Temp and Humidity Monitor 2 + BLE Adapter:

                      11 nicht aktualisiert.

                      Die hast du aber nicht. Ran da.

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        Dezi @Thomas Braun last edited by

                        @thomas-braun
                        Die hab ich im Anschluss direkt aktualisiert. Denke eher das liegt daran das ich Treiber nicht gestartet bekomme laut iobroker. Bluetooth an sich in an und findet auch Geräte

                        Screenshot 2023-10-16 213755.png

                        Thomas Braun 1 Reply Last reply Reply Quote 0
                        • Thomas Braun
                          Thomas Braun Most Active @Dezi last edited by

                          @dezi

                          rfkill
                          

                          sagt?

                          D 1 Reply Last reply Reply Quote 0
                          • D
                            Dezi @Thomas Braun last edited by

                            @thomas-braun

                            ID TYPE      DEVICE      SOFT      HARD
                             0 wlan      phy0     blocked unblocked
                             1 bluetooth hci0   unblocked unblocked
                            
                            Thomas Braun 1 Reply Last reply Reply Quote 0
                            • Thomas Braun
                              Thomas Braun Most Active @Dezi last edited by

                              @dezi

                              hcitool dev
                              

                              Und wie schaut ein Neusart des Adapters im Log File aus?

                              iob logs --watch | uniq
                              

                              und dann den Adapter Starten.

                              D 1 Reply Last reply Reply Quote 0
                              • D
                                Dezi @Thomas Braun last edited by

                                @thomas-braun

                                Devices:
                                        hci0    B8:27:EB:18:90:A9
                                

                                Logfile sag das selbe wie im ersten Post

                                2023-10-16 22:07:02.491  - error: ble.0 (1765) Cannot find module '../build/Release/bluetooth_hci_socket.node'
                                Require stack:
                                - /opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js
                                - /opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket/index.js
                                - /opt/iobroker/node_modules/@abandonware/noble/lib/hci-socket/hci.js
                                - /opt/iobroker/node_modules/@abandonware/noble/lib/hci-socket/bindings.js
                                - /opt/iobroker/node_modules/@abandonware/noble/lib/resolve-bindings.js
                                - /opt/iobroker/node_modules/@abandonware/noble/with-custom-binding.js
                                - /opt/iobroker/node_modules/@abandonware/noble/index.js
                                - /opt/iobroker/node_modules/iobroker.ble/build/scanProcess.js
                                
                                Thomas Braun 1 Reply Last reply Reply Quote 0
                                • Thomas Braun
                                  Thomas Braun Most Active @Dezi last edited by

                                  @dezi sagte in Xiaomi Temp and Humidity Monitor 2 + BLE Adapter:

                                  Da wird das Modul nicht gebaut, würde ich sagen.

                                  iob diag
                                  

                                  sagt?

                                  D 1 Reply Last reply Reply Quote 0
                                  • D
                                    Dezi @Thomas Braun last edited by

                                    @thomas-braun said in Xiaomi Temp and Humidity Monitor 2 + BLE Adapter:

                                    iob diag

                                    Scheinbar wurde Nodejs nicht richtig installiert

                                    Nodejs-Installation:    /usr/bin/nodejs         v18.17.1
                                                            /usr/local/bin/node             v18.17.1
                                                            /home/pi/.npm/bin/npm           10.2.0
                                                            /home/pi/.npm/bin/npx           10.2.0
                                                            /usr/bin/corepack       0.18.0
                                    
                                    Recommended versions are nodejs 18.18.2 and npm 9.8.1
                                    *** nodejs is NOT correctly installed ***
                                    Wrong installation path detected. This needs to be fixed.
                                    

                                    Werde heute abend mal versuchen das zu fixen.

                                    Thomas Braun 1 Reply Last reply Reply Quote 0
                                    • Thomas Braun
                                      Thomas Braun Most Active @Dezi last edited by

                                      @dezi

                                      Mach es mit dem neuen Kommando.

                                      iob nodejs-update
                                      

                                      Das zieht dir das gerade.

                                      1 Reply Last reply Reply Quote 0
                                      • D
                                        Dezi last edited by Dezi

                                        @thomas-braun said in Xiaomi Temp and Humidity Monitor 2 + BLE Adapter:

                                        iob nodejs-update

                                        Danke, das problem ist weg

                                        Da sind weitere die nicht so gesund aussehen. Habe einen fehler bekommen als ich den ganzen log posten wollte, daher stückchenweise

                                        Edit: Klappt jetzt mit dem ganzen log

                                        Edit2: npm hatte da noch ein Problem wa sin den griff bekommen habe. Ich bekomme jetzt über 20 Bluetooth-Geräte angezeigt obwohl ich bei Aktive Plugns Xiamo eingegeben habe, wie kann ich das eingerenzen.

                                        Oder geht das nicht?

                                        Und meine Thermometer die dort angezeigt werden, haben kein verwertbaren Daten stehen

                                        SBorg 1 Reply Last reply Reply Quote 0
                                        • SBorg
                                          SBorg Forum Testing Most Active @Dezi last edited by

                                          @dezi sagte in Xiaomi Temp and Humidity Monitor 2 + BLE Adapter:

                                          Ich bekomme jetzt über 20 Bluetooth-Geräte angezeigt obwohl ich bei Aktive Plugns Xiamo eingegeben habe, wie kann ich das eingerenzen.

                                          Das kommt noch davon, dass du wohl "Neue Geräte suchen" aktiviert hast. Da wird alles was BT ist entdeckt. Was dich nicht interessiert/von dir ist, einfach löschen. Kommt aber mit der "Neue Geräte suchen" - Aktivierung wieder bzw. dann ev. andere. Verhindern lässt sich das nicht.
                                          Mittels das Plugin wird dann bestimmt, dass bei einem Datenstring "fe95..." (war es glaube ich) die Daten im Xiaomi-Format vorliegen und dann bspw an Stelle 14-18 (absolut geraten 😉 ) vom Datenstring die Temperatur übertragen wurde.
                                          Ohne Plugin müsstest du von den Thermometern zumindest den "fe95"-Datenstring bekommen.

                                          D 1 Reply Last reply Reply Quote 0
                                          • D
                                            Dezi @SBorg last edited by

                                            @sborg
                                            Die Einstellungen sehen zur Zeit so aus
                                            Screenshot 2023-10-16 213755.png
                                            Screenshot 2023-10-18 200458.png

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            589
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            ble ble adapter sensor xiaomi
                                            50
                                            247
                                            52553
                                            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