fhempy: rct_power (RCT-Power)

Begonnen von dominik, 10 Februar 2022, 20:20:12

Vorheriges Thema - Nächstes Thema

MarkusAutomaticus

So, jetzt habe ich kurzerhand mein Ubuntu auf 20.04 aktualisiert.
unter /opt/fhem/log habe ich nun auch ein fhempy*.log gefunden:

2023-07-25 20:07:30,505 - ERROR    - __main__: Failed to load fhempy
Traceback (most recent call last):
  File "FHEM/bindings/python/bin/fhempy", line 139, in <module>
    import fhempy.lib.fhem_pythonbinding as fpb
ModuleNotFoundError: No module named 'fhempy'
2023-07-25 20:07:30,505 - INFO     - __main__: Attempting install of fhempy>=0.1.462
2023-07-25 20:08:09,233 - INFO     - __main__: Successfully installed fhempy>=0.1.462
2023-07-25 20:08:09,234 - ERROR    - __main__: Failed to import fhempy, exit now...
2023-07-25 20:09:10,345 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.660...
2023-07-25 20:09:10,346 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-07-25 20:09:10,373 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-07-25 20:17:32,661 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.660...
2023-07-25 20:17:32,662 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-07-25 20:17:32,723 - INFO     - websockets.server: server listening on 0.0.0.0:15733

Vielleicht wird da jemand schlau draus?
FHEM 5.8 |intel NUC Core i3: Ubuntu 22.04 | z-Wave: Aeon Labs USB Stick | Jeelink (v3c): LaCrosse-Sensoren | DuoFern Stick: Rademacher Gurtwickler | Philips Hue Bridge | CUNX: HomeMatic, EnOcean-Pigator

Docter

Zitat von: Docter am 28 Mai 2023, 14:54:17
Zitat von: Docter am 25 Mai 2023, 11:15:44habe es probiert...

Kann den Wert setzen (0,07), aber das Target bleibt unverändert... (0,07) man kann dann aber (in der App) kein neues Target größer als 0.07 setzen.
Es wäre damit echt schön, den Wert "battery.soc_target" setzen zu können...

Danke
Thomas

Wäre es bitte möglich, den Befehl aufzunehmen, um das SOC Target zu setzen?

Danke
Thomas

Wäre das möglich wäre, wäre ich echt dankbar.
Gruß
Thomas

is2late

@Thomas: Habs zwar nicht probiert, aber...Geht das nicht über batt_soc_max bzw batt_soc_min?

Hab auch eine Frage:

power_solarA bzw B

tauchen bei mir nicht in den Readings auf , obwohl im device_readings_json vorhanden. Dementsprechend bleibt SCALAR bei 0.

Hat jemand eine Idee, womit das zusammenhängen könnte?

