Felhler im php.log

Allgemeine Informationen zum Nachbau und zum Forum.
PV-Monitorung / PV Überwachung

Moderator: Ulrich

Antworten
Snoopy
Beiträge: 104
Registriert: So 27. Mär 2022, 12:48
Hat sich bedankt: 1 Mal
Danksagung erhalten: 5 Mal

Felhler im php.log

Beitrag von Snoopy »

Hallo,

ich habe folgenden Fehler nach einer Neuinstallation in dem php.log gefunden.

Code: Alles auswählen

[06-Jul-2022 17:47:46 Europe/Berlin] PHP Warning:  sleep() expects parameter 1 to be int, float given in /var/www/html/huawei_LAN.php on line 336
[06-Jul-2022 17:48:46 Europe/Berlin] PHP Warning:  Division by zero in /var/www/html/huawei_LAN.php on line 334
[06-Jul-2022 17:48:46 Europe/Berlin] PHP Warning:  Division by zero in /var/www/html/huawei_LAN.php on line 335
[06-Jul-2022 17:48:46 Europe/Berlin] PHP Warning:  Division by zero in /var/www/html/huawei_LAN.php on line 336
[06-Jul-2022 17:48:46 Europe/Berlin] PHP Warning:  sleep() expects parameter 1 to be int, float given in /var/www/html/huawei_LAN.php on line 336
[06-Jul-2022 17:49:47 Europe/Berlin] PHP Warning:  Division by zero in /var/www/html/huawei_LAN.php on line 334
[06-Jul-2022 17:49:47 Europe/Berlin] PHP Warning:  Division by zero in /var/www/html/huawei_LAN.php on line 335
[06-Jul-2022 17:49:47 Europe/Berlin] PHP Warning:  Division by zero in /var/www/html/huawei_LAN.php on line 336
[06-Jul-2022 17:49:47 Europe/Berlin] PHP Warning:  sleep() expects parameter 1 to be int, float given in /var/www/html/huawei_LAN.php on line 336
[06-Jul-2022 17:50:47 Europe/Berlin] PHP Warning:  Division by zero in /var/www/html/huawei_LAN.php on line 334
[06-Jul-2022 17:50:47 Europe/Berlin] PHP Warning:  Division by zero in /var/www/html/huawei_LAN.php on line 335
[06-Jul-2022 17:50:47 Europe/Berlin] PHP Warning:  Division by zero in /var/www/html/huawei_LAN.php on line 336
[06-Jul-2022 17:50:47 Europe/Berlin] PHP Warning:  sleep() expects parameter 1 to be int, float given in /var/www/html/huawei_LAN.php on line 336
Das ist der Auszug aus dem huawei_LAN.php script wo der Fehler sein sollte.

Code: Alles auswählen

