Hauptmenü

Neueste Beiträge

#11
Solaranlagen / Aw: 76_SolarForecast - Informa...
Letzter Beitrag von peterboeckmann - 04 Februar 2026, 11:04:11
Hallo Heiko,

für nach Deinem Urlaub, ich hoffe er war erholsam.

<TL;DR>
Die Formel passt, aber das Reading RestOfDayPVforecast nicht.
</TL;DR>

Zitat von: DS_Starter am 31 Januar 2026, 10:30:12Wenn du magst, kannst du ja mal überlegen wie diese aktuelle Formel verändert werden könnte um im Grenzwertbereich besser zu funktionieren und Werte RestOfDayPVforecast > Today_PVreal zu eliminieren

Ich habe mir die Formel angesehen. Die ist vollkommen in Ordnung so und bedarf keiner Veränderung.

Die Ursache für die (bei mir) unplausiblen Werte des Readings Today_PVdeviation habe ich in den eingehenden Werten gefunden.
Dafür habe ich die folgenden (User-)Readings aufgezeichnet und in einem SVG plotten lassen:
- Today_PVdeviation
- Today_PVforecast
- Today_PVreal
- RestOfDayPVforecast
- Today_PVforecast_SoFar {return ReadingsVal("SolarForecast", "Today_PVforecast_Num", "0")-ReadingsVal("SolarForecast", "RestOfDayPVforecast_Num", "0");}

Das sah am 01.02. so aus:
Du darfst diesen Dateianhang nicht ansehen.
Wie man hier sieht, ist RestOfDayPVforecast gelegentlich größer als Today_PVforecast, was ja inhaltlich nicht vorkommen dürfte.
Dadurch wird mein UserReading Today_PVforecast_SoFar (und der in die Formel eingehende Wert für die bisherige Prognose) negativ, was mit dem abs in der Formel nicht weiter auffällt.
Allerdings führt der extrem kleine Wert von Today_PVforecast_SoFar (nahe 0) zu einer riesigen Today_PVdeviation.
In diesem Diagramm ist auch ganz gut zu erkennen, wie groß der Abstand zwischen Today_PVreal und Today_PVforecast ist.

Ganz ähnlich das Bild am 02.02.:
Du darfst diesen Dateianhang nicht ansehen.

Ich habe dann den Code zur Ermittlung der Today_PVdeviation so umgestellt, dass RestOfDayPVforecast hier nicht berücksichtigt wird:
my ($sec, $min, $hour) = localtime();
my $currentHour = $hour + 1;

my $pvfcd = 0; # PV Prognose am Tagesanfang
if ($currentHour > 5) {$pvfcd += ReadingsNum ($name, 'Today_Hour05_PVforecast', 0)} # PV Prognose nach Stunde 5
if ($currentHour > 6) {$pvfcd += ReadingsNum ($name, 'Today_Hour06_PVforecast', 0)} # PV Prognose nach Stunde 6
if ($currentHour > 7) {$pvfcd += ReadingsNum ($name, 'Today_Hour07_PVforecast', 0)} # PV Prognose nach Stunde 7
if ($currentHour > 8) {$pvfcd += ReadingsNum ($name, 'Today_Hour08_PVforecast', 0)} # PV Prognose nach Stunde 8
if ($currentHour > 9) {$pvfcd += ReadingsNum ($name, 'Today_Hour09_PVforecast', 0)} # PV Prognose nach Stunde 9
if ($currentHour > 10) {$pvfcd += ReadingsNum ($name, 'Today_Hour10_PVforecast', 0)} # PV Prognose nach Stunde 10
if ($currentHour > 11) {$pvfcd += ReadingsNum ($name, 'Today_Hour11_PVforecast', 0)} # PV Prognose nach Stunde 11
if ($currentHour > 12) {$pvfcd += ReadingsNum ($name, 'Today_Hour12_PVforecast', 0)} # PV Prognose nach Stunde 12
if ($currentHour > 13) {$pvfcd += ReadingsNum ($name, 'Today_Hour13_PVforecast', 0)} # PV Prognose nach Stunde 13
if ($currentHour > 14) {$pvfcd += ReadingsNum ($name, 'Today_Hour14_PVforecast', 0)} # PV Prognose nach Stunde 14
if ($currentHour > 15) {$pvfcd += ReadingsNum ($name, 'Today_Hour15_PVforecast', 0)} # PV Prognose nach Stunde 15
if ($currentHour > 16) {$pvfcd += ReadingsNum ($name, 'Today_Hour16_PVforecast', 0)} # PV Prognose nach Stunde 16
if ($currentHour > 17) {$pvfcd += ReadingsNum ($name, 'Today_Hour17_PVforecast', 0)} # PV Prognose nach Stunde 17
if ($currentHour > 18) {$pvfcd += ReadingsNum ($name, 'Today_Hour18_PVforecast', 0)} # PV Prognose nach Stunde 18
if ($currentHour > 19) {$pvfcd += ReadingsNum ($name, 'Today_Hour19_PVforecast', 0)} # PV Prognose nach Stunde 19
if ($currentHour > 20) {$pvfcd += ReadingsNum ($name, 'Today_Hour20_PVforecast', 0)} # PV Prognose nach Stunde 20
if ($currentHour > 21) {$pvfcd += ReadingsNum ($name, 'Today_Hour21_PVforecast', 0)} # PV Prognose nach Stunde 21
if ($currentHour > 22) {$pvfcd += ReadingsNum ($name, 'Today_Hour22_PVforecast', 0)} # PV Prognose nach Stunde 22

