Plugin HsEvent is not raised at the end of a backup operation
avargaskun opened this issue · 3 comments
avargaskun commented
Environment
HomeSeer
OS
Windows and Linux
HS Version
v4.2.16.0
Development
PSDK Version
v1.4.0
Language
C#
IDE
VSCode
Dev OS
Mac
Plugin
HSBuddy
Problem
HomeSeer is not raising an event to AbstractPlugin.HsEvent
when a backup ends, only when a backup starts.
Description
Looking at the implementation of HSCore.BackupManager.BackupConfigProc
(in HSCore.dll):
BackupConfigChangeEvent(Enums.eBackupChangeEvent.STARTED)
is called at the beginning of the backup operation- However,
BackupConfigChangeEvent(Enums.eBackupChangeEvent.ENDED)
is never called
Expected Behavior
AbtractPlugin.HsEvent(HSEvent.BACKUP, eBackupChangeEvent.STARTED)
is invoked when the backup starts.AbstractPlugin.HsEvent(HSEvent.BACKUP, eBackupChangeEvent.ENDED)
is invoked when the backup ends.
Actual Behavior
AbtractPlugin.HsEvent(HSEvent.BACKUP, eBackupChangeEvent.STARTED)
is invoked when the backup starts.AbstractPlugin.HsEvent(HSEvent.BACKUP, eBackupChangeEvent.ENDED)
is NOT invoked when the backup ends.
Steps to Reproduce
- From an HS4 plugin, register for the backup events using:
IHsController.RegisterEventCB(HSEvent.BACKUP, "HSBuddy")
- In the plugin class, implement the
AbstractPlugin.HsEvent()
method and log every call with its parameters - Perform a local backup of the HS controller from the web UI (Tools > Backup/Restore)
Screenshots
NA
Logs
NA
spudwebb commented
Tracked as HS-1761
sjhill01 commented
When you work on this, the documentation needs updating, too, since it references constants that don't align with what's actually in the SDK.
avargaskun commented
Hey! Just a quick ping. Any chance this could be included in an upcoming HS release?