kstobbe / esp-update-server

Webserver to handle binary files for ESP32 and ESP8266 Over-The-Air updates.
MIT License
29 stars 15 forks source link

Wemos D1 Mini Pro generates error #1

Open simontims opened 5 years ago

simontims commented 5 years ago

Testing running Docker Container server; ESP device is a Wemos D1 Mini Pro.

When the client contacts the server, serial monitor returns:

INFO: Checking for updates at URL: http://192.168.1.40:5000/update?ver=v2.18.1&dev=espweather ERROR: HTTP_UPDATE_FAILD Error (-104): Wrong HTTP Code

I thought maybe the headers are different. but looking at server.py, that should be handled OK. I've also tried GET with the same URL in Postman which returns 400 Bad Request, 'Error: Invalid Parameters'

Not sure what the cause is but will keep testing.

simontims commented 5 years ago

Found the issue - no MAC address assigned.

Fixed that up and everything worked, so the issue is that 'Wrong HTTP Code' is returned from the server rather than the expected 'Device not whitelisted'.

Same issue when I changed the platform name on the device and did not create a new matching platform in the server; 'Wrong HTTP Code' rather than the expected, 'Unknown platform'.

Docker engine is running in Windows 10 with the bin directory mounted to a path on the host. The yml updates as expected, binary files are stored there and the update works when all parameters are in place. I don't know why flask is returning an error rather than the expected messages. Will attempt running it with python directly (or work out how to get the flask logs from the Container!)

cheers