[code]define RCT fhempy rct_power 192.168.178.xxx
attr RCT alias RCT Wechselrichter
attr RCT comment RCT Power Wechselrichter
attr RCT device_readings_json {\\
  "energy.e_grid_load_month":{\\
    "reading":"energy_month_household_external",\\
    "factor":1\\
  },\\
  "energy.e_grid_load_day":{\\
    "reading":"energy_day_household_external",\\
    "factor":1\\
  },\\
  "energy.e_ac_total":{\\
    "reading":"energy_total",\\
    "factor":1\\
  },\\
  "energy.e_grid_feed_total":{\\
    "reading":"energy_total_grid_feed_in",\\
    "factor":1\\
  },\\
  "battery.used_energy":{\\
    "reading":"battery_used_energy",\\
    "factor":1\\
  },\\
  "battery.soc":{\\
    "reading":"battery_soc",\\
    "factor":100\\
  },\\
  "energy.e_grid_feed_day":{\\
    "reading":"energy_day_grid_feed_in",\\
    "factor":1\\
  },\\
  "energy.e_ac_day":{\\
    "reading":"energy_day",\\
    "factor":1\\
  },\\
  "energy.e_load_day":{\\
    "reading":"energy_day_household",\\
    "factor":1\\
  },\\
  "energy.e_load_month":{\\
    "reading":"energy_month_household",\\
    "factor":1\\
  },\\
  "dc_conv.dc_conv_struct[0].p_dc_lp":{\\
    "reading":"power_solarA",\\
    "factor":1\\
  },\\
  "dc_conv.dc_conv_struct[1].p_dc_lp":{\\
    "reading":"power_solarB",\\
    "factor":1\\
  },\\
  "g_sync.p_acc_lp":{\\
    "reading":"power_battery",\\
    "factor":1\\
  },\\
  "g_sync.p_ac_grid_sum_lp":{\\
    "reading":"power_grid_total",\\
    "factor":1\\
  },\\
  "g_sync.p_ac_sum_lp":{\\
    "reading":"power_household_total",\\
    "factor":1\\
  },\\
  "g_sync.p_ac_load_sum_lp":{\\
    "reading":"power_household_external",\\
    "factor":1\\
  },\\
  "battery.charged_amp_hours":{\\
    "reading":"Laufende_Batterieladung",\\
    "factor":1\\
  },\\
  "power_mng.soc_charge":{\\
   "reading":"SOC_min_maintenance_charge",\\
   "factor":1\
  },\\
  "battery.status":{\\
    "reading":"battery_status",\\
    "factor":1\\
  },\\
  "battery.status2":{\\
    "reading":"battery_status_extra",\\
    "factor":1\\
  },\\
  "power_mng.bat_calib_days_in_advance":{\\
   "reading":"BattTageVorKalib",\\
   "factor":1\\
  },\\
  "power_mng.bat_next_calib_date":{\\
   "reading":"BattnextKalib"\
   "factor":1\
  }\\
}
attr RCT group rct_power
attr RCT room Photovoltaik,Geräte,fhempy
attr RCT stateFormat {\\
"PV-Leistung: ".int(ReadingsVal($name, "power_solarA", "0")+ReadingsVal($name, "power_solarB", "0"))." W\\
(NO: ".int(ReadingsVal($name, "power_solarA", "0"))." W / \\
SW: ".int(ReadingsVal($name, "power_solarB", "0"))." W)"\
}
attr RCT userReadings BatterieLadezustand { ReadingsVal("RCT","battery.soc",0) },BatterieTemperatur { ReadingsVal("RCT","battery.temperature",0) },WechselrichterTemperatur { ReadingsVal("RCT","db.temp1",0) },Batterie_Ent_Ladung { ReadingsVal("RCT","g_sync.p_acc_lp",0) },EinspeisungInsHaus { ReadingsVal("RCT","g_sync.p_ac_sum_lp",0) },InsNetzAktuell { ReadingsVal("RCT","g_sync.p_ac_grid_sum_lp",0) },InsNetzTag { ReadingsVal("RCT","energy.e_grid_feed_day",0) },Tagesverbrauch { ReadingsVal("RCT","energy.e_load_day",0) },TagesverbrauchInklAkku { ReadingsVal("RCT","energy.e_ac_day",0) },AusNetzTag { ReadingsVal("RCT","energy.e_grid_load_day",0) },BattTageVorKalib { ReadingsVal("RCT","power_mng.bat_calib_days_in_advance",0) },BattnextKalib { ReadingsVal("RCT","power_mng.bat_next_calib_date",0) },power_solarCombined:power_solar(A|B).* { \\
(ReadingsVal($name, "power_solarA", "0")\\
+ReadingsVal($name, "power_solarB", "0")) }\
\

attr RCT verbose 1
#   DEF        rct_power 192.168.178.127
#   FHEMPYTYPE rct_power
#   FUUID      64ad9a3d-f33f-8a5f-3ae5-c44f46a3b81af060
#   IODev      fhempy_local
#   NAME       RCT
#   NR         516
#   PYTHONTYPE rct_power
#   STATE      SCALAR(0x97178a0)0 W
#(NO: 0 W /
#SW: 0 W)
#   TYPE       fhempy
#   eventCount 217
#   READINGS:
#     2023-08-27 17:33:11   AusNetzTag      37.83
#     2023-08-27 17:33:11   BattTageVorKalib 0
#     2023-08-27 17:33:11   BatterieLadezustand 1.00
#     2023-08-27 17:33:11   BatterieTemperatur 27.06
#     2023-08-27 17:33:11   Batterie_Ent_Ladung 4.70
#     2023-08-27 17:33:11   BattnextKalib   0
#     2023-08-27 17:33:11   EinspeisungInsHaus 2637.47
#     2023-08-27 17:33:11   InsNetzAktuell  -2071.89
#     2023-08-27 17:33:11   InsNetzTag      -4059.15
#     2023-08-27 17:33:11   Tagesverbrauch  15577.00
#     2023-08-27 17:33:11   TagesverbrauchInklAkku 19590.61
#     2023-08-27 17:33:11   WechselrichterTemperatur 33.40
#     2023-08-27 01:12:58   battery.cycles  49
#     2023-08-27 11:15:23   battery.efficiency 0.94
#     2023-08-27 15:31:24   battery.soc     1.00
#     2023-08-26 13:36:32   battery.soc_target 1.00
#     2023-07-16 16:07:04   battery.soh     1.00
#     2023-08-27 17:32:15   battery.temperature 27.06
#     2023-08-27 17:33:11   db.temp1        33.40
#     2023-08-27 17:33:11   energy.e_ac_day 19590.61
#     2023-08-27 17:33:11   energy.e_grid_feed_day -4059.15
#     2023-08-27 16:32:24   energy.e_grid_load_day 37.83
#     2023-08-27 17:33:11   energy.e_load_day 15577.00
#     2023-08-27 16:47:00   error           
#     2023-08-27 17:33:11   g_sync.p_ac_grid_sum_lp -2071.89
#     2023-08-27 17:33:11   g_sync.p_ac_sum_lp 2637.47
#     2023-08-27 17:33:11   g_sync.p_acc_lp 4.70
#     2023-07-16 16:07:04   inverter_sn     0065B4821490
#     2023-07-16 16:07:04   power_mng.soc_max 0.97
#     2023-07-16 16:07:04   power_mng.soc_min 0.07
#     2023-08-27 16:53:03   state           connected
#   args:
#     RCT
#     fhempy
#     rct_power
#     192.168.178.127
#   argsh:
#   hmccu:
#
setstate RCT SCALAR(0x97178a0)0 W\
(NO: 0 W / \
SW: 0 W)
setstate RCT 2023-08-27 17:33:11 AusNetzTag 37.83
setstate RCT 2023-08-27 17:33:11 BattTageVorKalib 0
setstate RCT 2023-08-27 17:33:11 BatterieLadezustand 1.00
setstate RCT 2023-08-27 17:33:11 BatterieTemperatur 27.06
setstate RCT 2023-08-27 17:33:11 Batterie_Ent_Ladung 4.70
setstate RCT 2023-08-27 17:33:11 BattnextKalib 0
setstate RCT 2023-08-27 17:33:11 EinspeisungInsHaus 2637.47
setstate RCT 2023-08-27 17:33:11 InsNetzAktuell -2071.89
setstate RCT 2023-08-27 17:33:11 InsNetzTag -4059.15
setstate RCT 2023-08-27 17:33:11 Tagesverbrauch 15577.00
setstate RCT 2023-08-27 17:33:11 TagesverbrauchInklAkku 19590.61
setstate RCT 2023-08-27 17:33:11 WechselrichterTemperatur 33.40
setstate RCT 2023-08-27 01:12:58 battery.cycles 49
setstate RCT 2023-08-27 11:15:23 battery.efficiency 0.94
setstate RCT 2023-08-27 15:31:24 battery.soc 1.00
setstate RCT 2023-08-26 13:36:32 battery.soc_target 1.00
setstate RCT 2023-07-16 16:07:04 battery.soh 1.00
setstate RCT 2023-08-27 17:32:15 battery.temperature 27.06
setstate RCT 2023-08-27 17:33:11 db.temp1 33.40
setstate RCT 2023-08-27 17:33:11 energy.e_ac_day 19590.61
setstate RCT 2023-08-27 17:33:11 energy.e_grid_feed_day -4059.15
setstate RCT 2023-08-27 16:32:24 energy.e_grid_load_day 37.83
setstate RCT 2023-08-27 17:33:11 energy.e_load_day 15577.00
setstate RCT 2023-08-27 16:47:00 error
setstate RCT 2023-08-27 17:33:11 g_sync.p_ac_grid_sum_lp -2071.89
setstate RCT 2023-08-27 17:33:11 g_sync.p_ac_sum_lp 2637.47
setstate RCT 2023-08-27 17:33:11 g_sync.p_acc_lp 4.70
setstate RCT 2023-07-16 16:07:04 inverter_sn 0065B4821490
setstate RCT 2023-07-16 16:07:04 power_mng.soc_max 0.97
setstate RCT 2023-07-16 16:07:04 power_mng.soc_min 0.07
setstate RCT 2023-08-27 16:53:03 state connected

[/code]
Pi4, Tahoma Jalousien, Hue, Echo, Sonos, Lupusec XT3, FritzBox

loescher

Tauchen denn überhaupt Readings auf?
Bist du dir mit den "\\" sicher?
Ich hab da immer nur ein "\".

Mach doch mal bitte ein "Copy for forum.fhem.de" deines RCT und stell es hier in codetags rein.

LG,
Stephan.

is2late

Hi Stephan,

danke für Deine Antwort!
Oben ist schon das "Copy for forum". Die doppelten \  finden sich nur in der Kopie, nicht im device_readings_json. Als Beleg ein Auszug als Screenshot.
Komisch......

Hier noch einmal die aktuelle Copy:

[code]define RCT fhempy rct_power 192.168.178.127
attr RCT alias RCT Wechselrichter
attr RCT comment RCT Power Wechselrichter
attr RCT device_readings_json {\\
  "energy.e_grid_load_month":{\\
    "reading":"energy_month_household_external",\\
    "factor":1\\
  },\\
  "energy.e_grid_load_day":{\\
    "reading":"energy_day_household_external",\\
    "factor":1\\
  },\\
  "energy.e_ac_total":{\\
    "reading":"energy_total",\\
    "factor":1\\
  },\\
  "energy.e_grid_feed_total":{\\
    "reading":"energy_total_grid_feed_in",\\
    "factor":1\\
  },\\
  "battery.used_energy":{\\
    "reading":"battery_used_energy",\\
    "factor":1\\
  },\\
  "battery.soc":{\\
    "reading":"battery_soc",\\
    "factor":100\\
  },\\
  "energy.e_grid_feed_day":{\\
    "reading":"energy_day_grid_feed_in",\\
    "factor":1\\
  },\\
  "energy.e_ac_day":{\\
    "reading":"energy_day",\\
    "factor":1\\
  },\\
  "energy.e_load_day":{\\
    "reading":"energy_day_household",\\
    "factor":1\\
  },\\
  "energy.e_load_month":{\\
    "reading":"energy_month_household",\\
    "factor":1\\
  },\\
  "dc_conv.dc_conv_struct[0].p_dc_lp":{\\
    "reading":"power_solarA",\\
    "factor":1\\
  },\\
  "dc_conv.dc_conv_struct[1].p_dc_lp":{\\
    "reading":"power_solarB",\\
    "factor":1\\
  },\\
  "g_sync.p_acc_lp":{\\
    "reading":"power_battery",\\
    "factor":1\\
  },\\
  "g_sync.p_ac_grid_sum_lp":{\\
    "reading":"power_grid_total",\\
    "factor":1\\
  },\\
  "g_sync.p_ac_sum_lp":{\\
    "reading":"power_household_total",\\
    "factor":1\\
  },\\
  "g_sync.p_ac_load_sum_lp":{\\
    "reading":"power_household_external",\\
    "factor":1\\
  },\\
  "battery.charged_amp_hours":{\\
    "reading":"Laufende_Batterieladung",\\
    "factor":1\\
  },\\
  "power_mng.soc_charge":{\\
   "reading":"SOC_min_maintenance_charge",\\
   "factor":1\
  },\\
  "battery.status":{\\
    "reading":"battery_status",\\
    "factor":1\\
  },\\
  "battery.status2":{\\
    "reading":"battery_status_extra",\\
    "factor":1\\
  },\\
  "power_mng.bat_calib_days_in_advance":{\\
   "reading":"BattTageVorKalib",\\
   "factor":1\\
  },\\
  "power_mng.bat_next_calib_date":{\\
   "reading":"BattnextKalib"\
   "factor":1\
  }\\
}
attr RCT group rct_power
attr RCT room Photovoltaik,Geräte,fhempy
attr RCT stateFormat {\\
"PV-Leistung: ".int(ReadingsVal($name, "power_solarA", "0")+ReadingsVal($name, "power_solarB", "0"))." W\\
(NO: ".int(ReadingsVal($name, "power_solarA", "0"))." W / \\
SW: ".int(ReadingsVal($name, "power_solarB", "0"))." W)"\
}
attr RCT userReadings BatterieLadezustand { ReadingsVal("RCT","battery.soc",0) },BatterieTemperatur { ReadingsVal("RCT","battery.temperature",0) },WechselrichterTemperatur { ReadingsVal("RCT","db.temp1",0) },Batterie_Ent_Ladung { ReadingsVal("RCT","g_sync.p_acc_lp",0) },EinspeisungInsHaus { ReadingsVal("RCT","g_sync.p_ac_sum_lp",0) },InsNetzAktuell { ReadingsVal("RCT","g_sync.p_ac_grid_sum_lp",0) },InsNetzTag { ReadingsVal("RCT","energy.e_grid_feed_day",0) },Tagesverbrauch { ReadingsVal("RCT","energy.e_load_day",0) },TagesverbrauchInklAkku { ReadingsVal("RCT","energy.e_ac_day",0) },AusNetzTag { ReadingsVal("RCT","energy.e_grid_load_day",0) },BattTageVorKalib { ReadingsVal("RCT","power_mng.bat_calib_days_in_advance",0) },BattnextKalib { ReadingsVal("RCT","power_mng.bat_next_calib_date",0) },power_solarCombined:power_solar(A|B).* { \\
(ReadingsVal($name, "power_solarA", "0")\\
+ReadingsVal($name, "power_solarB", "0")) }\
\

attr RCT verbose 1
#   DEF        rct_power 192.168.178.127
#   FHEMPYTYPE rct_power
#   FUUID      64ad9a3d-f33f-8a5f-3ae5-c44f46a3b81af060
#   IODev      fhempy_local
#   NAME       RCT
#   NR         516
#   PYTHONTYPE rct_power
#   STATE      SCALAR(0x72cdf68)0 W
#(NO: 0 W /
#SW: 0 W)
#   TYPE       fhempy
#   eventCount 125
#   READINGS:
#     2023-08-28 18:25:44   AusNetzTag      921.55
#     2023-08-28 18:25:44   BattTageVorKalib 0
#     2023-08-28 18:25:44   BatterieLadezustand 0.97
#     2023-08-28 18:25:44   BatterieTemperatur 26.06
#     2023-08-28 18:25:44   Batterie_Ent_Ladung 4.47
#     2023-08-28 18:25:44   BattnextKalib   0
#     2023-08-28 18:25:44   EinspeisungInsHaus 1304.61
#     2023-08-28 18:25:44   InsNetzAktuell  -580.60
#     2023-08-28 18:25:44   InsNetzTag      -17093.65
#     2023-08-28 18:25:44   Tagesverbrauch  13981.00
#     2023-08-28 18:25:44   TagesverbrauchInklAkku 30153.88
#     2023-08-28 18:25:44   WechselrichterTemperatur 33.37
#     2023-08-28 02:43:18   battery.cycles  50
#     2023-08-28 10:41:02   battery.efficiency 0.94
#     2023-08-28 18:03:50   battery.soc     0.97
#     2023-08-27 18:20:50   battery.soc_target 0.97
#     2023-07-16 16:07:04   battery.soh     1.00
#     2023-08-28 18:25:32   battery.temperature 26.06
#     2023-08-28 18:25:44   db.temp1        33.37
#     2023-08-28 18:25:44   energy.e_ac_day 30153.88
#     2023-08-28 18:25:44   energy.e_grid_feed_day -17093.65
#     2023-08-28 18:07:45   energy.e_grid_load_day 921.55
#     2023-08-28 18:25:44   energy.e_load_day 13981.00
#     2023-08-28 18:23:21   error           
#     2023-08-28 18:25:44   g_sync.p_ac_grid_sum_lp -580.60
#     2023-08-28 18:25:44   g_sync.p_ac_sum_lp 1304.61
#     2023-08-28 18:25:44   g_sync.p_acc_lp 4.47
#     2023-07-16 16:07:04   inverter_sn     0065B4821490
#     2023-07-16 16:07:04   power_mng.soc_max 0.97
#     2023-07-16 16:07:04   power_mng.soc_min 0.07
#     2023-08-28 18:02:20   state           connected
#   args:
#     RCT
#     fhempy
#     rct_power
#     192.168.178.127
#   argsh:
#
setstate RCT SCALAR(0x72cdf68)0 W\
(NO: 0 W / \
SW: 0 W)
setstate RCT 2023-08-28 18:25:44 AusNetzTag 921.55
setstate RCT 2023-08-28 18:25:44 BattTageVorKalib 0
setstate RCT 2023-08-28 18:25:44 BatterieLadezustand 0.97
setstate RCT 2023-08-28 18:25:44 BatterieTemperatur 26.06
setstate RCT 2023-08-28 18:25:44 Batterie_Ent_Ladung 4.47
setstate RCT 2023-08-28 18:25:44 BattnextKalib 0
setstate RCT 2023-08-28 18:25:44 EinspeisungInsHaus 1304.61
setstate RCT 2023-08-28 18:25:44 InsNetzAktuell -580.60
setstate RCT 2023-08-28 18:25:44 InsNetzTag -17093.65
setstate RCT 2023-08-28 18:25:44 Tagesverbrauch 13981.00
setstate RCT 2023-08-28 18:25:44 TagesverbrauchInklAkku 30153.88
setstate RCT 2023-08-28 18:25:44 WechselrichterTemperatur 33.37
setstate RCT 2023-08-28 02:43:18 battery.cycles 50
setstate RCT 2023-08-28 10:41:02 battery.efficiency 0.94
setstate RCT 2023-08-28 18:03:50 battery.soc 0.97
setstate RCT 2023-08-27 18:20:50 battery.soc_target 0.97
setstate RCT 2023-07-16 16:07:04 battery.soh 1.00
setstate RCT 2023-08-28 18:25:32 battery.temperature 26.06
setstate RCT 2023-08-28 18:25:44 db.temp1 33.37
setstate RCT 2023-08-28 18:25:44 energy.e_ac_day 30153.88
setstate RCT 2023-08-28 18:25:44 energy.e_grid_feed_day -17093.65
setstate RCT 2023-08-28 18:07:45 energy.e_grid_load_day 921.55
setstate RCT 2023-08-28 18:25:44 energy.e_load_day 13981.00
setstate RCT 2023-08-28 18:23:21 error
setstate RCT 2023-08-28 18:25:44 g_sync.p_ac_grid_sum_lp -580.60
setstate RCT 2023-08-28 18:25:44 g_sync.p_ac_sum_lp 1304.61
setstate RCT 2023-08-28 18:25:44 g_sync.p_acc_lp 4.47
setstate RCT 2023-07-16 16:07:04 inverter_sn 0065B4821490
setstate RCT 2023-07-16 16:07:04 power_mng.soc_max 0.97
setstate RCT 2023-07-16 16:07:04 power_mng.soc_min 0.07
setstate RCT 2023-08-28 18:02:20 state connected

[/code]
Pi4, Tahoma Jalousien, Hue, Echo, Sonos, Lupusec XT3, FritzBox

loescher

Danke für den Screenshot.
Dadurch wird der Fehler ganz klar.
Die "\" müssen weg!

LG,
Stephan.

is2late

#231
Hallo Stephan,

danke für Deine Mühe!
Ich habe alle "\" weggenommen - der Fehler bleibt leider, dh BattnextKalib und BattTageVorKalib (so meine Benennung; Userreading sollte passen ) stehen zwar im Reading, aber mit Wert "0". Unten die Copy.

Interessant finde ich, dass SCALAR im Device Overview ständig den Wert ändert. Kann diesen jedoch nicht verstehen - ist das ein ungewöhnliches Format wie Hex oä? Sieht ähnlich aus wie ein Windows-Fehlercode.

Kann es sein, dass die Bezeichnungen "power_solarA" bzw "....B" individuell sind, dh je nach Anlage angepasst werden müssen? Ich habe die Bezeichnungen einfach von Noggas bzw. Deiner Vorlage übernommen.

LG Ingo

[code]define RCT fhempy rct_power 192.168.178.127
attr RCT alias RCT Wechselrichter
attr RCT comment RCT Power Wechselrichter
attr RCT device_readings_json {\
  "energy.e_grid_load_month":{\
    "reading":"energy_month_household_external",\
    "factor":1\
  },\
  "energy.e_grid_load_day":{\
    "reading":"energy_day_household_external",\
    "factor":1\
  },\
  "energy.e_ac_total":{\
    "reading":"energy_total",\
    "factor":1\
  },\
  "energy.e_grid_feed_total":{\
    "reading":"energy_total_grid_feed_in",\
    "factor":1\
  },\
  "battery.used_energy":{\
    "reading":"battery_used_energy",\
    "factor":1\
  },\
  "battery.soc":{\
    "reading":"battery_soc",\
    "factor":100\
  },\
  "energy.e_grid_feed_day":{\
    "reading":"energy_day_grid_feed_in",\
    "factor":1\
  },\
  "energy.e_ac_day":{\
    "reading":"energy_day",\
    "factor":1\
  },\
  "energy.e_load_day":{\
    "reading":"energy_day_household",\
    "factor":1\
  },\
  "energy.e_load_month":{\
    "reading":"energy_month_household",\
    "factor":1\
  },\
  "dc_conv.dc_conv_struct[0].p_dc_lp":{\
    "reading":"power_solarA",\
    "factor":1\
  },\
  "dc_conv.dc_conv_struct[1].p_dc_lp":{\
    "reading":"power_solarB",\
    "factor":1\
  },\
  "g_sync.p_acc_lp":{\
    "reading":"power_battery",\
    "factor":1\
  },\
  "g_sync.p_ac_grid_sum_lp":{\
    "reading":"power_grid_total",\
    "factor":1\
  },\
  "g_sync.p_ac_sum_lp":{\
    "reading":"power_household_total",\
    "factor":1\
  },\
  "g_sync.p_ac_load_sum_lp":{\
    "reading":"power_household_external",\
    "factor":1\
  },\
  "battery.charged_amp_hours":{\
    "reading":"Laufende_Batterieladung",\
    "factor":1\
  },\
  "power_mng.soc_charge":{\
   "reading":"SOC_min_maintenance_charge",\
   "factor":1\
  },\
  "battery.status":{\
    "reading":"battery_status",\
    "factor":1\
  },\
  "battery.status2":{\
    "reading":"battery_status_extra",\
    "factor":1\
  },\
  "power_mng.bat_calib_days_in_advance":{\
   "reading":"BattTageVorKalib",\
   "factor":1\
  },\
  "power_mng.bat_next_calib_date":{\
   "reading":"BattnextKalib"\
   "factor":1\
  }\
}
attr RCT group rct_power
attr RCT room Photovoltaik,Geräte,fhempy
attr RCT stateFormat {\\
"PV-Leistung: ".int(ReadingsVal($name, "power_solarA", "0")+ReadingsVal($name, "power_solarB", "0"))." W\
(NO: ".int(ReadingsVal($name, "power_solarA", "0"))." W / \
SW: ".int(ReadingsVal($name, "power_solarB", "0"))." W)"\
}
attr RCT userReadings BatterieLadezustand { ReadingsVal("RCT","battery.soc",0) },BatterieTemperatur { ReadingsVal("RCT","battery.temperature",0) },WechselrichterTemperatur { ReadingsVal("RCT","db.temp1",0) },Batterie_Ent_Ladung { ReadingsVal("RCT","g_sync.p_acc_lp",0) },EinspeisungInsHaus { ReadingsVal("RCT","g_sync.p_ac_sum_lp",0) },InsNetzAktuell { ReadingsVal("RCT","g_sync.p_ac_grid_sum_lp",0) },InsNetzTag { ReadingsVal("RCT","energy.e_grid_feed_day",0) },Tagesverbrauch { ReadingsVal("RCT","energy.e_load_day",0) },TagesverbrauchInklAkku { ReadingsVal("RCT","energy.e_ac_day",0) },AusNetzTag { ReadingsVal("RCT","energy.e_grid_load_day",0) },BattTageVorKalib { ReadingsVal("RCT","power_mng.bat_calib_days_in_advance",0) },BattnextKalib { ReadingsVal("RCT","power_mng.bat_next_calib_date",0) },power_solarCombined:power_solar(A|B).* { \
(ReadingsVal($name, "power_solarA", "0")\
+ReadingsVal($name, "power_solarB", "0")) }\
\

attr RCT verbose 1
#   DEF        rct_power 192.168.178.127
#   FHEMPYTYPE rct_power
#   FUUID      64ad9a3d-f33f-8a5f-3ae5-c44f46a3b81af060
#   IODev      fhempy_local
#   NAME       RCT
#   NR         516
#   PYTHONTYPE rct_power
#   STATE      SCALAR(0x7cf3310)0 W
#(NO: 0 W /
#SW: 0 W)
#   TYPE       fhempy
#   eventCount 56
#   CHANGED:
#   READINGS:
#     2023-08-29 11:31:19   AusNetzTag      220.22
#     2023-08-29 11:31:19   BattTageVorKalib 0
#     2023-08-29 11:31:19   BatterieLadezustand 0.54
#     2023-08-29 11:31:19   BatterieTemperatur 26.05
#     2023-08-29 11:31:19   Batterie_Ent_Ladung -2011.27
#     2023-08-29 11:31:19   BattnextKalib   0
#     2023-08-29 11:31:19   EinspeisungInsHaus 760.88
#     2023-08-29 11:31:19   InsNetzAktuell  -1.84
#     2023-08-29 11:31:19   InsNetzTag      -19.38
#     2023-08-29 11:31:19   Tagesverbrauch  7880.12
#     2023-08-29 11:31:19   TagesverbrauchInklAkku 7676.07
#     2023-08-29 11:31:19   WechselrichterTemperatur 31.49
#     2023-08-29 07:11:11   battery.cycles  51
#     2023-08-28 23:22:10   battery.efficiency 0.95
#     2023-08-29 11:28:54   battery.soc     0.54
#     2023-08-27 18:20:50   battery.soc_target 0.97
#     2023-07-16 16:07:04   battery.soh     1.00
#     2023-08-29 11:31:19   battery.temperature 26.05
#     2023-08-29 11:31:19   db.temp1        31.49
#     2023-08-29 11:31:19   energy.e_ac_day 7676.07
#     2023-08-29 11:31:19   energy.e_grid_feed_day -19.38
#     2023-08-29 11:31:19   energy.e_grid_load_day 220.22
#     2023-08-29 11:31:19   energy.e_load_day 7880.12
#     2023-08-29 11:22:43   error           
#     2023-08-29 11:31:19   g_sync.p_ac_grid_sum_lp -1.84
#     2023-08-29 11:31:19   g_sync.p_ac_sum_lp 760.88
#     2023-08-29 11:31:19   g_sync.p_acc_lp -2011.27
#     2023-07-16 16:07:04   inverter_sn     0065B4821490
#     2023-07-16 16:07:04   power_mng.soc_max 0.97
#     2023-07-16 16:07:04   power_mng.soc_min 0.07
#     2023-08-29 11:21:12   state           connected
#   args:
#     RCT
#     fhempy
#     rct_power
#     192.168.178.127
#   argsh:
#
setstate RCT SCALAR(0x7cf3310)0 W\
(NO: 0 W / \
SW: 0 W)
setstate RCT 2023-08-29 11:31:19 AusNetzTag 220.22
setstate RCT 2023-08-29 11:31:19 BattTageVorKalib 0
setstate RCT 2023-08-29 11:31:19 BatterieLadezustand 0.54
setstate RCT 2023-08-29 11:31:19 BatterieTemperatur 26.05
setstate RCT 2023-08-29 11:31:19 Batterie_Ent_Ladung -2011.27
setstate RCT 2023-08-29 11:31:19 BattnextKalib 0
setstate RCT 2023-08-29 11:31:19 EinspeisungInsHaus 760.88
setstate RCT 2023-08-29 11:31:19 InsNetzAktuell -1.84
setstate RCT 2023-08-29 11:31:19 InsNetzTag -19.38
setstate RCT 2023-08-29 11:31:19 Tagesverbrauch 7880.12
setstate RCT 2023-08-29 11:31:19 TagesverbrauchInklAkku 7676.07
setstate RCT 2023-08-29 11:31:19 WechselrichterTemperatur 31.49
setstate RCT 2023-08-29 07:11:11 battery.cycles 51
setstate RCT 2023-08-28 23:22:10 battery.efficiency 0.95
setstate RCT 2023-08-29 11:28:54 battery.soc 0.54
setstate RCT 2023-08-27 18:20:50 battery.soc_target 0.97
setstate RCT 2023-07-16 16:07:04 battery.soh 1.00
setstate RCT 2023-08-29 11:31:19 battery.temperature 26.05
setstate RCT 2023-08-29 11:31:19 db.temp1 31.49
setstate RCT 2023-08-29 11:31:19 energy.e_ac_day 7676.07
setstate RCT 2023-08-29 11:31:19 energy.e_grid_feed_day -19.38
setstate RCT 2023-08-29 11:31:19 energy.e_grid_load_day 220.22
setstate RCT 2023-08-29 11:31:19 energy.e_load_day 7880.12
setstate RCT 2023-08-29 11:22:43 error
setstate RCT 2023-08-29 11:31:19 g_sync.p_ac_grid_sum_lp -1.84
setstate RCT 2023-08-29 11:31:19 g_sync.p_ac_sum_lp 760.88
setstate RCT 2023-08-29 11:31:19 g_sync.p_acc_lp -2011.27
setstate RCT 2023-07-16 16:07:04 inverter_sn 0065B4821490
setstate RCT 2023-07-16 16:07:04 power_mng.soc_max 0.97
setstate RCT 2023-07-16 16:07:04 power_mng.soc_min 0.07
setstate RCT 2023-08-29 11:21:12 state connected

[/code]
Pi4, Tahoma Jalousien, Hue, Echo, Sonos, Lupusec XT3, FritzBox

loescher

Es liegt definitiv an deinem device_readings_json.
Wenn ich das in mein Test-FHEM einbaue, dann hab ich den gleichen Effekt: Die Readings power_solarA/B gibt es nicht bzw. werden nicht aktualisiert.
Nimm mal bitte mein device_readings_json von meiner Webseite.
Das funktioniert 100%.

Wenn das erst mal stabil läuft, dann sehen wir weiter.

Ohne funktionierendes power_solarA/B kann dein STATE nicht funktionieren.

LG,
Stephan.

is2late

Hallo Stephan,

es ist zum Verzweifeln - klappt nicht.

Ich habe Folgendes getan:
Den Code von Deiner Website genommen und in
a) device_readings_json
b) stateFormat
c) userReadings
eingesetzt. Dann alle "\" entfernt.

