From 63be6852018d600ca3b8a2e5d19c16aea33ff7c4 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Thu, 27 Feb 2020 20:33:04 +0100 Subject: [PATCH] Fix OTA update start on check with / as base_topic prefix. #3010 --- lib/extension/otaUpdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extension/otaUpdate.js b/lib/extension/otaUpdate.js index 3c19c0fb..6b70d8d4 100644 --- a/lib/extension/otaUpdate.js +++ b/lib/extension/otaUpdate.js @@ -75,7 +75,7 @@ class OTAUpdate extends BaseExtension { } this.inProgress.add(device.device.ieeeAddr); - const type = topic.split('/')[3]; + const type = topic.substring(settings.get().mqtt.base_topic.length).split('/')[3]; if (type === 'check') { const message = `Checking if update available for '${device.name}'`; logger.info(message);