Page tree
Skip to end of metadata
Go to start of metadata

HS4 introduces a new backup/restore feature. When backing up the system its possible that a plugin may have an open file. In this case, that file will be skipped. To avoid this a new HSEvent has been added. This event is fired when a backup starts and when it ends.

The event enum is:

HomeSeer.PluginSdk.Constants.HSEvent.BACKUP (0x200)
There is one parameter, and integer that designates if the backup is starting or has ended:
Enum eBackupChangeEvent
	STARTED = 1
	ENDED = 2
End Enum



VB Sample Init

HomeSeerSystem.RegisterEventCB(HomeSeer.PluginSdk.Constants.HSEvent.BACKUP, Id)

Process Event:

Public Overrides Sub HsEvent(eventType As HomeSeer.PluginSdk.Constants.HSEvent, params() As Object)
	If eventType = HomeSeer.PluginSdk.Constants.HSEvent.BACKUP Then
		Select Case params(1)
			Case 1
				' backup started, close any open files
			Case 2
				' backup ended
		End Select
	End If
	MyBase.HsEvent(eventType, params)
End Sub



  • No labels