Hallo Bernd, lange her
aber ich wollte das jetzt mit einem Plug-S umsetzen nur die Berechnung stimmt nicht
Hier ein List von meinem FHEM MQTT2 Internals:
CFGFN
CID shellyplug_s_B86B05
DEF shellyplug_s_B86B05
DEVICETOPIC Softub
FUUID 5f3a6d23-f33f-ee2d-6a32-ecea64d8a5af6272
IODev myBrokerHaus
LASTInputDev myBrokerHaus
MSGCNT 2812
NAME Softub
NR 749057
STATE on
TYPE MQTT2_DEVICE
myBrokerHaus_MSGCNT 2812
myBrokerHaus_TIME 2020-08-17 18:40:00
OLDREADINGS:
READINGS:
2020-08-17 13:44:22 actions_stats_skipped 0
2020-08-17 13:44:22 attrTemplateVersion 20200522 or prior
2020-08-17 13:44:22 cfg_changed_cnt 0
2020-08-17 13:44:22 cloud_connected false
2020-08-17 13:44:22 cloud_enabled false
2020-08-17 13:44:22 fs_free 164656
2020-08-17 13:44:22 fs_size 233681
2020-08-17 16:07:58 fw_ver 20200812-091824/v1.8.0@8acf41b0
2020-08-17 13:44:22 has_update false
2020-08-17 16:07:58 id shellyplug-s-B86B05
2020-08-17 16:07:58 ip 10.0.0.123
2020-08-17 16:07:58 mac 98F4ABB86B05
2020-08-17 13:44:22 meters_1_counters_1 0.000
2020-08-17 13:44:22 meters_1_counters_2 0.000
2020-08-17 13:44:22 meters_1_counters_3 0.000
2020-08-17 13:44:22 meters_1_is_valid true
2020-08-17 13:44:22 meters_1_overpower 0.00
2020-08-17 13:44:22 meters_1_power 0.00
2020-08-17 13:44:22 meters_1_timestamp 1597671862
2020-08-17 13:44:22 meters_1_total 0
2020-08-17 16:07:58 model SHPLG-S
2020-08-17 13:44:22 mqtt_connected true
2020-08-17 16:07:58 new_fw false
2020-08-17 16:07:58 online true
2020-08-17 18:39:36 overtemperature 0
2020-08-17 13:44:22 ram_free 39472
2020-08-17 13:44:22 ram_total 51080
2020-08-17 18:39:36 relay0 on
2020-08-17 18:40:00 relay_0_energy 128367
2020-08-17 18:40:00 relay_0_energy_kWh 1.80186666666667
2020-08-17 18:39:36 relay_0_power 829.07
2020-08-17 13:44:22 relays_1_has_timer false
2020-08-17 13:44:22 relays_1_ison false
2020-08-17 13:44:22 relays_1_overpower false
2020-08-17 13:44:22 relays_1_source input
2020-08-17 13:44:22 relays_1_timer_duration 0
2020-08-17 13:44:22 relays_1_timer_remaining 0
2020-08-17 13:44:22 relays_1_timer_started 0
2020-08-17 13:44:22 serial 2
2020-08-17 18:39:36 state on
2020-08-17 18:39:36 temperature 44.13
2020-08-17 18:39:36 temperature_f 111.43
2020-08-17 13:44:22 time 13:44
2020-08-17 13:44:22 tmp_is_valid true
2020-08-17 13:44:22 tmp_tC 33.19
2020-08-17 13:44:22 tmp_tF 91.74
2020-08-17 13:44:22 unixtime 1597671862
2020-08-17 13:44:22 update_has_update false
2020-08-17 13:44:22 update_new_version 20200812-091824/v1.8.0@8acf41b0
2020-08-17 13:44:22 update_old_version 20200812-091824/v1.8.0@8acf41b0
2020-08-17 13:44:22 update_status idle
2020-08-17 13:44:22 uptime 37
2020-08-17 13:44:22 wifi_sta_connected true
2020-08-17 13:44:22 wifi_sta_ip 10.0.0.123
2020-08-17 13:44:22 wifi_sta_rssi -86
2020-08-17 13:44:22 wifi_sta_ssid Dahoam
Attributes:
IODev myBrokerHaus
devStateIcon {my $onl = ReadingsVal($name,"online","false") eq "false" ? "rot" : ReadingsVal($name,"new_fw","false") eq "true" ? "gelb" : "gruen";; my $light = ReadingsVal($name,"state","off");; my $show = '<a href="';;$show .= $onl eq "gelb" ? "/fhem?cmd.dummy=set $name x_update&XHR=1\">" : "http://".ReadingsVal($name,"ip","none").' "target="_blank">';;$show .= FW_makeImage("10px-kreis-".$onl)."</a>";; "<div> $show <a href=\"/fhem?cmd.dummy=set $name toggle&XHR=1\">".FW_makeImage($light)."</a></div>" }
genericDeviceType switch
getList power:noArg shellies/shellyplug-s-B86B05/relay/power power
model shellyplug
readingList shellies/shellyplug-s-B86B05/relay/0:.* state
shellies/shellyplug-s-B86B05/relay/0:.* relay0
shellies/shellyplug-s-B86B05/input/0:.* input0
shellies/shellyplug-s-B86B05/online:.* online
shellies/shellyplug-s-B86B05/announce:.* { json2nameValue($EVENT) }
shellies/announce:.* { $EVENT =~ m,..id...shellyplug-s-B86B05...mac.*, ? json2nameValue($EVENT) : return }
shellyplug_s_B86B05:shellies/shellyplug-s-B86B05/info:.* { json2nameValue($EVENT) }
shellyplug_s_B86B05:shellies/shellyplug-s-B86B05/relay/0/power:.* relay_0_power
shellyplug_s_B86B05:shellies/shellyplug-s-B86B05/relay/0/energy:.* relay_0_energy
shellyplug_s_B86B05:shellies/shellyplug-s-B86B05/temperature:.* temperature
shellyplug_s_B86B05:shellies/shellyplug-s-B86B05/temperature_f:.* temperature_f
shellyplug_s_B86B05:shellies/shellyplug-s-B86B05/overtemperature:.* overtemperature
room MQTT2_DEVICE,Terrasse
setList off:noArg shellies/shellyplug-s-B86B05/relay/0/command off
on:noArg shellies/shellyplug-s-B86B05/relay/0/command on
x_update:noArg shellies/shellyplug-s-B86B05/command update_fw
x_mqttcom shellies/shellyplug-s-B86B05/command $EVTPART1
userReadings relay_0_energy_kWh monotonic { ReadingsVal("Softub","relay_0_energy",0)/60/1000.0},
Alles anzeigen
Hab ich da von deinem Screenshot irgendetwas von deinem userReadings falsch übernommen - ich sehe nix
Wenn ich die 128367/60und/1000 teile komme ich auf 2,13 und nicht auf 1,8018.....
Bin mir sicher das Problem sitzt vor dem Bildschirm, aber ich find den Fehler nicht
Kannst du mir unter die Arme greifen - Danke
Helmut