OSGP / Documentation

This repository contains documentation for the Open Smart Grid Platform project. This repository is built as a GitBook, therefore all content has to be written using markdown syntax. See the latest GitBook:
https://documentation.gxf.lfenergy.org/
Apache License 2.0
24 stars 15 forks source link

FirmwareManagement.UpdateFirmwareRequest doesn't update DeviceFirmwareHistory #252

Open ThE-MaRaC opened 3 years ago

ThE-MaRaC commented 3 years ago

FirmwareManagement.UpdateFirmwareRequest operation should update DeviceFirmwareHistory (device_firmware_file table in osgp_core DB) after successful installation of new FW. There is a separate FirmwareManagement.SaveCurrentDeviceFirmware operation that can be used to manually update DeviceFirmwareHistory, but I assume that this operation should be used only if FW is not installed via GXF. Please let me know if you need any other info or assistance.

kevinsmeets commented 3 years ago

The operation UpdateFirmwareRequest sends an URL to an SSLD. Later, a GetFirmwareVersionRequest is executed to check if the new firmware version is installed. The database record is updated when the firmware version matches the new expected firmware version.

ThE-MaRaC commented 3 years ago

But, this process is not automated. My idea was the following:

  1. UpdateFirmwareRequest sent to SSLD
  2. after successful FW installation SSLD will send an event
  3. GXF receives events and updates DeviceFirmwareHistory
smvdheijden commented 2 years ago

Actually the process is automated, albeit in a slightly different way. After an SSLD updates it's firmware, it will reboot and register itself. When a device registration is completed, osgp-adapter-domain-core receives a message that is handled by DeviceRegistrationCompletedMessageProcessor which in turn calls FirmwareManagementService.handleSsldPendingFirmwareUpdate which initiates a GetFirmwareVersionRequest. The same FirmwareManagementService class will handle the response of this request and update the firmware version history when needed.