Running the Weather Script locally on a Raspberry Pi and requesting the weather service via the Zimmerman adjustment method creates an insufficient data error.
Request:
192.168.178.38:3000/weather1.py?loc=49.47432,10.94365&wto=”h”:100,”t”:100,”r”:100,”bh”:65,”bt”:70,”br”:0
Response:
&errCode=10&scale=100
The Insufficient Weather Data error is generated for several reasons. Looking up the details it can be found that in this case it’s caused by the solarRadiation: NaN data reported by the local PWS. Not all commercially available weather stations (e.g. Netatmo) provide the solar radiation measurement feature.
The metric check within the function getWateringDataInternal( …) in local.ts checks the cSolar counter, which doesn’t count if only NaN is observed. Consequently, it generates the Insufficient Weather Data error.
if ( !( cTemp && cHumidity && cPrecip ) ||
[ result.minTemp, result.minHumidity, -result.maxTemp, -result.maxHumidity ].includes( Infinity ) ||
!( cSolar && cWind && cPrecip )) {
console.error( "There is insufficient data to support watering calculation from local PWS." );
throw new CodedError( ErrorCode.InsufficientWeatherData );
}
To be honest, the metric check including the cSolar and cWind counters is somehow overdone. The associated data items aren’t necessary for the Zimmerman calculation. NaN for windSpeed and solarRadiation observations shouldn’t cause errors, if the Zimmerman Adjustment Method is requested.
Running the Weather Script locally on a Raspberry Pi and requesting the weather service via the Zimmerman adjustment method creates an insufficient data error.
The Insufficient Weather Data error is generated for several reasons. Looking up the details it can be found that in this case it’s caused by the solarRadiation: NaN data reported by the local PWS. Not all commercially available weather stations (e.g. Netatmo) provide the solar radiation measurement feature.
The metric check within the function getWateringDataInternal( …) in local.ts checks the cSolar counter, which doesn’t count if only NaN is observed. Consequently, it generates the Insufficient Weather Data error.
To be honest, the metric check including the cSolar and cWind counters is somehow overdone. The associated data items aren’t necessary for the Zimmerman calculation. NaN for windSpeed and solarRadiation observations shouldn’t cause errors, if the Zimmerman Adjustment Method is requested.