Code: Alles auswählen
case 87:
// DEBUG Pascal
$funktionen->log_schreiben("Pascal Case 87", " ", 6 );
if (isset($USB_Regler)) {
$USBDevice = $USB_Regler;
$funktionen->log_schreiben( "Regler erkannt: ".$USB_Regler, " ", 6 );
}
elseif (!isset($USBDevice) or empty($USBDevice)) {
$USBDevice = "/dev/ttyUSB0";
}
// Sofar Wechselrichter alle Modelle
$rc = exec( "stty -F ".$USBDevice." raw speed 9600 cs8 -iexten -echo -echoe -echok -onlcr -hupcl ignbrk time 5" );
// DEBUG Pascal
$funktionen->logschreiben( "Pascal: Returncode ".$rc, " ", 6 );
break;
Siehe das dazugehörige Logfile nach einem Neustart, nachdem ich usb_init.php geändert habe:
Code: Alles auswählen
root@solaranzeige:~# tail -100 /var/www/log/solaranzeige.log
'Config Status' => 'cfg=new, avail=yes, need=no, active=unknown',
'Attached to' => '#28 (Hub)',
)
09.08. 07:35:21 -Daten:
array (
27 => 'USB 00.1: 0000 Unclassified device',
'' => '[Created at usb.122]',
'Unique ID' => 'qgIg.cFgSgKrRff8',
'Parent ID' => 'wkjR.g5rjI1SjqE3',
'SysFS ID' => '/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4/1-5.4:1.1',
'SysFS BusID' => '1-5.4:1.1',
'Hardware Class' => 'unknown',
'Model' => '"Sigma Designs Aeotec Z-Stick Gen5 (ZW090) - UZB"',
'Hotplug' => 'USB',
'Vendor' => 'usb 0x0658 "Sigma Designs, Inc."',
'Device' => 'usb 0x0200 "Aeotec Z-Stick Gen5 (ZW090) - UZB"',
'Driver' => '"cdc_acm"',
'Driver Modules' => '"cdc_acm"',
'Speed' => '12 Mbps',
'Module Alias' => '"usb:v0658p0200d0000dc02dsc00dp00ic0Aisc00ip00in01"',
'Config Status' => 'cfg=new, avail=yes, need=no, active=unknown',
'Attached to' => '#29 (Hub)',
)
09.08. 07:35:21 -Daten:
array (
28 => 'USB 00.0: 10a00 Hub',
'' => '[Created at usb.122]',
'Unique ID' => 'pBe4.xYNhIwdOaa6',
'Parent ID' => 'MZfG.PByEu3CXag8',
'SysFS ID' => '/devices/pci0000:00/0000:00:14.0/usb2/2-0:1.0',
'SysFS BusID' => '2-0:1.0',
'Hardware Class' => 'hub',
'Model' => '"Linux Foundation 3.0 root hub"',
'Hotplug' => 'USB',
'Vendor' => 'usb 0x1d6b "Linux Foundation"',
'Device' => 'usb 0x0003 "3.0 root hub"',
'Revision' => '"6.08"',
'Serial ID' => '"0000:00:14.0"',
'Driver' => '"hub"',
'Module Alias' => '"usb:v1D6Bp0003d0608dc09dsc00dp03ic09isc00ip00in00"',
'Config Status' => 'cfg=new, avail=yes, need=no, active=unknown',
'Attached to' => '#14 (USB Controller)',
)
09.08. 07:35:21 -Daten:
array (
29 => 'USB 00.0: 10a00 Hub',
'' => '',
'Unique ID' => 'wkjR.g5rjI1SjqE3',
'Parent ID' => 'k4bc.2DFUsyrieMD',
'SysFS ID' => '/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0',
'SysFS BusID' => '1-5:1.0',
'Hardware Class' => 'hub',
'Model' => '"VIA USB2.0 Hub"',
'Hotplug' => 'USB',
'Vendor' => 'usb 0x2109 "VIA Labs, Inc."',
'Device' => 'usb 0x2817 "USB2.0 Hub"',
'Revision' => '"0.50"',
'Driver' => '"hub"',
'Speed' => '480 Mbps',
'Module Alias' => '"usb:v2109p2817d0050dc09dsc00dp02ic09isc00ip02in00"',
'Config Status' => 'cfg=new, avail=yes, need=no, active=unknown',
'Attached to' => '#24 (Hub)',
)
09.08. 07:35:21 -USB Devices:
array (
1 =>
array (
'Device' => '0xea60',
'File' => '/dev/ttyUSB1',
'Vendor' => 'usb 0x10c4 "Silicon Labs"',
'Model' => 'Silicon CP210x UART Bridge',
'Driver Modules' => 'usbserial, cp210x',
'Driver' => 'cp210x',
),
2 =>
array (
'Device' => '0x6001',
'File' => '/dev/ttyUSB0',
'Vendor' => 'usb 0x0403 "Future Technology Devices International, Ltd"',
'Model' => 'Future Technology Devices International FT232 Serial (UART) IC',
'Driver Modules' => 'usbserial, ftdi_sio',
'Driver' => 'ftdi_sio',
),
3 =>
array (
'Device' => '0x0200',
'File' => '/dev/ttyACM0',
'Vendor' => 'usb 0x0658 "Sigma Designs, Inc."',
'Model' => 'Sigma Designs Aeotec Z-Stick Gen5 (ZW090) - UZB',
'Driver Modules' => 'cdc_acm',
'Driver' => 'cdc_acm',
),
4 =>
array (
'Device' => '0x2817',
),
)
09.08. 07:35:21 -Regler: 87
09.08. 07:35:21 -Pascal Case 87
09.08. 07:35:21 -Regler erkannt: /dev/ttyUSB0
root@solaranzeige:~# tail -100 /var/www/log/solaranzeige.log
'Config Status' => 'cfg=new, avail=yes, need=no, active=unknown',
'Attached to' => '#28 (Hub)',
)
09.08. 07:35:21 -Daten:
array (
27 => 'USB 00.1: 0000 Unclassified device',
'' => '[Created at usb.122]',
'Unique ID' => 'qgIg.cFgSgKrRff8',
'Parent ID' => 'wkjR.g5rjI1SjqE3',
'SysFS ID' => '/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4/1-5.4:1.1',
'SysFS BusID' => '1-5.4:1.1',
'Hardware Class' => 'unknown',
'Model' => '"Sigma Designs Aeotec Z-Stick Gen5 (ZW090) - UZB"',
'Hotplug' => 'USB',
'Vendor' => 'usb 0x0658 "Sigma Designs, Inc."',
'Device' => 'usb 0x0200 "Aeotec Z-Stick Gen5 (ZW090) - UZB"',
'Driver' => '"cdc_acm"',
'Driver Modules' => '"cdc_acm"',
'Speed' => '12 Mbps',
'Module Alias' => '"usb:v0658p0200d0000dc02dsc00dp00ic0Aisc00ip00in01"',
'Config Status' => 'cfg=new, avail=yes, need=no, active=unknown',
'Attached to' => '#29 (Hub)',
)
09.08. 07:35:21 -Daten:
array (
28 => 'USB 00.0: 10a00 Hub',
'' => '[Created at usb.122]',
'Unique ID' => 'pBe4.xYNhIwdOaa6',
'Parent ID' => 'MZfG.PByEu3CXag8',
'SysFS ID' => '/devices/pci0000:00/0000:00:14.0/usb2/2-0:1.0',
'SysFS BusID' => '2-0:1.0',
'Hardware Class' => 'hub',
'Model' => '"Linux Foundation 3.0 root hub"',
'Hotplug' => 'USB',
'Vendor' => 'usb 0x1d6b "Linux Foundation"',
'Device' => 'usb 0x0003 "3.0 root hub"',
'Revision' => '"6.08"',
'Serial ID' => '"0000:00:14.0"',
'Driver' => '"hub"',
'Module Alias' => '"usb:v1D6Bp0003d0608dc09dsc00dp03ic09isc00ip00in00"',
'Config Status' => 'cfg=new, avail=yes, need=no, active=unknown',
'Attached to' => '#14 (USB Controller)',
)
09.08. 07:35:21 -Daten:
array (
29 => 'USB 00.0: 10a00 Hub',
'' => '',
'Unique ID' => 'wkjR.g5rjI1SjqE3',
'Parent ID' => 'k4bc.2DFUsyrieMD',
'SysFS ID' => '/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0',
'SysFS BusID' => '1-5:1.0',
'Hardware Class' => 'hub',
'Model' => '"VIA USB2.0 Hub"',
'Hotplug' => 'USB',
'Vendor' => 'usb 0x2109 "VIA Labs, Inc."',
'Device' => 'usb 0x2817 "USB2.0 Hub"',
'Revision' => '"0.50"',
'Driver' => '"hub"',
'Speed' => '480 Mbps',
'Module Alias' => '"usb:v2109p2817d0050dc09dsc00dp02ic09isc00ip02in00"',
'Config Status' => 'cfg=new, avail=yes, need=no, active=unknown',
'Attached to' => '#24 (Hub)',
)
09.08. 07:35:21 -USB Devices:
array (
1 =>
array (
'Device' => '0xea60',
'File' => '/dev/ttyUSB1',
'Vendor' => 'usb 0x10c4 "Silicon Labs"',
'Model' => 'Silicon CP210x UART Bridge',
'Driver Modules' => 'usbserial, cp210x',
'Driver' => 'cp210x',
),
2 =>
array (
'Device' => '0x6001',
'File' => '/dev/ttyUSB0',
'Vendor' => 'usb 0x0403 "Future Technology Devices International, Ltd"',
'Model' => 'Future Technology Devices International FT232 Serial (UART) IC',
'Driver Modules' => 'usbserial, ftdi_sio',
'Driver' => 'ftdi_sio',
),
3 =>
array (
'Device' => '0x0200',
'File' => '/dev/ttyACM0',
'Vendor' => 'usb 0x0658 "Sigma Designs, Inc."',
'Model' => 'Sigma Designs Aeotec Z-Stick Gen5 (ZW090) - UZB',
'Driver Modules' => 'cdc_acm',
'Driver' => 'cdc_acm',
),
4 =>
array (
'Device' => '0x2817',
),
)
09.08. 07:35:21 -Regler: 87
09.08. 07:35:21 -Pascal Case 87
09.08. 07:35:21 -Regler erkannt: /dev/ttyUSB0
09.08. 07:36:01 |---------- [87] -------- Start sofarsolar.php ----- [ 01.06.24 ] --
09.08. 07:36:01 -Timer Wert. [ normal = 200000 µsec ]: 200000
09.08. 07:36:04 -Lesefehler > [ ] Register: 0044
09.08. 07:36:04 -Das Gerät kann nicht ausgelesen werden. Zu dunkel?
09.08. 07:36:04 |------------------------- Stop sofarsolar.php ---------------------