mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-12 00:02:53 +00:00
Include device information when asking for new version (#1052)
This commit is contained in:
parent
19ff70782f
commit
1a5b9542f4
@ -230,6 +230,16 @@ bool AmsFirmwareUpdater::fetchNextVersion() {
|
|||||||
http.setUserAgent("AMS-Firmware-Updater");
|
http.setUserAgent("AMS-Firmware-Updater");
|
||||||
http.addHeader(F("Cache-Control"), "no-cache");
|
http.addHeader(F("Cache-Control"), "no-cache");
|
||||||
http.addHeader(F("x-AMS-version"), FirmwareVersion::VersionString);
|
http.addHeader(F("x-AMS-version"), FirmwareVersion::VersionString);
|
||||||
|
http.addHeader(F("x-AMS-STA-MAC"), WiFi.macAddress());
|
||||||
|
http.addHeader(F("x-AMS-AP-MAC"), WiFi.softAPmacAddress());
|
||||||
|
http.addHeader(F("x-AMS-chip-size"), String(ESP.getFlashChipSize()));
|
||||||
|
http.addHeader(F("x-AMS-board-type"), String(hw->getBoardType(), 10));
|
||||||
|
if(meterState->getMeterType() != AmsTypeAutodetect) {
|
||||||
|
http.addHeader(F("x-AMS-meter-mfg"), String(meterState->getMeterType(), 10));
|
||||||
|
}
|
||||||
|
if(!meterState->getMeterModel().isEmpty()) {
|
||||||
|
http.addHeader(F("x-AMS-meter-model"), meterState->getMeterModel());
|
||||||
|
}
|
||||||
int status = http.GET();
|
int status = http.GET();
|
||||||
if(status == 204) {
|
if(status == 204) {
|
||||||
String nextVersion = http.header("x-version");
|
String nextVersion = http.header("x-version");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user