Hauptmenü

Neueste Beiträge

#91
TabletUI / Aw: Warum doppeltes Event beim...
Letzter Beitrag von setstate - 24 März 2025, 19:30:10
ich vermute du hast irgendwo ein zweites <ftui-popup id="pop_test" im Code. Eventuell per Content reingekommen?
#92
MQTT / Modul 00_MQTT lässt Fhem nicht...
Letzter Beitrag von maci - 24 März 2025, 19:17:48
Nach dem ich eines meiner Fhem Instanzen neu installieren musste, bin ich heute draufgekommen, dass das Modul 00_MQTT.pm verhindert dass Fhem neu startet.
Das ganze ist mir erst aufgefallen, als ich den Server neu gestartet habe.
Im Fhem Log waren zu hauf Fehlermeldungen über MQTT.
So sah mein Log aus.
PERL WARNING: Subroutine Notify redefined at ./FHEM/00_MQTT.pm line 372, <$fh> line 3487.
2025.03.24 16:56:13.803 1: PERL WARNING: Subroutine Attr redefined at ./FHEM/00_MQTT.pm line 380, <$fh> line 3487.
2025.03.24 16:56:13.803 1: PERL WARNING: Subroutine Start redefined at ./FHEM/00_MQTT.pm line 413, <$fh> line 3487.
2025.03.24 16:56:13.803 1: PERL WARNING: Subroutine Stop redefined at ./FHEM/00_MQTT.pm line 431, <$fh> line 3487.
2025.03.24 16:56:13.803 1: PERL WARNING: Subroutine Ready redefined at ./FHEM/00_MQTT.pm line 450, <$fh> line 3487.
2025.03.24 16:56:13.803 1: PERL WARNING: Subroutine Rename redefined at ./FHEM/00_MQTT.pm line 457, <$fh> line 3487.
2025.03.24 16:56:13.803 1: PERL WARNING: Subroutine Init redefined at ./FHEM/00_MQTT.pm line 467, <$fh> line 3487.
2025.03.24 16:56:13.803 1: PERL WARNING: Subroutine Timer redefined at ./FHEM/00_MQTT.pm line 477, <$fh> line 3487.
2025.03.24 16:56:13.804 1: PERL WARNING: Subroutine Read redefined at ./FHEM/00_MQTT.pm line 500, <$fh> line 3487.
2025.03.24 16:56:13.804 1: PERL WARNING: Subroutine send_connect redefined at ./FHEM/00_MQTT.pm line 651, <$fh> line 3487.
2025.03.24 16:56:13.804 1: PERL WARNING: Subroutine send_publish redefined at ./FHEM/00_MQTT.pm line 664, <$fh> line 3487.
2025.03.24 16:56:13.804 1: PERL WARNING: Subroutine send_subscribe redefined at ./FHEM/00_MQTT.pm line 676, <$fh> line 3487.
2025.03.24 16:56:13.804 1: PERL WARNING: Subroutine send_unsubscribe redefined at ./FHEM/00_MQTT.pm line 683, <$fh> line 3487.
2025.03.24 16:56:13.804 1: PERL WARNING: Subroutine send_ping redefined at ./FHEM/00_MQTT.pm line 690, <$fh> line 3487.
2025.03.24 16:56:13.804 1: PERL WARNING: Subroutine send_disconnect redefined at ./FHEM/00_MQTT.pm line 694, <$fh> line 3487.
2025.03.24 16:56:13.804 1: PERL WARNING: Subroutine send_message redefined at ./FHEM/00_MQTT.pm line 701, <$fh> line 3487.
2025.03.24 16:56:13.805 1: PERL WARNING: Subroutine topic_to_regexp redefined at ./FHEM/00_MQTT.pm line 716, <$fh> line 3487.
2025.03.24 16:56:13.805 1: PERL WARNING: Subroutine client_subscribe_topic redefined at ./FHEM/00_MQTT.pm line 727, <$fh> line 3487.
2025.03.24 16:56:13.805 1: PERL WARNING: Subroutine client_unsubscribe_topic redefined at ./FHEM/00_MQTT.pm line 746, <$fh> line 3487.
2025.03.24 16:56:13.805 1: PERL WARNING: Subroutine Client_Define redefined at ./FHEM/00_MQTT.pm line 763, <$fh> line 3487.
2025.03.24 16:56:13.805 1: PERL WARNING: Subroutine Client_Undefine redefined at ./FHEM/00_MQTT.pm line 779, <$fh> line 3487.
2025.03.24 16:56:13.805 1: PERL WARNING: Subroutine client_attr redefined at ./FHEM/00_MQTT.pm line 784, <$fh> line 3487.
2025.03.24 16:56:13.806 1: PERL WARNING: Subroutine notify_client_connected redefined at ./FHEM/00_MQTT.pm line 898, <$fh> line 3487.
2025.03.24 16:56:13.806 1: PERL WARNING: Subroutine notify_client_disconnected redefined at ./FHEM/00_MQTT.pm line 903, <$fh> line 3487.
2025.03.24 16:56:13.806 1: PERL WARNING: Subroutine notify_client_connection_timeout redefined at ./FHEM/00_MQTT.pm line 908, <$fh> line 3487.
2025.03.24 16:56:13.806 1: PERL WARNING: Subroutine client_start redefined at ./FHEM/00_MQTT.pm line 913, <$fh> line 3487.
2025.03.24 16:56:13.806 1: PERL WARNING: Subroutine client_stop redefined at ./FHEM/00_MQTT.pm line 945, <$fh> line 3487.
Undefined subroutine &MQTT::DEVICE::client_attr called at ./FHEM/10_MQTT_DEVICE.pm line 233, <$fh> line 3489.
Das ist nur ein Auszug, in Wirklichkeit waren das ca 300 Zeilen.
Habe dann das Modul aus dem Ordner FHEM entfernt.
Dann startete Fhem wieder. Nur MQTT fehlt jetzt.

