opendata-stuttgart / madavi-api

api for rrdtool graphics per sensors + graphics from archive.luftdaten.info
18 stars 11 forks source link

Update will be delivered even when installed version is newer #11

Closed saschaludwig closed 6 years ago

saschaludwig commented 6 years ago

Current behavior: The current code returns a older firmware image when the currently installed firmware is newer, resulting in a downgrade with loss of configuration on esp devices.

Desired behavior: Only return a firmware file if the installed version is older that the currently available version.

https://github.com/opendata-stuttgart/madavi-api/blob/734930c1c68dc8d026fd3676a4fbf9c8d90baff0/update/firmware.php#L86

ricki-z commented 6 years ago

The actual way has the advantage that we can change back to the last release wtihout the need to recompile these version. We only need to replace the new binary file with a backup of the older version. That way we could 'solve' some problems that only showed up after updating some of the sensors. It looks like there are some DHT22 or BME280 that have another 'configuration' as those in our test systems. As we do this project in our leisure time we try to use pragmatic solutions ;-)

saschaludwig commented 6 years ago

That's okay with me. I know how to work around it. :-)