Sodann Fhem neu gestartet.

Ergebnis s. Screenshot...alle Werte des STATE auf null. Wobei andere Werte der Readings durchaus aktualisiert werden, zB battery.temperature etc, s. zweiter Screenshot (insbes die roten Zahlen).

Hier die aktuelle Copy:

[code]define RCT fhempy rct_power 192.168.178.127
attr RCT alias RCT Wechselrichter
attr RCT comment RCT Power Wechselrichter
attr RCT device_readings_json {\
  "energy.e_grid_load_month":{\
    "reading":"energy_month_household_external",\
    "factor":1\
  },\
  "energy.e_grid_load_day":{\
    "reading":"energy_day_household_external",\
    "factor":1\
  },\
  "energy.e_ac_total":{\
    "reading":"energy_total",\
    "factor":1\
  },\
  "energy.e_grid_feed_total":{\
    "reading":"energy_total_grid_feed_in",\
    "factor":1\
  },\\
  "battery.used_energy":{\
    "reading":"battery_used_energy",\
    "factor":1\
  },\
  "battery.soc":{\
    "reading":"battery_soc",\
    "factor":100\
  },\
  "energy.e_grid_feed_day":{\
    "reading":"energy_day_grid_feed_in",  \
    "factor":1              \
  },\
  "energy.e_ac_day":{                \
    "reading":"energy_day",\
    "factor":1\
  },\
  "energy.e_load_day":{\
    "reading":"energy_day_household",\
    "factor":1\
  },\
  "energy.e_load_month":{\
    "reading":"energy_month_household",\
    "factor":1\
  },\
  "dc_conv.dc_conv_struct[0].p_dc_lp":{\
    "reading":"power_solarA",\
    "factor":1\
  },\
  "dc_conv.dc_conv_struct[1].p_dc_lp":{\
    "reading":"power_solarB",\
    "factor":1\
  },\
  "g_sync.p_acc_lp":{\
    "reading":"power_battery",\
    "factor":1\
  },\
  "g_sync.p_ac_grid_sum_lp":{\
    "reading":"power_grid_total",\
    "factor":1\
  },\
  "g_sync.p_ac_sum_lp":{\
    "reading":"power_household_total",\
    "factor":1\
  },\
  "g_sync.p_ac_load_sum_lp":{\
    "reading":"power_household_external",\
    "factor":1\
  }\
}
attr RCT group rct_power
attr RCT room Photovoltaik,Geräte,fhempy
attr RCT stateFormat {\
"PV-Leistung: ".int(ReadingsVal($name, "power_solarA", "0")+ReadingsVal($name, "power_solarB", "0"))." W\
(NO: ".int(ReadingsVal($name, "power_solarA", "0"))." W / \
SW: ".int(ReadingsVal($name, "power_solarB", "0"))." W)<br>\
Gesamtertrag heute: ".sprintf("%.2f", (ReadingsVal($name, "energy_day", "0")/1000))." kWh<br>\
Batterie-Kapazität: ".int(ReadingsVal($name, "battery_soc", "0"))." %<br>\
Batterie-".((ReadingsVal($name, "power_battery", 1) < 0) ? "Ladung" : "ENTladung").": ".int(abs(ReadingsVal($name, "power_battery", "-")))." W<br>\
Netz-".((ReadingsVal($name, "power_grid_total", 1) < 0) ? "Einspeisung" : "Bezug").": ".int(abs(ReadingsVal($name, "power_grid_total", "-")))." W<br>\
Hausverbrauch: ".int(ReadingsVal($name, "power_household_external", "-"))." W<br>\
Heutiger Hausverbrauch: ".sprintf("%.2f", (ReadingsVal($name, "energy_day_household", "0")/1000))." kWh \
davon aus dem Netz: ".sprintf("%.2f", (ReadingsVal($name, "energy_day_household_external", "0")/1000))." kWh"\
}
attr RCT userReadings power_solarCombined:power_solar(A|B).* { \
(ReadingsVal($name, "power_solarA", "0")\
+ReadingsVal($name, "power_solarB", "0")) }\