Mit MQTT2 habe ich nichts gar nichts gemacht.
Was muss ich da machen, damit ich wieder Werte bekomme?
#93
Zigbee / Aw: tradfri-fhem tester gesuch...
Letzter Beitrag von Paradisebaker - 24 März 2025, 19:15:28
Mich würde es auch interessieren, wie man den Dirigera einbinden könnte.
Habe bisher HM im Einsatz, aber für Schaltsteckdosen mit Verbrauchsmessung kosten die das 4-fache von den IKEA Inspelning.
Wäre also für die Zukunft recht attraktiv, vor allem weil ich mir die Umstellung auf HM-IP sparen könnte ;)
#94
Solaranlagen / Aw: [98_fronius.pm] Fronius AP...
Letzter Beitrag von Paradisebaker - 24 März 2025, 19:03:29
Noch ein update hinterher, nachdem das jetzt so schön funktioniert hat, war ich so mutig, gleich wieder mal auf die neueste 1.35.8-1 zu gehen.
und alles funktioniert immer noch, war also wirklich nur der redirect zu https.
@fichtennadel, für mich funktioniert das jetzt so, aber evtl kannst du für zukünftige Versionen von deinem modul ein attribut "HTTPS" einbauen?
Ich bin mir relativ sicher, dass andere auch noch darüber stolpern.
Hier die Zeilen, wo ich http mit https ersetzt habe:

  # JSON Auswertung
  if ($type eq "GetAPIVersionInfo") {
    $SendUrl   = "https://" . $hash->{helper}{VARS}{FroniusIP} . "/solar_api/GetAPIVersion.cgi";
  }
  elsif ($type eq "GetPowerFlowRealtimeData") {
    $SendUrl   = "https://" . $hash->{helper}{VARS}{FroniusIP} . $hash->{helper}{VARS}{FroniusBaseURL} . "GetPowerFlowRealtimeData.fcgi";
  }
  elsif ($type eq "GetStorageRealtimeData") {
    $SendUrl   = "https://" . $hash->{helper}{VARS}{FroniusIP} . $hash->{helper}{VARS}{FroniusBaseURL} . "GetStorageRealtimeData.cgi?Scope=System&DeviceId=$SendData";
  }
  elsif ($type eq "GetMeterRealtimeData") {
    $SendUrl   = "https://" . $hash->{helper}{VARS}{FroniusIP} . $hash->{helper}{VARS}{FroniusBaseURL} . "GetMeterRealtimeData.cgi?Scope=System&DeviceId=$SendData";
  }
  elsif ($type eq "GetActiveDeviceInfo") {
    $SendUrl   = "https://" . $hash->{helper}{VARS}{FroniusIP} . $hash->{helper}{VARS}{FroniusBaseURL} . "GetActiveDeviceInfo.cgi?DeviceClass=System";
  }
  elsif ($type eq "GetInverterRealtimeData_System") {
    $SendUrl   = "https://" . $hash->{helper}{VARS}{FroniusIP} . $hash->{helper}{VARS}{FroniusBaseURL} . "GetInverterRealtimeData.cgi?Scope=System";
  }
  elsif ($type eq "GetInverterRealtimeData_Cumulation") {
    $SendUrl   = "https://" . $hash->{helper}{VARS}{FroniusIP} . $hash->{helper}{VARS}{FroniusBaseURL} . "GetInverterRealtimeData.cgi?Scope=Device&DeviceId=$SendData&DataCollection=CumulationInverterData";
  }
  elsif ($type eq "GetInverterRealtimeData_Common") {
    $SendUrl   = "https://" . $hash->{helper}{VARS}{FroniusIP} . $hash->{helper}{VARS}{FroniusBaseURL} . "GetInverterRealtimeData.cgi?Scope=Device&DeviceId=$SendData&DataCollection=CommonInverterData";
  }
  elsif ($type eq "GetInverterRealtimeData_3P") {
    $SendUrl   = "https://" . $hash->{helper}{VARS}{FroniusIP} . $hash->{helper}{VARS}{FroniusBaseURL} . "GetInverterRealtimeData.cgi?Scope=Device&DeviceId=$SendData&DataCollection=3PInverterData";
  }
  elsif ($type eq "GetArchiveData") {
    my $today = time;
    my $StartDate = strftime "%Y-%m-%dT%H:%M:00Z", gmtime($today - 300); # Fronius Solar API V1 Doku - "...intervals which can be set between 5 and 30 minutes..."
    my $EndDate = strftime "%Y-%m-%dT%H:%M:00Z", gmtime($today);
    $SendUrl   = "https://" . $hash->{helper}{VARS}{FroniusIP} . $hash->{helper}{VARS}{FroniusBaseURL} . "GetArchiveData.cgi?Scope=System&StartDate=$StartDate&EndDate=$EndDate&Channel=Current_DC_String_1&Channel=Current_DC_String_2&Channel=Voltage_DC_String_1&Channel=Voltage_DC_String_2&Channel=EnergyReal_WAC_Sum_Produced&Channel=EnergyReal_WAC_Minus_Absolute&Channel=EnergyReal_WAC_Plus_Absolute&Channel=PowerReal_PAC_Sum";
  }

