4 Leseköpfe in iobroker importieren

Hallo Zusammen,

ich habe 3 TTL-stromleseköpfe +1 IR-Lesekopf diese liefern auch in Tasmota Ihre werte . leider bekomme ich diese nicht nach ioBroker übertragen.

folgender debug für MQTT habe ich bereits erhalten auf der Tasmota Console: 15:11:18.612 MQT: tasmota_stromzaehler/tele/STATE = {„Time“:„2025-12-16T15:11:18“,„Uptime“:„0T00:17:37“,„UptimeSec“:1057,„Heap“:153,„SleepMode“:„Dynamic“,„Sleep“:50,„LoadAvg“:20,„MqttCount“:1,„Berry“:{„HeapUsed“:4,„Objects“:46},„Wifi“:{„AP“:1,„SSId“:„FRITZ!Box 7590_BG-LW“,„BSSId“:„0C:72:74:D4:77:AA“,„Channel“:11,„Mode“:„HT40“,„RSSI“:88,„Signal“:-56,„LinkCount“:1,„Downtime“:„0T00:00:02“}}

15:11:18.622 MQT: tasmota_stromzaehler/tele/SENSOR = {„Time“:„2025-12-16T15:11:18“,„Gesamt“:{„E_in“:2877.7,„E_in_HT“:1208.2,„E_in_NT“:1669.5,„E_out“:1222.7,„Power“:15.00,„Server_ID“:„090149534b0005a2fc25“},„Wohnung“:{„E_in“:1371.4,„E_in_HT“:542.9,„E_in_NT“:828.5,„E_out“:1782.7,„Power“:-49.00,„Server_ID“:„090149534b0005a2fc13“},„OG“:{„E_in“:2052.000,„E_out“:0.000,„power“:0},„DG“:{„E_in“:192.000,„E_out“:0.000,„power“:0}}

15:11:18.952 MQT: tasmota_stromzaehler/tele/SENSOR = {„Time“:„2025-12-16T15:11:18“,„Wohnung“:{„Power“:-45.00}}

15:11:22.609 MQT: tasmota_stromzaehler/tele/SENSOR = {„Time“:„2025-12-16T15:11:22“,„Gesamt“:{„Power“:15.00}}

15:11:22.951 MQT: tasmota_stromzaehler/tele/SENSOR = {„Time“:„2025-12-16T15:11:22“,„Wohnung“:{„Power“:-46.00}}

15:11:26.434 MQT: tasmota_stromzaehler/tele/SENSOR = {„Time“:„2025-12-16T15:11:26“,„Gesamt“:{„Power“:15.00}}

15:11:26.953 MQT: tasmota_stromzaehler/tele/SENSOR = {„Time“:„2025-12-16T15:11:26“,„Wohnung“:{„Power“:-46.00}}

15:11:30.439 MQT: tasmota_stromzaehler/tele/SENSOR = {„Time“:„2025-12-16T15:11:30“,„Gesamt“:{„Power“:17.00}}

15:11:30.954 MQT: tasmota_stromzaehler/tele/SENSOR = {„Time“:„2025-12-16T15:11:30“,„Wohnung“:{„Power“:-46.00}}

15:11:34.438 MQT: tasmota_stromzaehler/tele/SENSOR = {„Time“:„2025-12-16T15:11:34“,„Gesamt“:{„Power“:15.00}}

15:11:34.953 MQT: tasmota_stromzaehler/tele/SENSOR = {„Time“:„2025-12-16T15:11:34“,„Wohnung“:{„Power“:-46.00}}

dieser kommt in regelmäßigen Abstand.

Beim ioBroker erhalte ich dann folgende Übersicht:

Bei tele –> Sensor ändert sich immer wieder der Wert aber ich bekomme nur die Power werte angezeigt.

bin relativ neu in dem Thema , wer kann mir weiter helfen.

Grüße

Bernd

bin jetzt der Thematik etwas näher gekommen. im Script vom Tasmota muss für die einzelnen stromLeser die Bezeichnung von den Tarifen unterschiedlich sein z. B.E_in HT für den ersten Lesekopf, E_in_HT2 für den zweiten und eventuell dann für den dritten E_in HT3, dann bekomme ich über ein script für jeden Lesekopf die entsprechenden werte aufgeführt.

anbei einmal das Skript für den IOBroker:

        // Replace this with your actual MQTT state path

const SENSOR_STATE1 = „mqtt.0.tasmota_stromzaehler.tele.SENSOR“;

// Function to create or update states dynamically

function createOrUpdateState(path, value) {

if (!existsState(path)) {

createState(path, value, { name: path.split(".").pop() });

log(\`Created state: ${path}\`, "info");

} else {

setState(path, value, true);

}

}

// Watch for updates

on({ id: SENSOR_STATE1, change: „any“ }, (obj) => {

try {

const data = JSON.parse(obj.state.val);

for (const key in data) {

if (key === „Time“ || key === „timestamp“) continue; // Skip time fields

const section = data[key];

if (typeof section === „object“) {

for (const field in section) {

const value = section[field];

const statePath = `0_userdata.0.Tasmota.${field}`;

      createOrUpdateState(statePath, value);

    }

  } else {

const statePath = `0_userdata.0.Tasmota.${key}`;

    createOrUpdateState(statePath, data\[key\]);

  }

}

} catch (e) {

log("JSON parse error: " + e, "warn");

}

});

Grüße

Bernd