attr RCT verbose 1
#   DEF        rct_power 192.168.178.127
#   FHEMPYTYPE rct_power
#   FUUID      64ad9a3d-f33f-8a5f-3ae5-c44f46a3b81af060
#   IODev      fhempy_local
#   NAME       RCT
#   NR         516
#   PYTHONTYPE rct_power
#   STATE      PV-Leistung: 0 W
#(NO: 0 W /
#SW: 0 W)<br>
#Gesamtertrag heute: 0.00 kWh<br>
#Batterie-Kapazität: 0 %<br>
#Batterie-ENTladung: 0 W<br>
#Netz-Bezug: 0 W<br>
#Hausverbrauch: 0 W<br>
#Heutiger Hausverbrauch: 0.00 kWh
#davon aus dem Netz: 0.00 kWh
#   TYPE       fhempy
#   eventCount 51
#   READINGS:
#     2023-08-29 18:31:34   AusNetzTag      226.11
#     2023-08-29 18:31:34   BattTageVorKalib 0
#     2023-08-29 18:31:34   BatterieLadezustand 0.99
#     2023-08-29 18:31:34   BatterieTemperatur 25.36
#     2023-08-29 18:31:34   Batterie_Ent_Ladung 4.14
#     2023-08-29 18:31:34   BattnextKalib   0
#     2023-08-29 18:31:34   EinspeisungInsHaus 1648.11
#     2023-08-29 18:31:34   InsNetzAktuell  -809.60
#     2023-08-29 18:31:34   InsNetzTag      -9776.16
#     2023-08-29 18:31:34   Tagesverbrauch  14521.99
#     2023-08-29 18:31:34   TagesverbrauchInklAkku 24068.18
#     2023-08-29 18:31:34   WechselrichterTemperatur 32.29
#     2023-08-29 07:11:11   battery.cycles  51
#     2023-08-29 11:48:33   battery.efficiency 0.94
#     2023-08-29 17:38:06   battery.soc     0.99
#     2023-08-29 17:38:06   battery.soc_target 0.99
#     2023-07-16 16:07:04   battery.soh     1.00
#     2023-08-29 18:41:41   battery.temperature 25.27
#     2023-08-29 18:41:52   db.temp1        31.73
#     2023-08-29 18:42:15   energy.e_ac_day 24347.86
#     2023-08-29 18:42:15   energy.e_grid_feed_day -9907.26
#     2023-08-29 17:58:50   energy.e_grid_load_day 226.11
#     2023-08-29 18:42:15   energy.e_load_day 14670.14
#     2023-08-29 18:23:05   error           
#     2023-08-29 18:42:15   g_sync.p_ac_grid_sum_lp -644.35
#     2023-08-29 18:42:15   g_sync.p_ac_sum_lp 1488.55
#     2023-08-29 18:42:15   g_sync.p_acc_lp 4.17
#     2023-07-16 16:07:04   inverter_sn     0065B4821490
#     2023-07-16 16:07:04   power_mng.soc_max 0.97
#     2023-07-16 16:07:04   power_mng.soc_min 0.07
#     2023-08-29 18:33:06   state           connected
#   args:
#     RCT
#     fhempy
#     rct_power
#     192.168.178.127
#   argsh:
#
setstate RCT PV-Leistung: 0 W\
(NO: 0 W / \
SW: 0 W)<br>\
Gesamtertrag heute: 0.00 kWh<br>\
Batterie-Kapazität: 0 %<br>\
Batterie-ENTladung: 0 W<br>\
Netz-Bezug: 0 W<br>\
Hausverbrauch: 0 W<br>\
Heutiger Hausverbrauch: 0.00 kWh \
davon aus dem Netz: 0.00 kWh
setstate RCT 2023-08-29 18:31:34 AusNetzTag 226.11
setstate RCT 2023-08-29 18:31:34 BattTageVorKalib 0
setstate RCT 2023-08-29 18:31:34 BatterieLadezustand 0.99
setstate RCT 2023-08-29 18:31:34 BatterieTemperatur 25.36
setstate RCT 2023-08-29 18:31:34 Batterie_Ent_Ladung 4.14
setstate RCT 2023-08-29 18:31:34 BattnextKalib 0
setstate RCT 2023-08-29 18:31:34 EinspeisungInsHaus 1648.11
setstate RCT 2023-08-29 18:31:34 InsNetzAktuell -809.60
setstate RCT 2023-08-29 18:31:34 InsNetzTag -9776.16
setstate RCT 2023-08-29 18:31:34 Tagesverbrauch 14521.99
setstate RCT 2023-08-29 18:31:34 TagesverbrauchInklAkku 24068.18
setstate RCT 2023-08-29 18:31:34 WechselrichterTemperatur 32.29
setstate RCT 2023-08-29 07:11:11 battery.cycles 51
setstate RCT 2023-08-29 11:48:33 battery.efficiency 0.94
setstate RCT 2023-08-29 17:38:06 battery.soc 0.99
setstate RCT 2023-08-29 17:38:06 battery.soc_target 0.99
setstate RCT 2023-07-16 16:07:04 battery.soh 1.00
setstate RCT 2023-08-29 18:41:41 battery.temperature 25.27
setstate RCT 2023-08-29 18:41:52 db.temp1 31.73
setstate RCT 2023-08-29 18:42:15 energy.e_ac_day 24347.86
setstate RCT 2023-08-29 18:42:15 energy.e_grid_feed_day -9907.26
setstate RCT 2023-08-29 17:58:50 energy.e_grid_load_day 226.11
setstate RCT 2023-08-29 18:42:15 energy.e_load_day 14670.14
setstate RCT 2023-08-29 18:23:05 error
setstate RCT 2023-08-29 18:42:15 g_sync.p_ac_grid_sum_lp -644.35
setstate RCT 2023-08-29 18:42:15 g_sync.p_ac_sum_lp 1488.55
setstate RCT 2023-08-29 18:42:15 g_sync.p_acc_lp 4.17
setstate RCT 2023-07-16 16:07:04 inverter_sn 0065B4821490
setstate RCT 2023-07-16 16:07:04 power_mng.soc_max 0.97
setstate RCT 2023-07-16 16:07:04 power_mng.soc_min 0.07
setstate RCT 2023-08-29 18:33:06 state connected

