Nachdem mein Pi3 verstorben ist, habe ich eine funktionierende Solaranzeige mit 4 Convertern (QinHeng Electronics CH340 serial converter)
versucht auf den neuen Pi4 zu bringen. Es hat alles problemlos nur konnte er die Converter nicht mehr finden.
Nach ner Woche, hab ich es dann mit der Solaranzeige V5.1.3.-64 Bit versucht. Leider auch kein Erfolg.
Ich hänge jetzt mal ein paar Codeschnitzel an.
Auszug aus der log.php
Code: Alles auswählen
10-Aug-2024 13:19:14 Europe/Berlin] PHP Warning: fopen(/dev/hauptzaehler): failed to open stream: No such file or directory in /var/www/html/phpinc/funktionen.inc.php on line 13
[10-Aug-2024 13:19:14 Europe/Berlin] PHP Warning: fopen(/dev/waermepumpe): failed to open stream: No such file or directory in /var/www/html/phpinc/funktionen.inc.php on line 13
[10-Aug-2024 13:19:14 Europe/Berlin] PHP Warning: fopen(/dev/heizstab): failed to open stream: No such file or directory in /var/www/html/phpinc/funktionen.inc.php on line 13
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 123
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 124
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 126
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 127
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 129
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 130
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 132
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 133
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 135
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 136
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 138
[10-Aug-2024 13:20:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 139
[10-Aug-2024 13:20:03 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 166
[10-Aug-2024 13:20:03 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 166
[10-Aug-2024 13:20:03 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 166
[10-Aug-2024 13:20:03 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 329
[10-Aug-2024 13:20:03 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 329
[10-Aug-2024 13:20:03 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 330
[10-Aug-2024 13:20:03 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 330
[10-Aug-2024 13:20:03 Europe/Berlin] PHP Warning: A non-numeric value encountered in /var/www/html/kostal_pico.php on line 330
[10-Aug-2024 13:20:14 Europe/Berlin] PHP Warning: fopen(/dev/hauptzaehler): failed to open stream: No such file or directory in /var/www/html/phpinc/funktionen.inc.php on line 13
[10-Aug-2024 13:20:14 Europe/Berlin] PHP Warning: fopen(/dev/waermepumpe): failed to open stream: No such file or directory in /var/www/html/phpinc/funktionen.inc.php on line 13
[10-Aug-2024 13:20:15 Europe/Berlin] PHP Warning: fopen(/dev/heizstab): failed to open stream: No such file or directory in /var/www/html/phpinc/funktionen.inc.php on line 13
Code: Alles auswählen
10.08. 13:33:01 -Multi Regler Auslesen [Start].
10.08. 13:33:01 -Verarbeitung von: '1.user.config.php' Regler: 21
10.08. 13:33:01 |---------------- Start kostal_piko.php ---------------------
10.08. 13:33:01 + -Die Daten werden ausgelesen...
10.08. 13:33:04 -InfluxDB => [ AC Spannung_R=0,Spannung_S=0,Spannung_T=0,Strom_R=0,Strom_S=0,Strom_T=0,Leistung_R=0,Leistung_S=,Leistung_T= 1723289591
PV String1_Spannung=0,String2_Spannung=0,String3_Spannung=0,String1_Strom=0,String2_Strom=0,String3_Strom=0,String1_Leistung=,String2_Leistung=,String3_Leistung=,String1_Nummer="1",String2_Nummer="2",String3_Nummer="3",Leistung=0 1723289591
Batterie Spannung=0,Strom=0,Leistung=0 1723289591
Service FehlerCode=,Status=,Fehler=,Strings=0,Phasen=0 1723289591
Summen Wh_Heute=0,Wh_Gesamt=0,AC_Leistung_Gesamt=0,PV_Leistung_Gesamt=0 1723289591
]
10.08. 13:33:04 -Daten nicht zur lokalen InfluxDB gesendet! info: array (
'url' => 'http://localhost/write?db=piko5_5&precision=s',
'content_type' => 'application/json',
'http_code' => 400,
'header_size' => 862,
'request_size' => 717,
'filetime' => -1,
'ssl_verify_result' => 0,
'redirect_count' => 0,
'total_time' => 0.008913,
'namelookup_time' => 0.001607,
'connect_time' => 0.002093,
'pretransfer_time' => 0.002202,
'size_upload' => 565.0,
'size_download' => 592.0,
'speed_download' => 74000.0,
'speed_upload' => 70625.0,
'download_content_length' => 592.0,
'upload_content_length' => 565.0,
'starttransfer_time' => 0.008859,
'redirect_time' => 0.0,
'redirect_url' => '',
'primary_ip' => '::1',
'certinfo' =>
array (
),
'primary_port' => 8086,
'local_ip' => '::1',
'local_port' => 55634,
'http_version' => 2,
'protocol' => 1,
'ssl_verifyresult' => 0,
'scheme' => 'HTTP',
'appconnect_time_us' => 0,
'connect_time_us' => 2093,
'namelookup_time_us' => 1607,
'pretransfer_time_us' => 2202,
'redirect_time_us' => 0,
'starttransfer_time_us' => 8859,
'total_time_us' => 8913,
)
10.08. 13:33:09 -InfluxDB => [ AC Spannung_R=0,Spannung_S=0,Spannung_T=0,Strom_R=0,Strom_S=0,Strom_T=0,Leistung_R=0,Leistung_S=,Leistung_T= 1723289591
PV String1_Spannung=0,String2_Spannung=0,String3_Spannung=0,String1_Strom=0,String2_Strom=0,String3_Strom=0,String1_Leistung=,String2_Leistung=,String3_Leistung=,String1_Nummer="1",String2_Nummer="2",String3_Nummer="3",Leistung=0 1723289591
Batterie Spannung=0,Strom=0,Leistung=0 1723289591
Service FehlerCode=,Status=,Fehler=,Strings=0,Phasen=0 1723289591
Summen Wh_Heute=0,Wh_Gesamt=0,AC_Leistung_Gesamt=0,PV_Leistung_Gesamt=0 1723289591
]
10.08. 13:33:09 -Daten nicht zur lokalen InfluxDB gesendet! info: array (
'url' => 'http://localhost/write?db=piko5_5&precision=s',
'content_type' => 'application/json',
'http_code' => 400,
'header_size' => 862,
'request_size' => 717,
'filetime' => -1,
'ssl_verify_result' => 0,
'redirect_count' => 0,
'total_time' => 0.011889,
'namelookup_time' => 0.000147,
'connect_time' => 0.000148,
'pretransfer_time' => 0.000379,
'size_upload' => 565.0,
'size_download' => 592.0,
'speed_download' => 53818.0,
'speed_upload' => 51363.0,
'download_content_length' => 592.0,
'upload_content_length' => 565.0,
'starttransfer_time' => 0.011764,
'redirect_time' => 0.0,
'redirect_url' => '',
'primary_ip' => '::1',
'certinfo' =>
array (
),
'primary_port' => 8086,
'local_ip' => '::1',
'local_port' => 55634,
'http_version' => 2,
'protocol' => 1,
'ssl_verifyresult' => 0,
'scheme' => 'HTTP',
'appconnect_time_us' => 0,
'connect_time_us' => 148,
'namelookup_time_us' => 147,
'pretransfer_time_us' => 379,
'redirect_time_us' => 0,
'starttransfer_time_us' => 11764,
'total_time_us' => 11889,
)
10.08. 13:33:14 -Multi-Regler-Ausgang. -4
10.08. 13:33:14 -OK. Datenübertragung erfolgreich.
10.08. 13:33:14 |---------------- Stop kostal_piko.php --------------------
10.08. 13:33:14 -Verarbeitung von: '2.user.config.php' Regler: 34
10.08. 13:33:14 + -WR_ID: 02
10.08. 13:33:14 |------------ Start SDM630_meter.php -- Regler 34 ------------
10.08. 13:33:14 XX -USB Port kann nicht geöffnet werden. [1]
10.08. 13:33:14 XX -Exit....
10.08. 13:33:14 |------------ Stop SDM630_meter.php -----------------------
10.08. 13:33:14 -Verarbeitung von: '3.user.config.php' Regler: 50
10.08. 13:33:14 |------------ Start SDM230_meter.php -------------------------
10.08. 13:33:14 XX -USB Port kann nicht geöffnet werden. [1]
10.08. 13:33:14 XX -Exit....
10.08. 13:33:14 |------------ Stop SDM230_meter.php -----------------------
10.08. 13:33:15 -Verarbeitung von: '4.user.config.php' Regler: 34
10.08. 13:33:15 + -WR_ID: 04
10.08. 13:33:15 |------------ Start SDM630_meter.php -- Regler 34 ------------
10.08. 13:33:15 XX -USB Port kann nicht geöffnet werden. [1]
10.08. 13:33:15 XX -Exit....
10.08. 13:33:15 |------------ Stop SDM630_meter.php -----------------------
10.08. 13:33:16 -Multi Regler Auslesen [Stop].
Code: Alles auswählen
pi@solaranzeige:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 006: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub]
Hier habe ich immer einen Converter hinzugefügt. Bei der 3. Abfrage wurde mir anstatt ttyUSB2 der USB0 angezeigt. ?
Code: Alles auswählen
pi@solaranzeige:~ $ ls -la /dev/serial/by-id/
insgesamt 0
drwxr-xr-x 2 root root 60 10. Aug 12:17 .
drwxr-xr-x 4 root root 80 10. Aug 12:17 ..
lrwxrwxrwx 1 root root 13 10. Aug 12:17 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0
pi@solaranzeige:~ $ udevadm info -a -n /dev/ttyUSB0 | grep '{devpath}' | head -n1
ATTRS{devpath}=="1.1.1"
pi@solaranzeige:~ $
----------------------------
pi@solaranzeige:~ $ ls -la /dev/serial/by-id/
insgesamt 0
drwxr-xr-x 2 root root 60 10. Aug 12:17 .
drwxr-xr-x 4 root root 80 10. Aug 12:17 ..
lrwxrwxrwx 1 root root 13 10. Aug 12:17 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB1
pi@solaranzeige:~ $ udevadm info -a -n /dev/ttyUSB1 | grep '{devpath}' | head -n1
ATTRS{devpath}=="1.1.2"
---------------------
pi@solaranzeige:~ $ ls -la /dev/serial/by-id/
insgesamt 0
drwxr-xr-x 2 root root 60 10. Aug 12:17 .
drwxr-xr-x 4 root root 80 10. Aug 12:17 ..
lrwxrwxrwx 1 root root 13 10. Aug 12:17 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0
pi@solaranzeige:~ $ udevadm info -a -n /dev/ttyUSB2 | grep '{devpath}' | head -n1
ATTRS{devpath}=="1.1.3"
-------------------------
pi@solaranzeige:~ $ ls -la /dev/serial/by-id/
insgesamt 0
drwxr-xr-x 2 root root 60 10. Aug 12:17 .
drwxr-xr-x 4 root root 80 10. Aug 12:17 ..
lrwxrwxrwx 1 root root 13 10. Aug 12:17 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB3
pi@solaranzeige:~ $ udevadm info -a -n /dev/ttyUSB3 | grep '{devpath}' | head -n1
ATTRS{devpath}=="1.1.4"
Code: Alles auswählen
pi@solaranzeige:~ $ udevadm info -a -n /dev/ttyUSB0 | grep '{devpath}' | head -n1
ATTRS{devpath}=="1.1.1"
pi@solaranzeige:~ $ udevadm info -a -n /dev/ttyUSB1 | grep '{devpath}' | head -n1
ATTRS{devpath}=="1.1.2"
pi@solaranzeige:~ $ udevadm info -a -n /dev/ttyUSB2 | grep '{devpath}' | head -n1
ATTRS{devpath}=="1.1.3"
pi@solaranzeige:~ $ udevadm info -a -n /dev/ttyUSB3 | grep '{devpath}' | head -n1
ATTRS{devpath}=="1.1.4"
Code: Alles auswählen
SUBSYSTEM=="tty", ATTRS{{devpath}=="1.1.1", SYMLINK+="piko5", OWNER="pi"
SUBSYSTEM=="tty", ATTRS{{devpath}=="1.1.2", SYMLINK+="hauptzaehler", OWNER="pi"
SUBSYSTEM=="tty", ATTRS{{devpath}=="1.1.3", SYMLINK+="waermepumpe", OWNER="pi"
SUBSYSTEM=="tty", ATTRS{{devpath}=="1.1.4", SYMLINK+="heizstab", OWNER="pi"
Code: Alles auswählen
/ USB Device USB Device USB Device USB Device USB Device
******************************************************************************/
//
// USB Device, die automatisch erkannt wurde... bitte nicht ändern
// Wird nicht bei der Multi-Regler-Version benötigt.
//
$USBRegler = "";
//
// Nur wenn die automatischer Erkennung nicht funktioniert hat, bitte manuell
// eintragen. Im Normalfall wird das nicht benötigt. So lassen wie es ist.
// --- Nur bei Multi-Regler-Version Nur bei Multi-Regler-Version ----
// Bei einer Multi-Regler-Version muss hier der Devicename manuell
// eingetragen werden.
//
$USBDevice = "dev/piko5";
//
// Wird nur in seltenen Fällen gebraucht.
// $SerielleGeschwindigkeit = "19200";
/*****************************************************************************/
//
/******************************************************************************
// Raspberry Pi Hardware Raspberry Pi Hardware Raspberry Pi Hardware
******************************************************************************/
// Bitte nicht ändern, wird automatisch ermittelt.
//
$Platine = "Raspberry Pi 4 Model B Rev 1.5";
//
/******************************************************************************
Vielen Dank
Roman