Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Off Topic
    4. Microcontroller
    5. JK-BMS über RS485 mit ESPHome auslesen

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    JK-BMS über RS485 mit ESPHome auslesen

    This topic has been deleted. Only users with topic management privileges can see it.
    • syssi
      syssi @Marco 3 last edited by

      Super! Ich hatte in der Vergangenheit den ein oder anderen ioBroker-User, bei welchen die Einstellungen des MQTT-Adapters zu einem Absturz des ESPs geführt haben. Es gibt bei ioBroker die Option, dass der neue MQTT-User erstmal mit Nachrichten geflutet werden soll. Dies überfordert den ESP und er crasht. Schaltet man die Option aus, läuft der Betrieb in der Regel stabil. Du scheinst nicht über diesen Punkt gestolpert zu sein.

      M 1 Reply Last reply Reply Quote 0
      • M
        Marco 3 @syssi last edited by

        @syssi
        noch nicht.... bin noch nicht weiter gekommen, ich glaub da ist was mit den Leerzeichen..... bringt Fehler bei der IP Zeile und Passwort usw..... kann an das auch in die Secret Zeile irgend wie einpflegen?

        mach dann in ca. 2h weiter...

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

          ich störe nur ungern!

          aber hat das noch was mit Einsteigerfragen zu ioBroker zu tun?

          1 Reply Last reply Reply Quote 0
          • syssi
            syssi @Marco 3 last edited by

            @marco-3 Anstatt die Secrets in der secrets.yaml zu pflegen, welche im gleichen Verzehnis liegen muss, kannst du die Stellen auch gegen hardcodierte Werte ersetzen:

            # vorher
            mqtt:
              broker: !secret mqtt_host
              username: !secret mqtt_username
              password: !secret mqtt_password
              id: mqtt_client
            
            # nachher
            mqtt:
              broker: 192.168.1.2
              username: MQTT_USERNAME
              password: MQTT_PASSWORD
              id: mqtt_client
            

            Solltest du zu den ioBroker-Nutzern gehören, die ihren Broker ohne Benutzername und Passwort betreiben, kannst du diese Zeilen auch entfernen:

            mqtt:
              broker: 192.168.1.2
              port: 1883
            
            M 1 Reply Last reply Reply Quote 0
            • M
              Marco 3 @syssi last edited by Marco 3

              @syssi

              ich habe erst hard codiert probiert, da gab es Fehler beim compilen.
              mit Pflege der secrets.yaml hat das compilen und hochladen funktioniert.

              Aber es kommt nichts im iobroker an --> STOP --> ich hab das # entfernen vom MQTT vergessen....JETZT kommt was im iobroker MQTT an!

              Das logging unter HA loggt folgendes:

              21:06:35][D][jk_bms_ble:663]: Unknown168: C0.06.00.00.00.00.00.00.00.00.00.00.00.00.07.00.01.00.00.00.29.04.00.00.00.00.A4.18.3F.40.00.00.00.00.E2.04.00.00.00.00.00.01.00.05.00.00 (46)
              [21:06:35][D][jk_bms_ble:677]: Unknown189: 0x04 0x00
              [21:06:35][D][jk_bms_ble:681]: Unknown192: 0x00
              [21:06:35][D][jk_bms_ble:683]: Unknown193: 0x00 0xA4 (0x00 0x8D)
              [21:06:35][D][jk_bms_ble:685]: Unknown195: 0x18 0x3F (0x21 0x40)
              [21:06:35][W][component:214]: Component esp32_ble took a long time for an operation (0.56 s).
              [21:06:35][W][component:215]: Components should block for at most 20-30ms.
              [21:06:40][I][jk_bms_ble:467]: Cell info frame (version 2, 300 bytes) received
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 1': Sending state 3.31500 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 1': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 2': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 2': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 3': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 3': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 4': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 4': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 5': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 5': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 6': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 6': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 7': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 7': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 8': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 8': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 9': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 9': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 10': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 10': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 11': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 11': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 12': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell resistance 12': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 13': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 14': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 cell voltage 15': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 min voltage cell': Sending state 2.00000  with 0 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 temperature sensor 2': Sending state 10.50000 °C with 1 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 power tube temperature': Sending state 11.90000 °C with 1 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 errors bitmask': Sending state 0.00000  with 0 decimals of accuracy
              [21:06:40][D][text_sensor:064]: 'bms1 errors': Sending state ''
              [21:06:40][D][sensor:094]: 'bms1 balancing current': Sending state 0.00000 A with 2 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 state of charge': Sending state 77.00000 % with 0 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 capacity remaining': Sending state 216.96301 Ah with 3 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 total battery capacity setting': Sending state 280.00000 Ah with 0 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 charging cycles': Sending state 140.00000  with 0 decimals of accuracy
              [21:06:40][D][sensor:094]: 'bms1 total charging cycle capacity': Sending state 39417.99219 Ah with 3 decimals of accuracy
              [21:06:40][D][jk_bms_ble:647]: Unknown158: 0x64 0x00 (always 0x64 0x00?)
              [21:06:40][D][jk_bms_ble:650]: Unknown160: 0x7D 0x02 (always 0xC5 0x09?)
              [21:06:40][D][sensor:094]: 'bms1 total runtime': Sending state 31019928.00000 s with 0 decimals of accuracy
              [21:06:40][D][text_sensor:064]: 'bms1 total runtime formatted': Sending state '359d '
              [21:06:40][D][jk_bms_ble:663]: Unknown168: C0.06.00.00.00.00.00.00.00.00.00.00.00.00.07.00.01.00.00.00.29.04.00.00.00.00.A4.18.3F.40.00.00.00.00.E2.04.00.00.00.00.00.01.00.05.00.00 (46)
              [21:06:40][D][jk_bms_ble:677]: Unknown189: 0x04 0x00
              [21:06:40][D][jk_bms_ble:681]: Unknown192: 0x00
              [21:06:40][D][jk_bms_ble:683]: Unknown193: 0x00 0xA4 (0x00 0x8D)
              [21:06:45][I][jk_bms_ble:467]: Cell info frame (version 2, 300 bytes) received
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 1': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 1': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 2': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 2': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 3': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 3': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 4': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 4': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 5': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 5': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 6': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 6': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 7': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 7': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 8': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 8': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 9': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 9': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 10': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 10': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 11': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 11': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 12': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 12': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell voltage 14': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:45][D][sensor:094]: 'bms1 cell resistance 14': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:46][D][sensor:094]: 'bms1 cell voltage 15': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:46][D][sensor:094]: 'bms1 cell resistance 15': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:46][D][sensor:094]: 'bms1 min voltage cell': Sending state 2.00000  with 0 decimals of accuracy
              [21:06:46][D][jk_bms_ble:557]: Unknown112: 0x00 0x00
              [21:06:46][D][jk_bms_ble:562]: Wire resistance warning bitmask: 0x00 0x00 0x00 0x00
              [21:06:46][D][sensor:094]: 'bms1 total voltage': Sending state 53.07000 V with 2 decimals of accuracy
              [21:06:46][D][sensor:094]: 'bms1 current': Sending state 0.00000 A with 2 decimals of accuracy
              [21:06:46][D][sensor:094]: 'bms1 power': Sending state 0.00000 W with 2 decimals of accuracy
              [21:06:46][D][sensor:094]: 'bms1 state of charge': Sending state 77.00000 % with 0 decimals of accuracy
              [21:06:46][D][sensor:094]: 'bms1 capacity remaining': Sending state 216.96301 Ah with 3 decimals of accuracy
              [21:06:46][D][sensor:094]: 'bms1 total battery capacity setting': Sending state 280.00000 Ah with 0 decimals of accuracy
              [21:06:46][D][sensor:094]: 'bms1 charging cycles': Sending state 140.00000  with 0 decimals of accuracy
              [21:06:46][D][jk_bms_ble:681]: Unknown192: 0x00
              [21:06:46][D][jk_bms_ble:683]: Unknown193: 0x00 0xA4 (0x00 0x8D)
              [21:06:46][D][jk_bms_ble:685]: Unknown195: 0x18 0x3F (0x21 0x40)
              [21:06:46][W][component:214]: Component esp32_ble took a long time for an operation (0.55 s).
              [21:06:46][W][component:215]: Components should block for at most 20-30ms.
              [21:06:50][I][jk_bms_ble:467]: Cell info frame (version 2, 300 bytes) received
              [21:06:50][D][sensor:094]: 'bms1 cell voltage 1': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:50][D][sensor:094]: 'bms1 cell resistance 1': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:50][D][sensor:094]: 'bms1 cell voltage 2': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:50][D][sensor:094]: 'bms1 cell resistance 2': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:50][D][sensor:094]: 'bms1 cell voltage 3': Sending state 3.31500 V with 3 decimals of accuracy
              [21:06:50][D][sensor:094]: 'bms1 cell resistance 3': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:50][D][sensor:094]: 'bms1 cell voltage 4': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:50][D][sensor:094]: 'bms1 cell resistance 4': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell voltage 5': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell resistance 5': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell voltage 6': Sending state 3.31500 V with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell resistance 6': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell voltage 7': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell resistance 7': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell voltage 8': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell resistance 8': Sending state 0.03800 Ω with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell voltage 9': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell resistance 9': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell voltage 10': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell voltage 12': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell resistance 12': Sending state 0.03700 Ω with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell voltage 13': Sending state 3.31600 V with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 cell voltage 14': Sending state 3.31800 V with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 average cell voltage': Sending state 3.31700 V with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 delta cell voltage': Sending state 0.00200 V with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 max voltage cell': Sending state 2.00000  with 0 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 min voltage cell': Sending state 1.00000  with 0 decimals of accuracy
              [21:06:51][D][jk_bms_ble:557]: Unknown112: 0x00 0x00
              [21:06:51][D][jk_bms_ble:562]: Wire resistance warning bitmask: 0x00 0x00 0x00 0x00
              [21:06:51][D][sensor:094]: 'bms1 total voltage': Sending state 53.06800 V with 2 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 current': Sending state 0.00000 A with 2 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 discharging power': Sending state 0.00000 W with 2 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 temperature sensor 1': Sending state 10.10000 °C with 1 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 temperature sensor 2': Sending state 10.50000 °C with 1 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 power tube temperature': Sending state 11.90000 °C with 1 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 errors bitmask': Sending state 0.00000  with 0 decimals of accuracy
              [21:06:51][D][text_sensor:064]: 'bms1 errors': Sending state ''
              [21:06:51][D][sensor:094]: 'bms1 balancing current': Sending state 0.00000 A with 2 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 state of charge': Sending state 77.00000 % with 0 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 capacity remaining': Sending state 216.96301 Ah with 3 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 total battery capacity setting': Sending state 280.00000 Ah with 0 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 charging cycles': Sending state 140.00000  with 0 decimals of accuracy
              [21:06:51][D][sensor:094]: 'bms1 total charging cycle capacity': Sending state 39417.99219 Ah with 3 decimals of accuracy
              [21:06:51][D][jk_bms_ble:647]: Unknown158: 0x64 0x00 (always 0x64 0x00?)
              [21:06:51][D][jk_bms_ble:650]: Unknown160: 0x7D 0x02 (always 0xC5 0x09?)
              [21:06:51][D][sensor:094]: 'bms1 total runtime': Sending state 31019940.00000 s with 0 decimals of accuracy
              [21:06:51][D][text_sensor:064]: 'bms1 total runtime formatted': Sending state '359d '
              [21:06:51][D][jk_bms_ble:663]: Unknown168: C0.06.00.00.00.00.00.00.00.00.00.00.00.00.07.00.01.00.00.00.29.04.00.00.00.00.A4.18.3F.40.00.00.00.00.E2.04.00.00.00.00.00.01.00.05.00.00 (46)
              [21:06:51][D][jk_bms_ble:677]: Unknown189: 0x04 0x00
              [21:06:51][D][jk_bms_ble:681]: Unknown192: 0x00
              
              
              1 Reply Last reply Reply Quote 0
              • M
                Marco 3 last edited by Marco 3

                Update:
                die MQTT habe ich erst einmal deaktiviert. Lief nur 5min

                Daher habe ich den ESP32 noch einmal neu aufgesetzt. mit aktivem web server

                web_server:
                  port: 80
                

                api erst mal noch aktiviert und MQTT deaktiviert

                # If you don't use Home Assistant please remove this `api` section and uncomment the `mqtt` component!
                api:
                
                # mqtt:
                #   broker: !secret mqtt_host
                #   username: !secret mqtt_username
                #   password: !secret mqtt_password
                #   id: mqtt_client
                

                Allgemein läuft es ca 5min und dann ist der WEB server nicht mehr erreichbar und der ESP scheint sich aufzuhängen.... es blinkt nicht mehr so wie er es bei aktiver Verbindung macht.

                Kann ich die api: auch deaktivieren, baut er dann den WEB server trotzdem auf?

                So wie ich dass nun beobachte, hat er sich gerade von selbst wieder verbunden und liefert wieder Daten an den WEB Server....

                syssi 1 Reply Last reply Reply Quote 0
                • syssi
                  syssi @Marco 3 last edited by

                  @marco-3 Die api-Komponente möchte eine aktive Verbindung zu einem HA-Instanz oder ESPHome-Client. Wenn diese fehlt, geht die Node von einem Problem aus und startet neu. So kannst du dieses Verhalten unterbinden:

                  api:
                    reboot_timeout: 0s
                  

                  Die api-Komponente ist praktisch um per ESPHome-Client das Log abzurufen:

                  ~/.local/bin/esphome log esp32-ble-example.yaml
                  

                  Wenn du das nicht brauchst / dir das Log über die Webseite anschaust, kannst du die Zeile auch komplett weg lassen. Die sog. native API ist nur notwendig für direkte Home Assistant oder ESPHome-CLI-Anbindung.

                  1 Reply Last reply Reply Quote 0
                  • M
                    Marco 3 last edited by

                    mqtt:
                      broker: 192.168.178.83
                      port: 1883
                      username: mqttuser
                      password: passwort
                      
                    

                    ich hab den MQTT versucht zu aktivieren, der ESP verbindet und bleibt erst mal verbunden mit dem iobroker.

                    Aber:
                    Screenshot 2024-01-04 125746.png

                    so bringt er es im MQTT Ordner rein.

                    esphome, homeassitant sind nicht gewollt, kommen aber über die Verbindung mit.

                    Ich glaube, aber nicht wissen, gestern hatte ich dies mit bms1 gemacht, da war nur der bms1 Ordner da.

                    Und dieses mal stehen keine Werte drin, nur nan

                    Ich gehe erst einmal wieder zurück... zum anders ESP (Programm BLE 3.4 oder so aus AkkuDoktor Forum)

                    Was mir hier noch aufgefallen ist, wenn man mit BT auf den JK-bms drauf geht, das Piep Feedback.

                    bei:
                    Handy --> biep-biep (und er ist verbunden)
                    ESP (BLE_3.4) --> biep-biep (und er ist verbunden)
                    ESP (esphome) --> biep-------------------------------biep (verbunden, aber manchmal auch nur 1 piep

                    syssi 1 Reply Last reply Reply Quote 0
                    • syssi
                      syssi @Marco 3 last edited by

                      @marco-3 Der Ordner esphome und homeassistant helfen Home Assistant die Node automatisch zu finden und als neues Gerät inkl. seiner Entitäten (Sensoren, Schalter, Bedienelemte, etc.) anzubieten. Du kannst das verhalten deaktivieren:

                      mqtt:
                        broker: 192.168.178.83
                        port: 1883
                        username: mqttuser
                        password: passwort
                        discovery: false
                      

                      Anschließend sollte nur noch ein Ordner übrig bleiben, welcher den Hostnamen der ESPHome Node (jk-bms wenn du den Wert unter name: nicht geändert hast) trägt. Hier finden sich alle Messwerte etc.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        Marco 3 @syssi last edited by

                        @syssi
                        Danke, daß werde ich heute abend probieren.

                        Jetzt noch die Frage mit dem

                        Piep, Piep login bei Handy -App

                        und

                        dem Piep,........1-4sekunden, Piep --> bei esphome login.

                        Kann dies mit dem SU - 123456 login und die damit zur Verfügung stehenden "Buttons" zu tuen haben?

                        Ist es möglich, die SU Rechte zu entkoppeln, um eine eventuelle Fehlbedienung (Ladeschlussspannugng), BMS Balancer Startspannung BMS off, ) zu vermeiden. Quasie nur kucken, aber nix anfassen.

                        Wenn ich die Zeit heute finde werde ich noch mal einen neuen ESP D1 Mini ESP32 heute flaschen.

                        Was kann man alles raus hauen, um diesen ESP performant zu machen, das Web Interface eventuell zu lassen, um gleich zu sehen, ob noch Daten kommen. HomeAssistant ist erst mal nicht gewünscht, da ich iobroker bevorzuge, aber die homeassistant Umgbung nutzen möchte, um den ESP zu flashen, ist um einigiges komfortabler, als mit Arduino IDE. (oh man diese Schachtelsätze) 🙂

                        syssi 1 Reply Last reply Reply Quote 0
                        • syssi
                          syssi @Marco 3 last edited by

                          @marco-3

                          Piep, Piep login bei Handy -App

                          Das BMS piept pro empfangenem Befehl. Ich würde nicht am piepen festmachen, ob etwas nicht funktioniert. Das Logbuch ist aussagekräftiger. Wenn etwas nicht wie erwartet funktioniert, bitte das Logbuch posten!

                          Kann dies mit dem SU - 123456 login und die damit zur Verfügung stehenden "Buttons" zu tuen haben?

                          Die JK-BMS-App behauptet zwar ein Passwort zu benötigen und zwar jenes, was im BMS hinterlegt ist. Das BMS sendet dieses Passwort aber in der Willkommensnachricht und die App vergleicht den Wert mit deiner Eingabe. Die ESPHome-Implementierung verzichtet auf diese vorgegaukelte Sicherheit. Man kann immer in das BMS schreiben. Auch ohne Passwort.

                          Ist es möglich, die SU Rechte zu entkoppeln, um eine eventuelle Fehlbedienung (Ladeschlussspannugng), BMS Balancer Startspannung BMS off, ) zu vermeiden. Quasie nur kucken, aber nix anfassen.

                          Du kannst alle Entitäten/Zeilen aus der YAML-Datei löschen, welche du nicht willst. Zum Beispiel löschst du den gesamten switch-Block und den number-Block. Dann bleiben nur noch Lese-Operationen (sensor, binary_sensor) übrig.

                          Was kann man alles raus hauen, um diesen ESP performant zu machen, das Web Interface eventuell zu lassen, um gleich zu sehen, ob noch Daten kommen. HomeAssistant ist erst mal nicht gewünscht, da ich iobroker bevorzuge, aber die homeassistant Umgbung nutzen möchte, um den ESP zu flashen, ist um einigiges komfortabler, als mit Arduino IDE. (oh man diese Schachtelsätze)

                          Der Webserver ist das größte Schwergewicht für welches du dich nur entscheiden konntest. Die api-Komponente ist die leichtgewichtigste Implementierung. Danach kommt mqtt. Dann kommt lange lange nichts und dann der Webserver. Trenn dich lieber vom Webserver und prüfe die Werte immer via MQTT.

                          1 Reply Last reply Reply Quote 0
                          • M
                            Marco 3 last edited by Marco 3

                            Der Webserver ist das größte Schwergewicht für welches du dich nur entscheiden konntest. Die api-Komponente ist die leichtgewichtigste Implementierung. Danach kommt mqtt. Dann kommt lange lange nichts und dann der Webserver. Trenn dich lieber vom Webserver und prüfe die Werte immer via MQTT.

                            wird gemacht, Danke noch mal für die immer nett bleibende und ausfühlichen Erklärungen!

                            Eine Frage, noch... wie entscheident ist diese Angabe im .yaml

                            esp32:
                              board: wemos_d1_mini32
                              framework:
                                type: esp-idf
                            

                            dies habe ich auf diese Werte, bei der der manuellen ESP Auswahl geändert.
                            Ich glaube es war so, das habe ich hier gerade nicht vorliegen

                            esp32:
                              board: ESP32dev
                              framework:
                                type: adruino
                            
                            syssi 1 Reply Last reply Reply Quote 0
                            • syssi
                              syssi @Marco 3 last edited by

                              @marco-3 In der Vergangenheit war der Bluetooth-Stack aus dem Arduino-Framework kaputt/instabiler, als wenn man unmittelbar auf ESP-IDF setzt. Konkreter gesprochen: Das JK-BMS sendet 150 Bytes lange Notifications, welche wenn ich mich richtig erinnere so im BLE-Spec nicht vorgesehen sind. Das Arduino-Framework crasht beim Empfang einer solchen Nachricht. Der Kern unten drunter (ESP-IDF) steckt diese große Nachricht einfach weg. Es ist aber möglich, dass es sich um eine Problematik aus der Vergangenheit handelt, da es mittlerweile auch Nutzer gibt die aktiv das Arduino-Framework nutzen. Wenn du mich fragst, dann ist ESP-IDF der puristischere und stabilere Weg.

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                Marco 3 @syssi last edited by Marco 3

                                @syssi
                                Danke, sehr viel herraus genommen.
                                nur bei number meckert es beim komplieren
                                immer wenn ich den

                                number:

                                Bereich lösche.

                                |-- ArduinoJson @ 6.18.5
                                *** [.pioenvs/bms1/src/esphome/components/jk_bms_ble/number/jk_number.o] Source `src/esphome/components/jk_bms_ble/number/jk_number.cpp' not found, needed by target `.pioenvs/bms1/src/esphome/components/jk_bms_ble/number/jk_number.o'.
                                
                                syssi 1 Reply Last reply Reply Quote 0
                                • syssi
                                  syssi @Marco 3 last edited by

                                  Ein Clean-Build wird das Problem lösen:

                                  ~/.local/bin/esphome clean esp32-ble-example.yaml
                                  ~/.local/bin/esphome run esp32-ble-example.yaml
                                  
                                  M 1 Reply Last reply Reply Quote 0
                                  • M
                                    Marco 3 @syssi last edited by Marco 3

                                    @syssi
                                    Danke, hat es!!
                                    Zum Glück gibt es den Klick Button beim Home Assistant.

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      Marco 3 last edited by

                                      Kleine Rückmeldung. ESP liefert seit gestern Abend erfolgreich die Daten des JKBMS.

                                      Und natürlich wieder eine Frage.

                                      Kann man den Update Intervall irgend wo einstellen? Gefühlt kommen aller 2sekunden Daten rein.

                                      syssi 1 Reply Last reply Reply Quote 0
                                      • syssi
                                        syssi @Marco 3 last edited by

                                        Das JK-BMS publiziert seine Messwerte einmal pro Sekunde. Man kann sich daraufhin entscheiden, wieviel man davon verwirft:

                                        jk_bms_ble:
                                          - ble_client_id: client0
                                            protocol_version: ${protocol_version}
                                            throttle: 30s
                                            id: bms0
                                        

                                        Per throttle: 60s wird nun ein Schwung Nachrichten pro Minute decodiert und per MQTT weitergereicht. Sobald alles läuft, solltest du das Log-Level herunterstellen damit der ESP nicht so sehr damit beschaeftigt ist Logs zu schreiben:

                                        logger:
                                          level: INFO
                                        
                                        N M 2 Replies Last reply Reply Quote 0
                                        • N
                                          nettworker @syssi last edited by nettworker

                                          Ich weis ja nicht ob sie es schon wußten 🙂
                                          Man kann das JKBMS mittlerweile mit der openDTU onbattery ( per Draht ) auslesen und es gibt eine openDTU Fusion Platine fertig bestückt die nach Einrichtung fast out of the box läuft.
                                          Software ist OpenSource, Platine liegt je nach gewünschter Ausführung bei ca. 35 -45@. Und NEIN, ich bin weder Entwickler noch verdiene ich was dran. Ich denke der eine oder andere sucht eine einfache funktionierende Lösung ohne selbst Software kompilieren zu müssen oder zu löten. Bei Fragen könnt ihr mich gerne fragen oder direkt auf die Github Seite der Entwickler gehen.
                                          Hab ich jetzt seit 2 Monaten problemlos im Einsatz. Derzeit wird die Software vom Entwickler bei Github noch erweitert um grundlegende Befehle zu senden ( Charge on/off etc. ).

                                          M 1 Reply Last reply Reply Quote 0
                                          • M
                                            Marco 3 @nettworker last edited by

                                            @nettworker
                                            Klingt grundsätzlich interessant. Auch wenn bei meinem System die RS485 mit einem galvanisch getrennten Umwandler die Daten an Victron cerbo gehen.
                                            Möchten ich den Cerbo nicht noch mehr belasten mit MQTT, mit Modbus sendet er schon die Ladekontroller Zustände.... Aber leider vom JK, sieht es spärlich mit Daten für Modbus aus.

                                            Daher nehme ich gern die Daten die vom JK kommen über BT ab. Das Victron System soll seine Arbeit machen.

                                            Aber die Open DTU Fusion Lösung ist auch wieder ein Weg der nach Rom führt.
                                            Danke für die Info.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            960
                                            Online

                                            31.6k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

                                            arduino esphome iobroker jk-bms
                                            11
                                            94
                                            11653
                                            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