if (floor(((9*$i) - (time() - $Startzeit)) / ($Wiederholungen - $i+1)) > 0) {
      $funktionen->log_schreiben("Schleife: ".($i)." Zeitspanne: ".(floor(((9*$i) - (time() - $Startzeit))/($Wiederholungen-$i+1))),"   ",3);
      sleep(floor(((9*$i) - (time() - $Startzeit)) / ($Wiederholungen - $i+1)));


Ich hoffe jemand kann mir helfen.

Grüße

Benutzeravatar
Ulrich
Administrator
Beiträge: 5560
Registriert: Sa 7. Nov 2015, 10:33
Wohnort: Essen
Hat sich bedankt: 154 Mal
Danksagung erhalten: 883 Mal
Kontaktdaten:

Re: Felhler im php.log

Beitrag von Ulrich »

Was steht in der user.config.php hinter der Variable "$Wiederholungen = "?

Dort muss stehen:

$Wiederholungen = "1";
-----------------------------------------------------
Ulrich . . . . . . . . [Projekt Administrator]

Snoopy
Beiträge: 104
Registriert: So 27. Mär 2022, 12:48
Hat sich bedankt: 1 Mal
Danksagung erhalten: 5 Mal

Re: Felhler im php.log

Beitrag von Snoopy »

Hallo,
dort habe ich eine 6 stehen für 6 abfragen pro Minute wie es beschrieben ist.

Grüße

Benutzeravatar
Ulrich
Administrator
Beiträge: 5560
Registriert: Sa 7. Nov 2015, 10:33
Wohnort: Essen
Hat sich bedankt: 154 Mal
Danksagung erhalten: 883 Mal
Kontaktdaten:

Re: Felhler im php.log

Beitrag von Ulrich »

Huawei LAN ist so langsam, dass in einer Minute nur eine Abfrage möglich ist. Bitte 1 eintragen.
-----------------------------------------------------
Ulrich . . . . . . . . [Projekt Administrator]

Snoopy
Beiträge: 104
Registriert: So 27. Mär 2022, 12:48
Hat sich bedankt: 1 Mal
Danksagung erhalten: 5 Mal

Re: Felhler im php.log

Beitrag von Snoopy »

Hallo,

ich habe noch eine Anlage wo die Solaranzeige läuft und da habe ich das Problem nicht. Aber ich werde trotzdem das mal auf 1 setzen.

Jetzt habe ich in der Anlage gesehen das noch ein Fehler da ist.

Code: Alles auswählen

[07-Jul-2022 16:01:03 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:01:03 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:02:04 Europe/Berlin] PHP Notice:  Undefined variable: Ergebnis in /var/www/html/automation.php on line 809
[07-Jul-2022 16:02:04 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:02:04 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:03:03 Europe/Berlin] PHP Notice:  Undefined variable: Ergebnis in /var/www/html/automation.php on line 809
[07-Jul-2022 16:03:03 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:03:03 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:04:04 Europe/Berlin] PHP Notice:  Undefined variable: Ergebnis in /var/www/html/automation.php on line 809
[07-Jul-2022 16:04:04 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:04:04 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:05:03 Europe/Berlin] PHP Notice:  Undefined variable: Ergebnis in /var/www/html/automation.php on line 809
[07-Jul-2022 16:05:03 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:05:03 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:06:04 Europe/Berlin] PHP Notice:  Undefined variable: Ergebnis in /var/www/html/automation.php on line 809
[07-Jul-2022 16:06:04 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:06:04 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:07:03 Europe/Berlin] PHP Notice:  Undefined variable: Ergebnis in /var/www/html/automation.php on line 809
[07-Jul-2022 16:07:03 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:07:03 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:08:04 Europe/Berlin] PHP Notice:  Undefined variable: Ergebnis in /var/www/html/automation.php on line 809
[07-Jul-2022 16:08:04 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:08:04 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:09:02 Europe/Berlin] PHP Notice:  Undefined variable: Ergebnis in /var/www/html/automation.php on line 809
[07-Jul-2022 16:09:02 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
[07-Jul-2022 16:09:02 Europe/Berlin] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/automation.php on line 1987
Läuft aber einwandfrei

Grüße

Benutzeravatar
Ulrich
Administrator
Beiträge: 5560
Registriert: Sa 7. Nov 2015, 10:33
Wohnort: Essen
Hat sich bedankt: 154 Mal
Danksagung erhalten: 883 Mal
Kontaktdaten:

Re: Felhler im php.log

Beitrag von Ulrich »

Der Fehler kommt von der Automation. Die scheint nicht ganz richtig konfiguriert zu sein.
-----------------------------------------------------
Ulrich . . . . . . . . [Projekt Administrator]

JoWi
Beiträge: 4
Registriert: Do 30. Jun 2022, 10:15

Re: Felhler im php.log

Beitrag von JoWi »

Ulrich hat geschrieben:
Mi 6. Jul 2022, 22:21
Huawei LAN ist so langsam, dass in einer Minute nur eine Abfrage möglich ist. Bitte 1 eintragen.
Leider habe ich das selbe Problem. Auch wenn ich die Abfrage auf 1 stelle habe ich im php.log folgende Fehlermeldung:
"[08-Sep-2022 17:23:50 Europe/Berlin] PHP Warning: Division by zero in /var/www/html/huawei_LAN.php on line 334"
Dort steht in der huawei_LAN.php:
"if (floor(((9*$i) - (time() - $Startzeit)) / ($Wiederholungen - $i+1)) > 0) {"

Die Solaranzeige.log zeigt folgendes:
"08.09. 17:39:01 |---------------- Start huawei_LAN.php -----------------------------
08.09. 17:39:13 -Fehler! Keine gültigen Daten empfangen.
08.09. 17:39:24 > -Gerätetyp: Modell ID: 0
08.09. 17:39:37 > -Alarm 1 Bits: 0000000000000000
08.09. 17:39:50 * -Daten zur lokalen InfluxDB [ solaranzeige ] gesendet.
08.09. 17:39:50 -OK. Datenübertragung erfolgreich.
08.09. 17:39:50 |---------------- Stop huawei_LAN.php --------------------------- "

Habt ihr eine Lösungsidee? Vielen Dank auf jeden Fall!
LG

Benutzeravatar
Ulrich
Administrator
Beiträge: 5560
Registriert: Sa 7. Nov 2015, 10:33
Wohnort: Essen
Hat sich bedankt: 154 Mal
Danksagung erhalten: 883 Mal
Kontaktdaten:

Re: Felhler im php.log

Beitrag von Ulrich »

Die Fehlermeldung besagt, dass dein Gerät nicht ausgelesen werden kann. Da scheint mit der Verbindung zum Wechselrichter etwas nicht zu stimmen.
-----------------------------------------------------
Ulrich . . . . . . . . [Projekt Administrator]

JoWi
Beiträge: 4
Registriert: Do 30. Jun 2022, 10:15

Re: Felhler im php.log

Beitrag von JoWi »

Vielen Dank. Welche Möglichkeiten gibt es, die Fehlerquelle genauer einzugrenzen? Der Dongle hat die Version PC129, Port 502 ist offen und ein ping funktioniert auch

Benutzeravatar
Ulrich
Administrator
Beiträge: 5560
Registriert: Sa 7. Nov 2015, 10:33
Wohnort: Essen
Hat sich bedankt: 154 Mal
Danksagung erhalten: 883 Mal
Kontaktdaten:

Re: Felhler im php.log

Beitrag von Ulrich »

Gebe einmal auf der Konsole folgendes ein:

nmap -p 502 <IP Adresse des Wechselrichters>

meldet sich der Port 502 mit OPEN
-----------------------------------------------------
Ulrich . . . . . . . . [Projekt Administrator]

Antworten

Zurück zu „Allgemeines“