added target_firmware_ts timeseries for the firmware

This commit is contained in:
YevhenBondarenko 2021-04-27 08:53:54 +03:00 committed by Andrew Shvayka
parent 7ce1fc77c9
commit 5429175db9
2 changed files with 2 additions and 0 deletions

View File

@ -187,6 +187,7 @@ public class DefaultFirmwareStateService implements FirmwareStateService {
List<TsKvEntry> telemetry = new ArrayList<>();
telemetry.add(new BasicTsKvEntry(ts, new StringDataEntry(DataConstants.TARGET_FIRMWARE_TITLE, firmware.getTitle())));
telemetry.add(new BasicTsKvEntry(ts, new StringDataEntry(DataConstants.TARGET_FIRMWARE_VERSION, firmware.getVersion())));
telemetry.add(new BasicTsKvEntry(ts, new LongDataEntry(DataConstants.TARGET_FIRMWARE_TS, ts)));
telemetry.add(new BasicTsKvEntry(ts, new StringDataEntry(DataConstants.FIRMWARE_STATE, FirmwareUpdateStatus.QUEUED.name())));
telemetryService.saveAndNotify(tenantId, deviceId, telemetry, new FutureCallback<>() {

View File

@ -99,6 +99,7 @@ public class DataConstants {
public static final String CURRENT_FIRMWARE_VERSION = "cur_fw_version";
public static final String TARGET_FIRMWARE_TITLE = "target_fw_title";
public static final String TARGET_FIRMWARE_VERSION = "target_fw_version";
public static final String TARGET_FIRMWARE_TS = "target_fw_ts";
public static final String FIRMWARE_STATE = "fw_state";
//attributes