SBFspot / sbfspot-config

Installation/Configuration tool for SBFspot on Raspberry Pi
43 stars 11 forks source link

#Serial extract with AWK for SID / Serial check is not working for my setup. #50

Closed geurtsd closed 2 years ago

geurtsd commented 2 years ago

Hi,

In my latest installation, it kept failing on the validation block:

if [ ${#sids[@]} -ne ${#serials[@]} ]; then
    echo "Different number of SID/Serial"
    echo "Found ${#sids[@]} SIDS"
    echo "Found ${#serials[@]} S/N"
    whiptail --msgbox "SBFspotUpload installation failed:\nDifferent number of SID/Serial" 0 0
    return 1 # show PVO config menu

this block in turn gets the variable serials from: serials=($devserials)

the devserialsin turn is extracted form the $firstrun result of the BT device in this code:

devserials=$(echo "$firstrun"|awk '/^Serial number:/ { print $2 }' FS=': *')
echo "Device Serial(s): $devserials"

However for my device, this results in an empty string, and fails install on the #SID VS #Serials check (finds 1 SID, and 0 Serials)

my output of the $firstrunis: (see bold line) and the serial is in this line between brackets

Yet another tool to read power production of SMA solar inverters (c) 2012-2022, SBF (https://github.com/SBFspot/SBFspot) Compiled for Linux (LE) 32 bit with SQLite support Commandline Args: -v -ad0 -am0 -ae0 -sp0 -nocsv -nosql -finq Reading config '/usr/local/bin/sbfspot.3/SBFspot.cfg' Sat Aug 13 11:47:44 2022: INFO: Starting... sunrise: 06:22 sunset : 21:02 Connecting to 00:80:25:21:7D:69 (1/10) Initialising... SUSyID: 125 - SessionID: 851595712 SMA netID=01 Serial Nr: 7D33B211 (2100539921)_ BT Signal=76.9% Logon OK Local Host Time: 13/08/2022 11:47:46 Plant Time : 13/08/2022 11:47:47 (+1 sec) TZ offset : 3600 sec - DST: On Last Time Set : 17/03/2022 05:55:02 SUSyID: 78 - SN: 2100539921 Device Name: SN: 2100539921 Device Class: Solar Inverters Device Type: SB 5000TL-20 Software Version: 03.20.01.R Packet status: 21 SUSyID: 78 - SN: 2100539921 Device Status: Ok SUSyID: 78 - SN: 2100539921 Device Temperature: 66.0°C SUSyID: 78 - SN: 2100539921 GridRelay Status: Closed SUSyID: 78 - SN: 2100539921 Energy Production: EToday: 14.934kWh ETotal: 61168.915kWh Operation Time: 46710.28h Feed-In Time : 45544.69h SUSyID: 78 - SN: 2100539921 DC Spot Data: MPPT 1 Pdc: 2.133kW - Udc: 294.28V - Idc: 7.251A MPPT 2 Pdc: 2.050kW - Udc: 288.47V - Idc: 7.107A Calculated Total Pdc: 4.183kW AC Spot Data: Phase 1 Pac : 4.062kW - Uac: 247.22V - Iac: 16.432A Phase 2 Pac : 0.000kW - Uac: 0.00V - Iac: 0.000A Phase 3 Pac : 0.000kW - Uac: 0.00V - Iac: 0.000A Total Pac : 4.062kW - Calculated Pac: 4.062kW Efficiency : 97.11% SUSyID: 78 - SN: 2100539921 Grid Freq. : 50.00Hz SUSyID: 78 - SN: 2100539921 Current Inverter Time: 13/08/2022 11:47:47 Inverter Wake-Up Time: 13/08/2022 06:09:27 Inverter Sleep Time : 13/08/2022 11:47:47 Sat Aug 13 11:47:47 2022: INFO: Done.

I circumvented the issue by downloading the script locally and hardcoding my serial (2100539921) in there, so no hurry for me anymore.. ;-)

cheers,

D

sbf- commented 2 years ago

It´s a known bug: https://github.com/SBFspot/sbfspot-config/issues/46

Thanks

sbf- commented 2 years ago

Fixed in V1.3.0 (ec5f277)