diff --git a/images/GLEDOPTO/GL-C-008P_V14_OTAV4_20210114_100%.ota b/images/Gledopto/GL-C-008P_V14_OTAV4_20210114_100%.ota similarity index 100% rename from images/GLEDOPTO/GL-C-008P_V14_OTAV4_20210114_100%.ota rename to images/Gledopto/GL-C-008P_V14_OTAV4_20210114_100%.ota diff --git a/images/GLEDOPTO/GL-FL-005P_V14_OTAV4_20210119_100%.ota b/images/Gledopto/GL-FL-005P_V14_OTAV4_20210119_100%.ota similarity index 100% rename from images/GLEDOPTO/GL-FL-005P_V14_OTAV4_20210119_100%.ota rename to images/Gledopto/GL-FL-005P_V14_OTAV4_20210119_100%.ota diff --git a/images/GLEDOPTO/GL-FL-006P_V14_OTAV4_20210119_100%.ota b/images/Gledopto/GL-FL-006P_V14_OTAV4_20210119_100%.ota similarity index 100% rename from images/GLEDOPTO/GL-FL-006P_V14_OTAV4_20210119_100%.ota rename to images/Gledopto/GL-FL-006P_V14_OTAV4_20210119_100%.ota diff --git a/images/Gledopto/GL-S-007P_V15_A1_OTAV5_20210201_90%.ota b/images/Gledopto/GL-S-007P_V15_A1_OTAV5_20210201_90%.ota new file mode 100644 index 0000000..7dd3703 Binary files /dev/null and b/images/Gledopto/GL-S-007P_V15_A1_OTAV5_20210201_90%.ota differ diff --git a/index.json b/index.json index c0f45a0..e182e37 100644 --- a/index.json +++ b/index.json @@ -706,8 +706,8 @@ "manufacturerCode": 4687, "imageType": 0, "modelId": "GL-FL-005P", - "url": "https://github.com/Koenkk/zigbee-OTA/raw/master/images/GLEDOPTO/GL-FL-005P_V14_OTAV4_20210119_100%25.ota", - "path": "images/GLEDOPTO/GL-FL-005P_V14_OTAV4_20210119_100%.OTA" + "url": "https://github.com/Koenkk/zigbee-OTA/raw/master/images/Gledopto/GL-FL-005P_V14_OTAV4_20210119_100%25.ota", + "path": "images/Gledopto/GL-FL-005P_V14_OTAV4_20210119_100%.OTA" }, { "fileVersion": 4, @@ -715,8 +715,8 @@ "manufacturerCode": 4687, "imageType": 0, "modelId": "GL-FL-006P", - "url": "https://github.com/Koenkk/zigbee-OTA/raw/master/images/GLEDOPTO/GL-FL-006P_V14_OTAV4_20210119_100%25.ota", - "path": "images/GLEDOPTO/GL-FL-006P_V14_OTAV4_20210119_100%.OTA" + "url": "https://github.com/Koenkk/zigbee-OTA/raw/master/images/Gledopto/GL-FL-006P_V14_OTAV4_20210119_100%25.ota", + "path": "images/Gledopto/GL-FL-006P_V14_OTAV4_20210119_100%.OTA" }, { "fileVersion": 4, @@ -724,8 +724,8 @@ "manufacturerCode": 4687, "imageType": 0, "modelId": "GL-C-008P", - "url": "https://github.com/Koenkk/zigbee-OTA/raw/master/images/GLEDOPTO/GL-C-008P_V14_OTAV4_20210114_100%25.ota", - "path": "images/GLEDOPTO/GL-C-008P_V14_OTAV4_20210114_100%.OTA" + "url": "https://github.com/Koenkk/zigbee-OTA/raw/master/images/Gledopto/GL-C-008P_V14_OTAV4_20210114_100%25.ota", + "path": "images/Gledopto/GL-C-008P_V14_OTAV4_20210114_100%.OTA" }, { "fileVersion": 264, @@ -741,5 +741,14 @@ "manufacturerCode": 4107, "imageType": 282, "url": "https://firmware.meethue.com/storage/100b-11a/16778754/307362cd-5f4f-40a1-a205-7d871cfcde1a/100B-011A-01000602-SmartPlug-EFR32MG21.zigbee" + }, + { + "fileVersion": 5, + "fileSize": 291622, + "manufacturerCode": 4687, + "imageType": 0, + "modelId": "GL-S-007P", + "url": "https://github.com/Koenkk/zigbee-OTA/raw/master/images/Gledopto/GL-S-007P_V15_A1_OTAV5_20210201_90%.ota", + "path": "images/Gledopto/GL-S-007P_V15_A1_OTAV5_20210201_90%.ota" } -] +] \ No newline at end of file diff --git a/scripts/add.js b/scripts/add.js index 895b26b..a16e777 100644 --- a/scripts/add.js +++ b/scripts/add.js @@ -2,6 +2,7 @@ const path = require('path'); const fs = require('fs'); const ota = require('../lib/ota'); const filenameOrURL = process.argv[2]; +const modelId = process.argv[3]; const baseURL = 'https://github.com/Koenkk/zigbee-OTA/raw/master'; const manufacturerNameLookup = { @@ -15,7 +16,8 @@ const manufacturerNameLookup = { 4648: 'Terncy', 4098: 'Tuya', 4151: 'Eurotronic', - 4678: 'Danfoss' + 4678: 'Danfoss', + 4687: 'Gledopto', }; const main = async () => { @@ -70,6 +72,10 @@ const main = async () => { imageType: parsed.header.imageType, }; + if (modelId) { + entry.modelId = modelId; + } + if (isURL) { entry.url = filenameOrURL; } else { @@ -79,7 +85,7 @@ const main = async () => { } const index = indexJSON.findIndex((i) => { - return i.manufacturerCode === entry.manufacturerCode && i.imageType === entry.imageType + return i.manufacturerCode === entry.manufacturerCode && i.imageType === entry.imageType && (!i.modelId || i.modelId === entry.modelId) }); if (index !== -1) {