OpenSprinkler Forums OpenSprinkler Unified Firmware Trouble with Zimmerman Method Reply To: Trouble with Zimmerman Method

#42515

chickenmad
Participant

sorry for the prior snarkiness (late in the day posting not recommended).

After reading the latest weather.cpp decided to run Opensprinkler from shell via SSH and the output of the weather call got me looking.

Today using the weather url directly after a reboot:
&scale=22&rd=-1&tz=28&sunrise=339&sunset=1238&eip=1124396973
but weather percentage remains at 100% with good weather responses BUT initially there was NO good response. Now your initial url call does an redirect and wondering if the initial parse loads a value that introduces an issue.

Specifically:

if (findKeyVal(p, tmp_buffer, TMP_BUFFER_SIZE, PSTR(“scale”), true)) {
v = atoi(tmp_buffer);
if (v>=0 && v<=250 && v != os.options[OPTION_WATER_PERCENTAGE]) {
// only save if the value has changed
os.options[OPTION_WATER_PERCENTAGE] = v;
os.options_save();

who cares if it has or has not changed – write it out. symptomatically this check would stop the change of the scale os.options. Is it possible you hit a value (response to a bad response or similar) that causes this to read as not changed and thus not written out.