Ich habe mir ein ESP32 gekauft und geflasht... Alles gut soweit -- Brauche Hilfe bei der umsetztung um die ESP32 Daten die per MQTT an meinem Rasperry ankommen in Influx zu speichern...
Komme leide nicht wirklich weiter damit.
Ich würde mich freuen wenn mir einer bei meiner umsetztung Helfen kann....
Code
Der Sketch verwendet 1435486 Bytes (73%) des Programmspeicherplatzes. Das Maximum sind 1966080 Bytes.
Globale Variablen verwenden 55648 Bytes (16%) des dynamischen Speichers, 272032 Bytes für lokale Variablen verbleiben. Das Maximum sind 327680 Bytes.
esptool.py v3.0-dev
Serial port COM13
Connecting........_____....._____.....___
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c8:f0:9e:50:62:58
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 1394.4 kbit/s)...
Hash of data verified.
Compressed 18656 bytes to 12053...
Writing at 0x00001000... (100 %)
Wrote 18656 bytes (12053 compressed) at 0x00001000 in 0.2 seconds (effective 811.1 kbit/s)...
Hash of data verified.
Compressed 1435600 bytes to 863164...
Writing at 0x00010000... (1 %)
Writing at 0x00014000... (3 %)
Writing at 0x00018000... (5 %)
Writing at 0x0001c000... (7 %)
Writing at 0x00020000... (9 %)
Writing at 0x00024000... (11 %)
Writing at 0x00028000... (13 %)
Writing at 0x0002c000... (15 %)
Writing at 0x00030000... (16 %)
Writing at 0x00034000... (18 %)
Writing at 0x00038000... (20 %)
Writing at 0x0003c000... (22 %)
Writing at 0x00040000... (24 %)
Writing at 0x00044000... (26 %)
Writing at 0x00048000... (28 %)
Writing at 0x0004c000... (30 %)
Writing at 0x00050000... (32 %)
Writing at 0x00054000... (33 %)
Writing at 0x00058000... (35 %)
Writing at 0x0005c000... (37 %)
Writing at 0x00060000... (39 %)
Writing at 0x00064000... (41 %)
Writing at 0x00068000... (43 %)
Writing at 0x0006c000... (45 %)
Writing at 0x00070000... (47 %)
Writing at 0x00074000... (49 %)
Writing at 0x00078000... (50 %)
Writing at 0x0007c000... (52 %)
Writing at 0x00080000... (54 %)
Writing at 0x00084000... (56 %)
Writing at 0x00088000... (58 %)
Writing at 0x0008c000... (60 %)
Writing at 0x00090000... (62 %)
Writing at 0x00094000... (64 %)
Writing at 0x00098000... (66 %)
Writing at 0x0009c000... (67 %)
Writing at 0x000a0000... (69 %)
Writing at 0x000a4000... (71 %)
Writing at 0x000a8000... (73 %)
Writing at 0x000ac000... (75 %)
Writing at 0x000b0000... (77 %)
Writing at 0x000b4000... (79 %)
Writing at 0x000b8000... (81 %)
Writing at 0x000bc000... (83 %)
Writing at 0x000c0000... (84 %)
Writing at 0x000c4000... (86 %)
Writing at 0x000c8000... (88 %)
Writing at 0x000cc000... (90 %)
Writing at 0x000d0000... (92 %)
Writing at 0x000d4000... (94 %)
Writing at 0x000d8000... (96 %)
Writing at 0x000dc000... (98 %)
Writing at 0x000e0000... (100 %)
Wrote 1435600 bytes (863164 compressed) at 0x00010000 in 15.2 seconds (effective 757.8 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 129...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (129 compressed) at 0x00008000 in 0.1 seconds (effective 396.4 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin..
Alles anzeigen
in der conf vom EPS habe ich das so eingetragen :
C
#include "BLEDevice.h"
#include <WiFi.h>
#include <PubSubClient.h>
#include <ESPmDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include "driver Link entfernt "
#include "driver Link entfernt "
#define SW_Version "3.6"
bool debug_flg = true;
bool debug_flg_full_log = false;
//########### Settings beginnen #########
//OTA Setting
#define OTA_Hostname "JKBMS" // -> hier ändern wenn OTA Name anders sein soll
#define OTA_Passwort "" // -> hier ändern wenn OTA Passwort anders sein soll
// MQTT Setting
const char* mqtt_server = "192.168.0.69"; // -> hier die IP des MQTT Server eingeben
const int mqtt_port = 1883; // -> hier den Port einstellen für den MQTT Server
const char* mqtt_username = ""; // -> hier MQTT Benutzername eintragen
const char* mqtt_passwort = ""; // -> hier MQTT Passwort eingeben
String mqttname = "BMS_16P"; // -> hier wird der MQTT Gerätename festgelegt
const int mqttpublishtime_offset = 10000; //-> hier einstellen wie oft Danten gesnedet werden sollen 1000 = jede Sekunde
Alles anzeigen
Im RaspberryPI bekomme ich bei
Diese Ausgabe:
Code
BMS_Watchdog/status offline
BMS_16P/status offline
BMS_16P/Data/Zelle_01 3.294
BMS_16P/Data/Zelle_02 3.297
BMS_16P/Data/Zelle_03 3.297
BMS_16P/Data/Zelle_04 3.299
BMS_16P/Data/Zelle_05 3.297
BMS_16P/Data/Zelle_06 3.295
BMS_16P/Data/Zelle_07 3.295
BMS_16P/Data/Zelle_08 3.298
BMS_16P/Data/Zelle_09 3.294
BMS_16P/Data/Zelle_10 3.297
BMS_16P/Data/Zelle_11 3.295
BMS_16P/Data/Zelle_12 3.297
BMS_16P/Data/Zelle_13 3.298
BMS_16P/Data/Zelle_14 3.299
BMS_16P/Data/Zelle_15 3.297
BMS_16P/Data/Zelle_16 3.294
BMS_16P/Data/Battery_Voltage 52.747
BMS_16P/Data/Delta_Cell_Voltage 0.008
BMS_16P/Data/MOS_Temp 21.600
BMS_16P/Data/Battery_T1 22.100
BMS_16P/Data/Battery_T2 22.200
BMS_16P/Data/Battery_Power 692.246
BMS_16P/Data/Charge_Current -13.317
BMS_16P/Data/Percent_Remain 83
BMS_16P/Data/Cycle_Count 30
BMS_16P/Data/Balance_Current 0.000
BMS_16P/Uptime/Sekunde 46
BMS_16P/Uptime/Minuten 50
BMS_16P/Uptime/Stunden 17
BMS_16P/Uptime/Tage 152
BMS_16P/Data/Charge on
BMS_16P/Data/Discharge on
BMS_16P/BLEconnection connected
BMS_16P/status online
Alles anzeigen
Soweit so gut ..
Jetzt möchte ich diese daten gerne in InfluxDB schreiben...,
Was muss ich machen damit ich die Daten vom ESP32 in Influx schreiben kann?
MFG