LG
Markus
#95
TabletUI / Reproduzierbar: Doppeltes Even...
Letzter Beitrag von DocCyber - 24 März 2025, 18:55:00
Hallo zusammen.

Mittels einer Schaltfläche starte ich ein kleines Perl-Script, das verschiedene Einstellungen vornehmen soll. In diesem Script wird abschließend eine Steuervariable (popup_ctrl_test auf on) gesetzt, was den Popup-Dialog anzeigt [active]=... .
Über @close= ... wird die Steuervariable auf off gesetzt und dadurch der Dialog wieder geschlossen.
Das funktioniert alles ohne Probleme. Allerdings zeigen sowohl Event Monitor wie Toast-Messages, dass das Event zum Schließen stets doppelt ausgeführt wird.
2025-03-24 18:17:02 dummy popup_ctrl_test on
2025-03-24 18:17:06 dummy popup_ctrl_test off
2025-03-24 18:17:06 dummy popup_ctrl_test off
Du darfst diesen Dateianhang nicht ansehen.
Dabei spielt die "Schließmethode" keine Rolle: Click auf X, Click außerhalb des Dialogfensters, auch beim automatischen Schließen (wenn kein timeout gesetzt ist).
EDIT: Soeben ist mir noch aufgefallen, dass es ohne gesetztes timeout sogar ein drittes Event gibt, nämlich dann, wenn die Standardzeit (10s) abgelaufen ist und unabhängig davon, ob das Popup zuvor schon manuell geschlossen wurde.
2025-03-24 19:23:45 dummy popup_ctrl_test on   #Popup öffnen
2025-03-24 19:23:46 dummy popup_ctrl_test off       #Popup manuell schließen
2025-03-24 19:23:46 dummy popup_ctrl_test off       #zweiter Event (warum?)
2025-03-24 19:23:55 dummy popup_ctrl_test off       #dritter Event nach 10s (warum?)