if ($currentHour == 5) {$pvfcd += ReadingsNum ($name, 'Today_Hour05_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 6) {$pvfcd += ReadingsNum ($name, 'Today_Hour06_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 7) {$pvfcd += ReadingsNum ($name, 'Today_Hour07_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 8) {$pvfcd += ReadingsNum ($name, 'Today_Hour08_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 9) {$pvfcd += ReadingsNum ($name, 'Today_Hour09_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 10) {$pvfcd += ReadingsNum ($name, 'Today_Hour10_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 11) {$pvfcd += ReadingsNum ($name, 'Today_Hour11_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 12) {$pvfcd += ReadingsNum ($name, 'Today_Hour12_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 13) {$pvfcd += ReadingsNum ($name, 'Today_Hour13_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 14) {$pvfcd += ReadingsNum ($name, 'Today_Hour14_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 15) {$pvfcd += ReadingsNum ($name, 'Today_Hour15_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 16) {$pvfcd += ReadingsNum ($name, 'Today_Hour16_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 17) {$pvfcd += ReadingsNum ($name, 'Today_Hour17_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 18) {$pvfcd += ReadingsNum ($name, 'Today_Hour18_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 19) {$pvfcd += ReadingsNum ($name, 'Today_Hour19_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 20) {$pvfcd += ReadingsNum ($name, 'Today_Hour20_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 21) {$pvfcd += ReadingsNum ($name, 'Today_Hour21_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde
if ($currentHour == 22) {$pvfcd += ReadingsNum ($name, 'Today_Hour22_PVforecast', 0) * (($min*60) + $sec) / 3600} # PV Prognose + Anteil der aktuellen Stunde

$pvfcd = sprintf "%.1f", $pvfcd;
storeReading ('Today_PVforecast_ByNow', $pvfcd.' Wh');

$dpv        = sprintf "%.2f", ( 100 - (100 * ($pvre / ($pvfcd || 1))) );
$dosave_dpv = 1;

Wie Du siehst, habe ich zur Nachverfolgung das Reading Today_PVforecast_ByNow eingeführt.
Im folgenden Diagramm ist das auch mit dargestellt:
Du darfst diesen Dateianhang nicht ansehen.

Hier sieht man, wie nah sich dieses Reading (gestrichelte Linie) an der Today_PVreal (grüne Linie) bewegt.
Dafür einen riesigen Glückwunsch an die PV-Prognose an sich!!!

Vielleicht ist mein Code da wo er ist, an einer ungünstigen Stelle.
Bestimmt ist es auch sinnvoller, die Ursache für die aus meiner Sicht falsche RestOfDayPVforecast zu ermitteln und zu korrigieren.

Ich würde mich aber sehr freuen, wenn Du die entsprechende Korrektur vornehmen könntest.


Vielen Dank mal wieder für Deinen großartigen Support und dafür, dass Du Dich auch mit noch so geringfügigen Problemen auseinandersetzt!

Viele Grüße,
Peter
#12
Server - Linux / Aw: Proxmox Mountpoint User un...
Letzter Beitrag von swsmily - 04 Februar 2026, 10:59:36
Tut mir leid. Das war mein Fehler, dass ich es im falschen Board gepostet habe. Daher habe ich es auch direkt nach dem Hinweis verschoben. Es war keine Absicht jemanden damit zu verärgern.
#13
Server - Linux / Aw: Proxmox Mountpoint User un...
Letzter Beitrag von betateilchen - 04 Februar 2026, 10:48:03
Zitat von: swsmily am 04 Februar 2026, 10:02:32Gerade wenn man in diesem Board hier auf der ersten Seite auch noch sieht, dass du 2 Threats gestartet hast, die auch nichts mit FHEM direkt zu tun haben, sondern mit Proxmox.

Stimmt.

Aber im Gegensatz zu Dir habe ich mir VORHER die Mühe gemacht, zu schauen, wo diese Threads "abseits von FHEM" hier im Forum vielleicht doch hinpassen könnten.
#14
Multimedia / Aw: [82_LGTV_WebOS.pm] Modul f...
Letzter Beitrag von drhirn - 04 Februar 2026, 10:40:34
Falls es relevant ist: Ich hab einen "alten" OLED55E7N-Z mit webOS 3.9.3-6270915 (dreadlocks2-dudhwa) in der Software-Version 06.10.65.

Wichtig ist, dass "TV-Gerät per Mobilgerät einschalten (WiFi)" und "QuickStart+" aktiviert sind.

define TV LGTV_WebOS 192.168.2.1
attr TV userattr rhasspyChannels:textField-long
attr TV devStateIcon on:10px-kreis-gruen:off off:10px-kreis-rot:on
attr TV event-on-change-reading presence,state,launchApp,input,channel
attr TV genericDeviceType media
attr TV keepAliveCheckTime 2
attr TV pingPresence 1
attr TV rhasspyChannels Netflix=launchApp Netflix\
Amazon=launchApp AmazonVideo\
Amatson=launchApp AmazonVideo\
Fernsehen=launchApp TV\
Fernseher=launchApp TV\
Fernsehn=launchApp TV\
ORF Eins=channel 201\
ORF Zwei=channel 202\
Wox=channel 214\
Vox=channel 214
attr TV rhasspyRoom Wohnzimmer
attr TV room Multimedia,Wohnzimmer->Multimedia
attr TV wakeOnLanBroadcast 192.168.2.255
attr TV wakeOnLanMAC 78:5A:C8:93:9B:04
#   DEF        192.168.2.1
#   FD         33
#   FUUID      5c483e71-f33f-dc90-fe62-43ed6d768dcd19b1
#   FVERSION   82_LGTV_WebOS.pm:v3.7.1-s29241/2024-10-15
#   HOST       192.168.2.1
#   NAME       TV
#   NR         111
#   PARTIAL   
#   STATE      on
#   TYPE       LGTV_WebOS
#   VERSION    v3.7.1
#   eventCount 37
#   READINGS:
#     2018-08-05 01:31:19   3D              off
#     2018-08-05 01:31:19   3DMode          2d
#     2026-02-04 10:33:57   channel         272
#     2018-08-04 23:17:32   channelCurrentEndTime -
#     2018-08-04 23:17:32   channelCurrentStartTime -
#     2018-08-04 23:17:32   channelCurrentTitle -
#     2026-02-04 10:33:57   channelMedia    Cable Digital TV
#     2026-02-04 10:33:57   channelName     Warner TV Comedy HD
#     2018-08-04 23:17:32   channelNextEndTime -
#     2018-08-04 23:17:32   channelNextStartTime -
#     2018-08-04 23:17:32   channelNextTitle -
#     2020-09-09 21:09:15   extInput_HDMI-1 connect_0
#     2022-01-30 22:56:18   extInput_HDMI-2 connect_0
#     2020-07-21 21:51:40   extInput_HDMI-3 connect_0
#     2020-03-18 13:19:50   extInput_HDMI-4 connect_0
#     2024-10-28 11:47:55   extInput_HDMI_1 connect_0
#     2023-01-25 22:32:56   extInput_HDMI_2 connect_0
#     2023-03-20 22:13:45   extInput_HDMI_3 connect_0
#     2023-05-15 16:47:06   extInput_HDMI_4 connect_0
#     2025-08-26 20:45:29   input           -
#     2026-02-04 10:33:46   lastResponse    ok
#     2026-02-04 10:33:47   launchApp       TV
#     2018-08-04 23:14:53   lgKey           0b4c6186535f8b003ab768be8c946a3d
#     2026-02-04 10:34:03   mute            on
#     2026-02-04 10:33:46   pairing         paired
#     2026-02-04 10:33:43   power           on
#     2026-02-04 10:38:25   presence        present
#     2019-01-31 11:42:21   service_api     v.1
#     2019-01-31 11:42:21   service_audio   v.1
#     2019-01-31 11:42:21   service_config  v.1
#     2019-01-31 11:42:21   service_media.controls v.1
#     2019-01-31 11:42:21   service_media.viewer v.1
#     2019-01-31 11:42:21   service_pairing v.1
#     2019-01-31 11:42:21   service_settings v.1
#     2019-01-31 11:42:21   service_system  v.1
#     2019-01-31 11:42:21   service_system.launcher v.1
#     2019-01-31 11:42:21   service_system.notifications v.1
#     2019-01-31 11:42:21   service_timer   v.1
#     2019-01-31 11:42:21   service_tv      v.1
#     2019-01-31 11:42:21   service_user    v.1
#     2019-01-31 11:42:21   service_webapp  v.2
#     2026-02-04 10:33:43   state           on
#     2026-02-04 10:33:53   volume          9
#   helper:
#     lastResponse 1770197913
#     wsKey      MTc3MDE5NzYyMy4yODI4
#
#     RUNNING_PID:
#       abortFn    FHEM::Devices::LGTV::LGTVWebOS::PresenceAborted
#       arg        TV|192.168.2.1
#       bc_pid     18456
#       finishFn   FHEM::Devices::LGTV::LGTVWebOS::PresenceDone
#       fn         FHEM::Devices::LGTV::LGTVWebOS::PresenceRun
#       pid        36708
#       telnet     telnetPort_127.0.0.1_50780
#       timeout    5
#       abortArg:
#     device:
#       registered 1
#       runsetcmd  0
#       channelguide:
#         counter    5881
#       inputapps:
#         com.webos.app.hdmi1 HDMI_1
#         com.webos.app.hdmi2 HDMI_2
#         com.webos.app.hdmi3 HDMI_3
#         com.webos.app.hdmi4 HDMI_4
#       inputs:
#         HDMI_1     com.webos.app.hdmi1
#         HDMI_2     com.webos.app.hdmi2
#         HDMI_3     com.webos.app.hdmi3
#         HDMI_4     com.webos.app.hdmi4
#
setstate TV on
setstate TV 2018-08-05 01:31:19 3D off
setstate TV 2018-08-05 01:31:19 3DMode 2d
setstate TV 2026-02-04 10:33:57 channel 272
setstate TV 2018-08-04 23:17:32 channelCurrentEndTime -
setstate TV 2018-08-04 23:17:32 channelCurrentStartTime -
setstate TV 2018-08-04 23:17:32 channelCurrentTitle -
setstate TV 2026-02-04 10:33:57 channelMedia Cable Digital TV
setstate TV 2026-02-04 10:33:57 channelName Warner TV Comedy HD
setstate TV 2018-08-04 23:17:32 channelNextEndTime -
setstate TV 2018-08-04 23:17:32 channelNextStartTime -
setstate TV 2018-08-04 23:17:32 channelNextTitle -
setstate TV 2020-09-09 21:09:15 extInput_HDMI-1 connect_0
setstate TV 2022-01-30 22:56:18 extInput_HDMI-2 connect_0
setstate TV 2020-07-21 21:51:40 extInput_HDMI-3 connect_0
setstate TV 2020-03-18 13:19:50 extInput_HDMI-4 connect_0
setstate TV 2024-10-28 11:47:55 extInput_HDMI_1 connect_0
setstate TV 2023-01-25 22:32:56 extInput_HDMI_2 connect_0
setstate TV 2023-03-20 22:13:45 extInput_HDMI_3 connect_0
setstate TV 2023-05-15 16:47:06 extInput_HDMI_4 connect_0
setstate TV 2025-08-26 20:45:29 input -
setstate TV 2026-02-04 10:33:46 lastResponse ok
setstate TV 2026-02-04 10:33:47 launchApp TV
setstate TV 2018-08-04 23:14:53 lgKey 0b4c6186535f8b003ab768be8c946a3d
setstate TV 2026-02-04 10:34:03 mute on
setstate TV 2026-02-04 10:33:46 pairing paired
setstate TV 2026-02-04 10:33:43 power on
setstate TV 2026-02-04 10:38:25 presence present
setstate TV 2019-01-31 11:42:21 service_api v.1
setstate TV 2019-01-31 11:42:21 service_audio v.1
setstate TV 2019-01-31 11:42:21 service_config v.1
setstate TV 2019-01-31 11:42:21 service_media.controls v.1
setstate TV 2019-01-31 11:42:21 service_media.viewer v.1
setstate TV 2019-01-31 11:42:21 service_pairing v.1
setstate TV 2019-01-31 11:42:21 service_settings v.1
setstate TV 2019-01-31 11:42:21 service_system v.1
setstate TV 2019-01-31 11:42:21 service_system.launcher v.1
setstate TV 2019-01-31 11:42:21 service_system.notifications v.1
setstate TV 2019-01-31 11:42:21 service_timer v.1
setstate TV 2019-01-31 11:42:21 service_tv v.1
setstate TV 2019-01-31 11:42:21 service_user v.1
setstate TV 2019-01-31 11:42:21 service_webapp v.2
setstate TV 2026-02-04 10:33:43 state on
setstate TV 2026-02-04 10:33:53 volume 9
#15
Multimedia / Aw: [82_LGTV_WebOS.pm] Modul f...
Letzter Beitrag von locodriver - 04 Februar 2026, 10:25:17
Zitat von: grappa24 am 31 Januar 2026, 13:56:44@Uwe: Würdest du bitte mal einen Status deiner Modul-Readings im connected-Zustand posten?

Bitteschön:

define Fernseher LGTV_WebOS 192.168.178.35
attr Fernseher devStateIcon Ein:LED.green Aus:LED.red
attr Fernseher event-on-change-reading .*
attr Fernseher eventMap on:Ein off:Aus
attr Fernseher group Geräte
attr Fernseher homebridgeMapping ChannelController:reading=channel,cmd=channel PlaybackController:playback,values=play:Play;;pause:Pause;;stop:Stop,cmds=Play:play;;Pause:pause;;Stop:stop;;Previous:previous;;Next:next Mute:mute,cmdOn=mute+on,cmdOff=mute+off,valueOn=on,valueOff=off
attr Fernseher icon rc_TV2
attr Fernseher pingPresence 1
attr Fernseher room 070Media
attr Fernseher wakeOnLanBroadcast 192.......
attr Fernseher wakeOnLanMAC B.............
#   CFGFN      ./FHEM/70_Media.cfg
#   DEF        192.168.178.35
#   FD         101
#   FUUID      615870ee-f33f-b425-..........................
#   FVERSION   82_LGTV_WebOS.pm:v3.7.1-s29241/2024-10-15
#   HOST       192.168.178.35
#   NAME       Fernseher
#   NR         725
#   PARTIAL   
#   STATE      Ein
#   TYPE       LGTV_WebOS
#   VERSION    v3.7.1
#   eventCount 10759
#   READINGS:
#     2026-02-04 10:22:52   channel         33
#     2023-06-24 23:23:15   channelCurrentEndTime -
#     2023-06-24 23:23:15   channelCurrentStartTime -
#     2023-06-24 23:23:15   channelCurrentTitle -
#     2026-02-04 10:22:52   channelMedia    Cable Digital TV
#     2026-02-04 10:22:52   channelName     3sat HD
#     2023-06-24 23:23:15   channelNextEndTime -
#     2023-06-24 23:23:15   channelNextStartTime -
#     2023-06-24 23:23:15   channelNextTitle -
#     2023-06-24 23:31:33   extInput_Flirc_OTT connect_1
#     2023-08-28 18:52:55   extInput_HDMI2  connect_1
#     2026-02-04 00:10:49   extInput_HDMI_2 connect_0
#     2023-06-24 23:31:33   extInput_HDMI_3 connect_0
#     2023-06-24 23:31:33   extInput_HDMI_4 connect_0
#     2023-08-15 12:46:50   extInput_RX_V473 connect_1
#     2026-02-03 18:50:07   input           -
#     2026-02-04 05:03:56   lastResponse    ok
#     2026-02-04 00:10:25   launchApp       TV
#     2023-06-24 23:31:16   lgKey           7................................................
#     2023-06-24 23:31:25   mute            off
#     2026-01-31 21:51:35   pairing         paired
#     2026-02-04 10:22:51   power           on
#     2026-02-04 10:22:52   presence        present
#     2026-02-04 10:22:51   state           on
#     2025-01-27 18:59:58   volume          10
#   
#     
setstate Fernseher Ein
setstate Fernseher 2026-02-04 10:22:52 channel 33
setstate Fernseher 2023-06-24 23:23:15 channelCurrentEndTime -
setstate Fernseher 2023-06-24 23:23:15 channelCurrentStartTime -
setstate Fernseher 2023-06-24 23:23:15 channelCurrentTitle -
setstate Fernseher 2026-02-04 10:22:52 channelMedia Cable Digital TV
setstate Fernseher 2026-02-04 10:22:52 channelName 3sat HD
setstate Fernseher 2023-06-24 23:23:15 channelNextEndTime -
setstate Fernseher 2023-06-24 23:23:15 channelNextStartTime -
setstate Fernseher 2023-06-24 23:23:15 channelNextTitle -
setstate Fernseher 2023-06-24 23:31:33 extInput_Flirc_OTT connect_1
setstate Fernseher 2023-08-28 18:52:55 extInput_HDMI2 connect_1
setstate Fernseher 2026-02-04 00:10:49 extInput_HDMI_2 connect_0
setstate Fernseher 2023-06-24 23:31:33 extInput_HDMI_3 connect_0
setstate Fernseher 2023-06-24 23:31:33 extInput_HDMI_4 connect_0
setstate Fernseher 2023-08-15 12:46:50 extInput_RX_V473 connect_1
setstate Fernseher 2026-02-03 18:50:07 input -
setstate Fernseher 2026-02-04 05:03:56 lastResponse ok
setstate Fernseher 2026-02-04 00:10:25 launchApp TV
setstate Fernseher 2023-06-24 23:31:16 lgKey .............................................
setstate Fernseher 2023-06-24 23:31:25 mute off
setstate Fernseher 2026-01-31 21:51:35 pairing paired
setstate Fernseher 2026-02-04 10:22:51 power on
setstate Fernseher 2026-02-04 10:22:52 presence present
setstate Fernseher 2026-02-04 10:22:51 state on
setstate Fernseher 2025-01-27 18:59:58 volume 10

#16
Marktplatz - Güter / Suche Firmware für HM-SEC-MDIR...
Letzter Beitrag von UliD - 04 Februar 2026, 10:16:45
Moin,
ich suche die Firmware V1.6 für einen HM-SEC-MDIR-2, idealerweise als HEX Datei. Meine Bewegungsmelder (gebraucht gekauft) wurden nicht ordnungsgemäß abgelernt und nur durch eine jungfräuliche FW lassen sich die aktuellen Probleme beheben. Programmierung ist kein Problem, einzig die FW fehlt mir.

Danke + Gruß
Uli 
#17
MQTT / Aw: OpenMQTTGateway support th...
Letzter Beitrag von Waldmensch - 04 Februar 2026, 10:16:40
Hier die Beobachtungen aus der "Man in the middle" Analyse:


# Battery Guard BLE Protocol - Reverse Engineering Project

**Project Goal:** Decrypt BLE communication between Battery Guard device and mobile app

**Hardware:** Dual-ESP32 bridge system for traffic interception 
**Status:** ✅ Bridge operational | ⚡ MAC not in key (PROVEN) | 🔄 App extraction required

---

## 📊 Project Summary

I successfully built a man-in-the-middle BLE bridge using two ESP32 microcontrollers to intercept all communication between a Battery Guard device and its iOS app. The system captures encrypted voltage/temperature data in real-time.

**Key Achievements:**
- ✅ Complete GATT profile mapped
- ✅ AES-128 ECB encryption confirmed
- ✅ Session handshake protocol documented
- ✅ 57.7M+ decryption attempts (all failed)
- ✅ Identified session nonce mechanism
- ✅ Discovered 128-byte key material exchange
- ⚡ **BREAKTHROUGH: Proved device MAC NOT in key (MAC nibble test)**

**Current Challenge:** Decompile mobile app to extract key derivation algorithm and hardcoded secret.

---

## 🔧 Hardware Setup

**The Bridge System:**

```
ESP32 #1 (CLIENT)  ←→  Real Battery Guard Device (50:54:7B:81:5A:FB)
       ↕ (Serial2)
ESP32 #2 (SERVER)  ←→  iOS App
```

**Wiring:**
- ESP32 #1 GPIO16 (RX2) → ESP32 #2 GPIO17 (TX2)
- ESP32 #1 GPIO17 (TX2) → ESP32 #2 GPIO16 (RX2) 
- ESP32 #1 GND → ESP32 #2 GND

**How It Works:**
1. ESP32 #1 connects to real Battery Guard via BLE
2. ESP32 #2 emulates Battery Guard for the app
3. All traffic flows through Serial2 link (115200 baud)
4. Both ESP32s log full hex dumps to USB serial monitors
5. Perfect bidirectional traffic capture!

---

## 📡 BLE Protocol Breakdown

**Main Service: 0xFFF0**
- **0xfff3 (WRITE):** Command characteristic - app sends 16-byte commands
- **0xfff4 (NOTIFY):** Data characteristic - device sends encrypted notifications (~1 Hz)

**Device Information:**
- Device Name: "Battery Guard"
- MAC Address: 50:54:7B:81:5A:FB
- Serial Number: Same as MAC (printed on device!)
- System ID: FB 5A 81 00 00 7B 54 50 (reversed MAC with padding)

**Important Discovery:** The app validates the device by reading **System ID (0x2a23)**, NOT by checking the BLE MAC address! This is why the bridge works - the ESP32 SERVER's MAC doesn't matter because it forwards the System ID read to the real device, which responds with the correct serial number. The app only cares that System ID matches the configured device serial.

---

## 🔐 Encryption Analysis

**Confirmed Facts:**
- Algorithm: **AES-128 ECB mode** (16-byte blocks)
- Key Length: 128 bits (16 bytes)
- Notification Frequency: ~1000ms (1 Hz)
- Notification Size: 16 bytes (encrypted voltage/temperature)

**What Makes This Interesting:**

The protocol uses a **deterministic session key derivation**:
- 5 of 6 handshake commands are CONSTANT (device-specific)
- Write #4 is VARIABLE (session nonce - changes per connection)
- Same Write #4 = Same encryption key (NO key rotation!)
- This means replay attacks work!

---

## 🎯 The Handshake Protocol

When the app connects, it sends **6 write commands** (all 16 bytes):

**Write Commands:**

Write #1: 1A D6 F0 5E 49 90 AB 24 B8 4D 57 DF 81 D8 76 6E  ← CONSTANT
Write #2: B4 F4 D8 C9 63 F0 41 00 E0 3F E4 AC 72 8A 59 20  ← CONSTANT
Write #3: EC 8C 75 2B D2 9E 70 81 23 A4 98 4A 69 C4 44 2E  ← CONSTANT
Write #4: [CHANGES PER SESSION - SESSION NONCE]            ← VARIABLE
Write #5: D3 90 BF 65 D7 D8 57 43 6E 94 71 04 2F 85 45 6F  ← CONSTANT
Write #6: 69 7E A0 B5 D5 4C F0 24 E7 94 77 23 55 55 41 14  ← CONSTANT

**Critical Discovery:**
Write #4 is the only variable command! It acts as a session challenge/nonce. When I captured multiple sessions, I confirmed:
- Same Write #4 = Identical encrypted notifications
- Different Write #4 = Different encryption
- No time-based key rotation

This is a **deterministic key derivation** - perfect for reverse engineering once we find the algorithm!

---

## 📦 The 160-Byte Mystery

After Write #3 and Write #4, the device sends special **160-byte notifications** (not the usual 16-byte ones):

**Structure Breakdown:**

*Common Header (80 bytes):* Same in both notifications
```
E9 E2 BA 43 A6 3C 0B 5B 6A F0 4A 3C 66 09 3E 70
E3 3C 44 58 BD 4A 42 5D B3 90 DB F4 CD B0 0C CA
58 CA 96 B4 1A 3B 90 4E 9F 36 93 39 F2 A3 38 6E
4F 2E 1E 90 F9 15 7C B0 4F 4C 96 A5 99 73 A6 49
89 73 61 A3 7C BF EE 3C EF 8A AA BA E7 AB BC 94
```

*After Write #3:* 48 bytes unique key material + 32 bytes padding
```
0A 47 50 A8 36 E7 C6 0E 03 FF AE C7 CB EB 61 F7
96 08 A9 27 2F 79 7A 44 2C F6 73 88 67 98 F2 36
35 A1 39 AA EC 53 76 68 02 44 F7 AF 76 F6 4D 0F
[+ padding: 48 5E E1 04... repeated 2×]
```

*After Write #4:* No unique data, just 80 bytes padding
```
[Padding: 48 5E E1 04 0E 6F F0 6D B4 09 A8 43 83 D5 5C 8E repeated 5×]
```

**Analysis:**
- Total unique cryptographic material = **128 bytes** (80 + 48)
- Matches AES-128 key length perfectly!
- Write #3 response contains the key material
- Write #4 response is just confirmation/acknowledgment

---

## 🔬 Decryption Attempts (All Failed)

**What I've Tested:**

1. **MAC Address Permutations:** 57,657,600 keys
   - Direct MAC, reversed, with/without colons, upper/lower case
   - Result: ❌ 0 matches

2. **Hash-Based Keys:** 88 variants
   - MD5, SHA1, SHA256, SHA512 of MAC/serial
   - With salts, prefixes, suffixes
   - Result: ❌ 0 matches

3. **160-Byte Notification Data:** 179 candidates
   - All 16-byte segments from 160-byte packets
   - XOR combinations, hash derivatives
   - Result: ❌ 0 matches

4. **Direct 128-Byte Test:** 8 key candidates
   - All 16-byte segments from unique 128 bytes
   - Tested against known encrypted patterns
   - Result: ❌ No valid decryption

5. **Dictionary Attacks:** 34 common patterns
   - "password", device serial, manufacturer codes
   - Result: ❌ 0 matches

**Conclusion:** The AES key is **derived** through a custom algorithm, not directly copied from any traffic data.

---

## ⚡ BREAKTHROUGH: MAC Nibble Test (Feb 4, 2026)

**The Test:**
To determine if the device MAC address is part of the encryption key, I modified the ESP32 SERVER to report a different System ID:
- **Original:** FB 5A 81 00 00 7B 54 50 (serial: 50547B815AFB)
- **Modified:** FC 5A 81 00 00 7B 54 50 (serial: 50547B815AFC)
- Configured the app with the modified serial: **50547B815AFC**

**Expected Outcomes:**
- ✅ If encryption **works**: Key is 100% app-generated
- ⚠️ If encryption **breaks**: Device MAC is part of key derivation
- 🚫 If app **rejects**: Different validation mechanism

**Result:** ✅ **APP CONNECTED AND DISPLAYED CORRECT DECRYPTED VALUES!**

**What This Proves:**
1. **Device MAC is NOT part of encryption key** - All 57.7M+ MAC-based attempts were wrong direction
2. **Key is 100% app-generated** - Derived from handshake commands + app secret
3. **MAC/serial is only for validation** - System ID read (0x2a23) validates device, doesn't affect encryption
4. **App extraction is MANDATORY** - The key derivation algorithm lives entirely in the app code

**Updated Key Derivation Formula:**
```
SessionKey = DeriveKey(
    Write#1 (const),
    Write#2 (const),
    Write#3 (const),
    Write#4 (nonce),
    Write#5 (const),
    Write#6 (const),
    160-byte-response (128 unique bytes),
    [HARDCODED_APP_SECRET]  ← This is what we need to find!
)
```

This single test saved potentially months of hardware-based cryptanalysis. The path forward is clear: decompile the app!

---

## 📱 Next Steps: App Extraction Required

Since traffic analysis is exhausted, the only way forward is to extract and decompile the mobile app:

**Plan:**
1. Download APK from Google Play (or IPA from iOS)
2. Decompile with jadx-gui (Android) or similar tool
3. Search for:
   - AES key derivation functions
   - References to "0xfff3", "0xfff4" characteristics
   - Encryption/decryption code
   - Session key generation

**What We're Looking For:**
```
SessionKey = DeriveKey(
    Write#1 (const),
    Write#2 (const),
    Write#3 (const),
    Write#4 (nonce),
    Write#5 (const),
    Write#6 (const),
    160-byte-header (80 bytes),
    Write#3-response-unique (48 bytes),
    DeviceMAC
)
```

The algorithm is deterministic (proven by reproducible encryption), so once we find it in the app code, we can decrypt all captured traffic!

---

## 🎓 Lessons Learned

1. **ESP32 is perfect for BLE MITM** - NimBLE library handles everything
2. **Serial2 link is reliable** - No packet loss at 115200 baud
3. **Deterministic crypto is good for RE** - Reproducible results help analysis
4. **Traffic analysis has limits** - Eventually you need the source code
5. **Documentation is crucial** - Capturing 3 sessions revealed the Write #4 pattern

---

## 📂 Project Files

All code and documentation available:
- `main.cpp` - 600+ lines of commented ESP32 bridge code
- `platformio.ini` - Build config with configurable device MAC
- `README.md` - Complete setup guide with ASCII hardware diagram
- `PROTOCOL_ANALYSIS.md` - Detailed protocol documentation
- `OBSERVATIONS.md` - Research notes and findings

The bridge works perfectly - it's a solid foundation for anyone doing BLE reverse engineering!

---

## 🤔 Questions for the Community

1. **Has anyone analyzed this device or similar ones?**
   - Brand: "Battery Guard" / "intAct Battery Check"
   - Vendor ID: 0x07D7
   - Looking for APK or key derivation info

2. **Better cryptanalysis approaches?**
   - Should I try known-plaintext attacks?
   - Any other AES ECB vulnerabilities to exploit?

3. **App extraction tips?**
   - Best tools for iOS IPA extraction without jailbreak?
   - Recommended decompilers for finding crypto code?

---

**Thanks for reading!** Any suggestions or collaboration offers are welcome. This has been a fun project and I'm determined to crack this encryption! 🔓

---

*Last Updated: February 4, 2026* 
*Status: Awaiting app extraction - all documentation complete*
#18
Sonstige Systeme / Aw: Support-Thread Modul 36_Sh...
Letzter Beitrag von Bartimaus - 04 Februar 2026, 10:16:29
Moin,

ich habe meine Shellies so konfiguriert, das sie ein Statusupdate an FHEM senden, sobald ich den mechanischen Schalter betätige.
Seit der neuen ShellyVersion bekomme ich jedesmal im FHEM-Log folgenden Hinweis:

2026.02.02 23:01:00.214 1: (Shelly_Set:button) Licht.Aussen Error: 'command not allowed/no channels of this type (-1)', state is set to 'Error'
2026.02.02 23:01:00.129 3: [Shelly_response:onoff] Successfull, device Licht.Aussen was on

Dann habe ich die alte ShellyVersion wieder eingespielt, und die Fehlermeldungen verschwinden wieder.
JFYI.

Wenn weitere Infos gewünscht werden, bitte melden
#19
FHEMWEB / Aw: Icons bei style "dark" & f...
Letzter Beitrag von rudolfkoenig - 04 Februar 2026, 10:13:05
Das images Verzeichnis verwaltet Wuppi68, und er ueberwacht die "Nachbar"-Diskussion mit dem Betreff Icons.
Ich wuerde das Problem da nochmal platzieren.
#20
Anfängerfragen / Aw: aktuelles Logfile fehlt
Letzter Beitrag von betateilchen - 04 Februar 2026, 10:06:01
Zitat von: KNUT345 am 04 Februar 2026, 09:55:13das Logfile ist da

Das ist erstmal nur eine Behauptung, mehr nicht.

Schau bitte auf dem Dateisystem nach, ob es die Datei wirklich gibt und - wenn ja - was da drinsteht.
Die Angabe in dem Internal ist lediglich der Name der von FHEM ermittelten Logdatei, die verwendet werden sollte. Man kann daraus nicht ableiten, ob diese benannte Datei tatsächlich existiert.