[/code]
Pi4, Tahoma Jalousien, Hue, Echo, Sonos, Lupusec XT3, FritzBox

loescher

Das ist ja sehr, sehr rätselhaft.
Ich verstehe nicht, warum bei dir die Readings power_solarA und power_solarB nicht auftauchen.
Versuch doch mal das Device zu löschen und dann testsweise nur mit diesem Attribut anzulegen:
attr RCT device_readings_json {\
  "dc_conv.dc_conv_struct[0].p_dc_lp":{\
    "reading":"power_solarA",\
    "factor":1\
  },\
  "dc_conv.dc_conv_struct[1].p_dc_lp":{\
    "reading":"power_solarB",\
    "factor":1\
  }\
}
Wenn weiterhin kein power_solarA auftaucht, dann bitte mal verbose auf 5 setzen und im fhempy-* Logfile schauen.

LG,
Stephan.

is2late

Erledigt wie verlangt. Device gelöscht. Dann Update System und Update Fhem. Neustart.
Danach Device neu angelegt und nur mit den o.g. Attributen angelegt. Verbindung klappt sofort, die Standard-Readings sind da, und jetzt auch (Wunder!!!) power_solarA und ..B.
Super, tausend Dank, Stephan!

Jetzt füge ich mal die anderen Attribute von Deiner HP hinzu und dann mal sehen...