Das hat zwar keinerlei weitere Auswirkungen, aber ich wüsste dennoch gern, warum das so ist und wie man das ggf. verhindern kann.
Hat jemand eine Idee? (@setstate vielleicht?)

Vielen Dank vorab.


Hier der lauffähige, aber vereinfachte Aufbau:
<ftui-grid base-width="26" base-height="26" margin="10">
  <ftui-grid-tile row="1" col="1" height="4" width="12">
    <ftui-button
      width="10em" height="2.25em" fill="outline" color="light" class="size-3"
      @click="sendFhem(`{dialogTest()}`)">Dialog Test
    </ftui-button>
  </ftui-grid-tile>
</ftui-grid>

<!-- Popup Test -->
<ftui-popup id="pop_test"
  [active]="popup_ctrl_test | map('on:true, off:false')"
  @close="sendFhem('set popup_ctrl_test off')">
  <header>
    <ftui-label text="Poupup-Dialog" size="3"></ftui-label>
  </header>
  <ftui-label text="Das ist ein Test" size="2"></ftui-label>
</ftui-popup>


sub dialogTest() {
  # setzt die Steuervariable für den TestDialog auf on
  # und ermöglicht öffnet so das Anzeigen des Dialogs
  fhem("set popup_ctrl_test on");
}
#96
Solaranlagen / Aw: [98_fronius.pm] Fronius AP...
Letzter Beitrag von Paradisebaker - 24 März 2025, 18:47:56
OK, anscheinend hat meine simple Änderung im 98_fronius.pm funktioniert, ich hab einfach alle http:// , die was mit dem WR zu tun haben könnten, mit https:// ersetzt.
Die readings sind wieder da und der Fronius geht auch nicht mehr auf disconnected, nach einem shutdown restart gibt es auch keine errors mehr im log.
#97
Sonstige Systeme / Aw: Neues Modul: Tado Heizungs...
Letzter Beitrag von Kokolores - 24 März 2025, 18:41:06
Hallo,

Danke für die Änderungen im Modul. Leider habe ich Probleme mit der angepassten Version. Habe mich daher nun im Forum angemeldet - Mitleser bin ich seit Jahren.

reload 98_Tado wirft das hier:

Can't modify numeric lt (<) in scalar assignment at ./FHEM/98_Tado.pm line 11, near "data"
syntax error at ./FHEM/98_Tado.pm line 11, near "data"
Unknown regexp modifier "/j" at ./FHEM/98_Tado.pm line 42, at end of line
Unknown regexp modifier "/v" at ./FHEM/98_Tado.pm line 42, at end of line
Unknown regexp modifier "/r" at ./FHEM/98_Tado.pm line 42, at end of line
Unknown regexp modifier "/t" at ./FHEM/98_Tado.pm line 42, at end of line
Unknown regexp modifier "/t" at ./FHEM/98_Tado.pm line 42, at end of line
Unknown regexp modifier "/h" at ./FHEM/98_Tado.pm line 42, at end of line
Unknown regexp modifier "/b" at ./FHEM/98_Tado.pm line 42, at end of line
Unknown regexp modifier "/t" at ./FHEM/98_Tado.pm line 43, at end of line
./FHEM/98_Tado.pm has too many errors.
#98
Klar,
Entweder könnte man in dem SVG den String von "rssi" auf dein Reading "rssipeer" ändern,
oder du machst dir einfach ein Reading das "rssi" heißt, indem du ein UserReading an deinem Device hinzufügst. Das macht nichts besonderes außer den Wert von "rssipeer" auf das zusätzliche Reading "rssi" zu kopieren:

Ungeprüft runtergeschrieben, bitte ggf. korrigieren:
attr deinDeviceName userReadings rssi:rssipeer:.* { return ReadingsNum($name, 'rssipeer', 0); }

