Skip to main content
Skip table of contents

HSEvent Changes

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:

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



VB Sample Init

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

Process Event:

VB
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



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.