chiefwigms / picobrew_pico

MIT License
149 stars 63 forks source link

Z Firmware download failed #229

Closed mcnmck closed 3 years ago

mcnmck commented 3 years ago

After factory resetting my Z, connecting to the server displayed an HTTP client error on the Z and the firmware didn't download.

Attached at the logs up to the point I was able to grab them, it includes a server restart and adding the new recipe to brew as well as the first part of the brew session.

Thanks,

K. nginx.error.log nginx.access.log picobrew_pico.log

mcnmck commented 3 years ago

I ran a factory reset a few days ago and was able to upgrade firmware on my regular wifi. Once it was updated, reconnected to pi server and everything was up and running.

Yes, I was able to connect to the main picobrew site to get the firmware, but the pi server should be able to serve the firmware.

chiefwigms commented 3 years ago

Is it via WiFi or Ethernet? If using ethernet and it failed, I'd say it's an issue.. WiFi we can't really do anything about - the pi image is just a quick start for people to get up and running, and really has nothing to do with the server software on here

tmack8001 commented 3 years ago

This isn't anything to do with WiFi or Ethernet.

There is a JSON parse error with the factory shipped firmware and the server processing.

Jan 30 21:00:23 pipico rc.local[539]:     return process_zstate(request)
Jan 30 21:00:23 pipico rc.local[539]:   File "/picobrew_pico/app/main/routes_zseries_api.py", line 184, in process_zstate
Jan 30 21:00:23 pipico rc.local[539]:     "BoilerType": json['BoilerType'],       # TODO sometimes machine loses boilertype, need to resync with known state
Jan 30 21:00:23 pipico rc.local[539]: KeyError: 'BoilerType'
Jan 30 21:00:23 pipico rc.local[539]: 127.0.0.1 - - [30/Jan/2021 21:00:23] "PUT /Vendors/input.cshtml?type=ZState&token=240ac424aef8 HTTP/1.0" 500 -

For this the factory firmware doesn't report the units BoilerType which I'd guess they added later when they changed from small -> large and had a few machines that "lost/forgot" this setting leading to the adding of the BTypeMismatch error from the Picobrew mothership. I'd like to get the same error response (need to test sending the wrong one to know the contract with the API, but there is a separate ticket for that as without it the machine shows a weird error about HEX too cold or something like that leading people to change their temp probes to only see the same error again).

tmack8001 commented 3 years ago

@mcnmck update/restart of your server should pull the updated source code (if you have internet connectivity) to fix this