Ich würde das userReading als Erstes ausprobieren, das ist am schnellsten gemacht.
#99
Oh,
ich hatte gedacht ich könnte es einfach "zweckentfremden". In den Homematic-Devices gibt es hier natürlich kein entsprechendes Reading...
Wäre es denn möglich das SVG und den devStateIcon-Eintrag allgemeingültig für alle Devices mit RSSI-Wert zu machen?
#100
Solaranlagen / Aw: [98_fronius.pm] Fronius AP...
Letzter Beitrag von Paradisebaker - 24 März 2025, 18:13:37
Hallo Fichtennadel

Sorry für die späte Antwort, die Chefin hat mich zur Gartenarbeit verdonnert......
Habe folgende Einträge im FHEM log, ich würde jetzt mal annehmen, dass es am http vs. https liegen könnte?
(Die public IP bitte ignorieren, ist eine Besonderheit in meinem LAN, wird nur intern benutzt)

LG
Markus



2025.03.24 18:06:00 3: [GEN24] [fronius_Parse] [GetPowerFlowRealtimeData] ERROR=http://165.114.160.1/solar_api/v1/GetPowerFlowRealtimeData.fcgi: Too many redirects
2025.03.24 18:06:00 1: PERL WARNING: Argument "" isn't numeric in numeric gt (>) at (eval 2203) line 1.
2025.03.24 18:06:00 3: eval: {sprintf("%.0f",(ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1","")>0?ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1",""):0))}
2025.03.24 18:06:02 3: [GEN24] [fronius_Parse] [GetStorageRealtimeData] ERROR=http://165.114.160.1/solar_api/v1/GetStorageRealtimeData.cgi?Scope=System&DeviceId=0: Too many redirects
2025.03.24 18:06:02 1: PERL WARNING: Argument "" isn't numeric in numeric gt (>) at (eval 2213) line 1.
2025.03.24 18:06:02 3: eval: {sprintf("%.0f",(ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1","")>0?ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1",""):0))}
2025.03.24 18:06:04 3: [GEN24] [fronius_Parse] [GetMeterRealtimeData] ERROR=http://165.114.160.1/solar_api/v1/GetMeterRealtimeData.cgi?Scope=System&DeviceId=0: Too many redirects
2025.03.24 18:06:04 1: PERL WARNING: Argument "" isn't numeric in numeric gt (>) at (eval 2224) line 1.
2025.03.24 18:06:04 3: eval: {sprintf("%.0f",(ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1","")>0?ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1",""):0))}
2025.03.24 18:06:06 3: [GEN24] [fronius_Parse] [GetInverterRealtimeData_System] ERROR=http://165.114.160.1/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System: Too many redirects
2025.03.24 18:06:06 1: PERL WARNING: Argument "" isn't numeric in numeric gt (>) at (eval 2234) line 1.
2025.03.24 18:06:06 3: eval: {sprintf("%.0f",(ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1","")>0?ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1",""):0))}
2025.03.24 18:06:06 3: [GEN24] [fronius_Parse] [GetInverterRealtimeData_3P] ERROR=http://165.114.160.1/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=3PInverterData: Too many redirects
2025.03.24 18:06:06 1: PERL WARNING: Argument "" isn't numeric in numeric gt (>) at (eval 2244) line 1.
2025.03.24 18:06:06 3: eval: {sprintf("%.0f",(ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1","")>0?ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1",""):0))}
2025.03.24 18:06:06 3: [GEN24] [fronius_Parse] [GetInverterRealtimeData_Common] ERROR=http://165.114.160.1/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData: Too many redirects
2025.03.24 18:06:06 1: PERL WARNING: Argument "" isn't numeric in numeric gt (>) at (eval 2254) line 1.
2025.03.24 18:06:06 3: eval: {sprintf("%.0f",(ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1","")>0?ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1",""):0))}
2025.03.24 18:06:06 3: [GEN24] [fronius_Parse] [GetInverterRealtimeData_Cumulation] ERROR=http://165.114.160.1/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CumulationInverterData: Too many redirects
2025.03.24 18:06:06 1: PERL WARNING: Argument "" isn't numeric in numeric gt (>) at (eval 2264) line 1.
2025.03.24 18:06:06 3: eval: {sprintf("%.0f",(ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1","")>0?ReadingsVal("GEN24","PowerFlow_TOTAL_ENERGY_Values_1",""):0))}