mirror of
https://github.com/Koenkk/zigbee-OTA.git
synced 2026-06-24 15:37:53 +00:00
Ubisys S1 missing firmware (#717)
This commit is contained in:
@@ -20,7 +20,10 @@ const FIRMWARE_HTML_URL = 'http://fwu.ubisys.de/smarthome/OTA/release/index';
|
||||
|
||||
function groupByImageType(arr: Image[]): GroupedImages {
|
||||
return arr.reduce<GroupedImages>((acc, cur) => {
|
||||
acc[cur.imageType] = [...(acc[cur.imageType] || []), cur];
|
||||
acc[cur.imageType + (cur.hardwareVersionMax ? cur.hardwareVersionMax : '')] = [
|
||||
...(acc[cur.imageType + (cur.hardwareVersionMax ? cur.hardwareVersionMax : '')] || []),
|
||||
cur,
|
||||
];
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
@@ -76,7 +79,6 @@ export async function download(): Promise<void> {
|
||||
|
||||
for (const imageType in imagesByType) {
|
||||
const image = getLatestImage(imagesByType[imageType], sortByFileVersion);
|
||||
|
||||
if (!image) {
|
||||
console.error(`${LOG_PREFIX} No image found for ${imageType}.`);
|
||||
continue;
|
||||
|
||||
@@ -154,6 +154,8 @@ export function findMatchImage(
|
||||
i.manufacturerCode === image.manufacturerCode &&
|
||||
extraMetas.minFileVersion === i.minFileVersion &&
|
||||
extraMetas.maxFileVersion === i.maxFileVersion &&
|
||||
extraMetas.hardwareVersionMin === i.hardwareVersionMin &&
|
||||
extraMetas.hardwareVersionMax === i.hardwareVersionMax &&
|
||||
i.modelId === extraMetas.modelId &&
|
||||
(!(i.manufacturerName && extraMetas.manufacturerName) || primitivesArrayEquals(i.manufacturerName, extraMetas.manufacturerName)),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user