LG Ingo
Pi4, Tahoma Jalousien, Hue, Echo, Sonos, Lupusec XT3, FritzBox

is2late

Kann man die Standard-Readings eigentlich abschalten oder herausnehmen?
Ich habe nur gefunden, dass sich ihre Aktualisierung abstellen lässt. Dann sind sie aber ja immer noch da.
Pi4, Tahoma Jalousien, Hue, Echo, Sonos, Lupusec XT3, FritzBox

loescher

Die überflüssigen Readings kannst du dann ja mit deletereading einfach löschen.

LG,
Stephan.

is2late

Pi4, Tahoma Jalousien, Hue, Echo, Sonos, Lupusec XT3, FritzBox

lr002585

Zitat von: Docter am 25 August 2023, 10:57:31
Zitat von: Docter am 28 Mai 2023, 14:54:17
Zitat von: Docter am 25 Mai 2023, 11:15:44habe es probiert...

Kann den Wert setzen (0,07), aber das Target bleibt unverändert... (0,07) man kann dann aber (in der App) kein neues Target größer als 0.07 setzen.
Es wäre damit echt schön, den Wert "battery.soc_target" setzen zu können...

Danke
Thomas

Wäre es bitte möglich, den Befehl aufzunehmen, um das SOC Target zu setzen?

Danke
Thomas

Wäre das möglich wäre, wäre ich echt dankbar.
Gruß
Thomas

ich wäre auch am setzen von SOC_target interessiert.