Documentation
¶
Index ¶
- Constants
- func EventName(event interface{}) string
- type CommandClearStorage
- type CommandCreateBackup
- type CommandDisableTask
- type CommandDisableTrigger
- type CommandEnableTask
- type CommandEnableTrigger
- type CommandLoadEntity
- type CommandSTT
- type CommandSendFileToTelegram
- type CommandTerminal
- type CommandUnloadEntity
- type Common
- type EntityState
- type EventActionCompleted
- type EventActionLoaded
- type EventActionUnloaded
- type EventAddedActionModel
- type EventAddedConditionModel
- type EventCallAction
- type EventCallEntityAction
- type EventCallScene
- type EventCallTaskAction
- type EventCallTrigger
- type EventCreatedBackup
- type EventCreatedEntityModel
- type EventCreatedScriptModel
- type EventCreatedTaskModel
- type EventCreatedTriggerModel
- type EventCreatedZigbee2mqttModel
- type EventDirectMessage
- type EventEntityLoaded
- type EventEntitySetState
- type EventEntityState
- type EventEntityUnloaded
- type EventGetLastState
- type EventGetServerVersion
- type EventGetStateById
- type EventLastStateChanged
- type EventMqttNewClient
- type EventPluginLoaded
- type EventPluginUnloaded
- type EventRemovedActionModel
- type EventRemovedBackup
- type EventRemovedConditionModel
- type EventRemovedScriptModel
- type EventRemovedTaskModel
- type EventRemovedTriggerModel
- type EventRemovedVariableModel
- type EventRemovedZigbee2mqttModel
- type EventServerVersion
- type EventServiceRestarted
- type EventServiceStarted
- type EventServiceStopped
- type EventStartedRestore
- type EventStateById
- type EventStateChanged
- type EventTaskCompleted
- type EventTaskLoaded
- type EventTaskUnloaded
- type EventTriggerCompleted
- type EventTriggerLoaded
- type EventTriggerUnloaded
- type EventUpdateUserLocation
- type EventUpdatedActionModel
- type EventUpdatedConditionModel
- type EventUpdatedEntityModel
- type EventUpdatedMetric
- type EventUpdatedScriptModel
- type EventUpdatedTaskModel
- type EventUpdatedTriggerModel
- type EventUpdatedVariableModel
- type EventUpdatedZigbee2mqttModel
- type EventUploadedBackup
- type EventUserSignedIn
- type OwnerType
- type TriggerMessage
Constants ¶
const ( OwnerUser = OwnerType("user") OwnerSystem = OwnerType("system") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommandClearStorage ¶
type CommandClearStorage struct {
Num int64 `json:"num"`
}
type CommandCreateBackup ¶
type CommandCreateBackup struct {
Scheduler bool `json:"scheduler"`
}
type CommandDisableTask ¶
type CommandDisableTask struct {
Id int64 `json:"id"`
}
CommandDisableTask ...
type CommandDisableTrigger ¶
type CommandDisableTrigger struct {
Id int64 `json:"id"`
}
CommandDisableTrigger ...
type CommandEnableTask ¶
type CommandEnableTask struct {
Id int64 `json:"id"`
}
CommandEnableTask ...
type CommandEnableTrigger ¶
type CommandEnableTrigger struct {
Id int64 `json:"id"`
}
CommandEnableTrigger ...
type CommandLoadEntity ¶
CommandLoadEntity ...
type CommandSTT ¶
CommandSTT ...
type CommandTerminal ¶
CommandTerminal ...
type CommandUnloadEntity ¶
CommandUnloadEntity ...
type Common ¶
type EntityState ¶
type EntityState struct {
Name string `json:"name"`
Description string `json:"description"`
ImageUrl *string `json:"image_url"`
Icon *string `json:"icon"`
}
EntityState ...
type EventActionCompleted ¶
type EventActionLoaded ¶
type EventActionLoaded struct {
Id int64 `json:"id"`
}
EventActionLoaded ...
type EventActionUnloaded ¶
type EventActionUnloaded struct {
Id int64 `json:"id"`
}
EventActionUnloaded ...
type EventAddedActionModel ¶
type EventAddedActionModel struct {
Id int64 `json:"id"`
}
EventAddedActionModel ...
type EventAddedConditionModel ¶
type EventAddedConditionModel struct {
Id int64 `json:"id"`
}
EventAddedConditionModel ...
type EventCallAction ¶
EventCallAction ...
type EventCallEntityAction ¶
type EventCallEntityAction struct {
PluginName *string `json:"plugin_name"`
EntityId *common.EntityId `json:"entity_id"`
ActionName string `json:"action_name"`
Args map[string]interface{} `json:"args"`
AreaId *int64 `json:"area_id"`
Tags []string `json:"tags"`
}
EventCallEntityAction ...
type EventCallScene ¶
type EventCallScene struct {
PluginName string `json:"type"`
EntityId common.EntityId `json:"entity_id"`
Args map[string]interface{} `json:"args"`
}
EventCallScene ...
type EventCallTaskAction ¶
EventCallTaskAction ...
type EventCallTrigger ¶
EventCallTrigger ...
type EventCreatedBackup ¶
type EventCreatedEntityModel ¶
EventCreatedEntityModel ...
type EventCreatedScriptModel ¶
type EventCreatedScriptModel struct {
Common
ScriptId int64 `json:"script_id"`
Script *m.Script `json:"script"`
}
EventCreatedScriptModel ...
type EventCreatedTaskModel ¶
type EventCreatedTaskModel struct {
Id int64 `json:"id"`
}
EventCreatedTaskModel ...
type EventCreatedTriggerModel ¶
type EventCreatedTriggerModel struct {
Id int64 `json:"id"`
}
EventCreatedTriggerModel ...
type EventCreatedZigbee2mqttModel ¶
type EventCreatedZigbee2mqttModel struct {
Id int64 `json:"id"`
Bridge *m.Zigbee2mqtt `json:"bridge"`
}
EventCreatedZigbee2mqttModel ...
type EventDirectMessage ¶
type EventEntityLoaded ¶
type EventEntityLoaded struct {
EntityId common.EntityId `json:"entity_id"`
PluginName string `json:"plugin_name"`
}
EventEntityLoaded ...
type EventEntitySetState ¶
type EventEntitySetState struct {
EntityId common.EntityId `json:"entity_id"`
NewState *string `json:"new_state"`
AttributeValues m.AttributeValue `json:"attribute_values"`
SettingsValue m.AttributeValue `json:"settings_value"`
StorageSave bool `json:"storage_save"`
}
EventEntitySetState ...
type EventEntityState ¶
type EventEntityState struct {
EntityId common.EntityId `json:"entity_id"`
Value interface{} `json:"value"`
State *EntityState `json:"state"`
Attributes m.Attributes `json:"attributes"`
Settings m.Attributes `json:"settings"`
LastChanged *time.Time `json:"last_changed"`
LastUpdated *time.Time `json:"last_updated"`
}
EventEntityState ...
func (EventEntityState) Compare ¶
func (e1 EventEntityState) Compare(e2 EventEntityState) (ident bool)
Compare ...
type EventEntityUnloaded ¶
type EventEntityUnloaded struct {
EntityId common.EntityId `json:"entity_id"`
PluginName string `json:"plugin_name"`
}
EventEntityUnloaded ...
type EventGetLastState ¶
EventGetLastState ...
type EventGetStateById ¶
type EventGetStateById struct {
Common
EntityId common.EntityId `json:"entity_id"`
StorageId int64 `json:"storage_id"`
}
EventGetStateById ...
type EventLastStateChanged ¶
type EventLastStateChanged struct {
PluginName string `json:"plugin_name"`
EntityId common.EntityId `json:"entity_id"`
OldState EventEntityState `json:"old_state"`
NewState EventEntityState `json:"new_state"`
}
EventLastStateChanged ...
type EventMqttNewClient ¶
type EventMqttNewClient struct {
ClientId string
}
type EventPluginLoaded ¶
type EventPluginLoaded struct {
PluginName string `json:"plugin_name"`
}
EventPluginLoaded ...
type EventPluginUnloaded ¶
type EventPluginUnloaded struct {
PluginName string `json:"plugin_name"`
}
EventPluginUnloaded ...
type EventRemovedActionModel ¶
type EventRemovedActionModel struct {
Id int64 `json:"id"`
}
EventRemovedActionModel ...
type EventRemovedBackup ¶
type EventRemovedBackup struct {
Name string `json:"name"`
}
type EventRemovedConditionModel ¶
type EventRemovedConditionModel struct {
Id int64 `json:"id"`
}
EventRemovedConditionModel ...
type EventRemovedScriptModel ¶
type EventRemovedScriptModel struct {
Common
ScriptId int64 `json:"script_id"`
Script *m.Script `json:"script"`
}
EventRemovedScriptModel ...
type EventRemovedTaskModel ¶
type EventRemovedTaskModel struct {
Id int64 `json:"id"`
}
EventRemovedTaskModel ...
type EventRemovedTriggerModel ¶
type EventRemovedTriggerModel struct {
Id int64 `json:"id"`
}
EventRemovedTriggerModel ...
type EventRemovedVariableModel ¶
type EventRemovedVariableModel struct {
Name string `json:"name"`
}
EventRemovedVariableModel ...
type EventRemovedZigbee2mqttModel ¶
type EventRemovedZigbee2mqttModel struct {
Id int64 `json:"id"`
}
EventRemovedZigbee2mqttModel ...
type EventServerVersion ¶
EventServerVersion ...
type EventServiceRestarted ¶
type EventServiceRestarted struct {
Service string `json:"service"`
}
type EventServiceStarted ¶
type EventServiceStarted struct {
Service string `json:"service"`
}
type EventServiceStopped ¶
type EventServiceStopped struct {
Service string `json:"service"`
}
type EventStartedRestore ¶
type EventStartedRestore struct {
Name string `json:"name"`
}
type EventStateById ¶
type EventStateById struct {
UserID int64 `json:"user_id"`
SessionID string `json:"session_id"`
EntityId common.EntityId `json:"entity_id"`
StorageId int64 `json:"storage_id"`
PluginName string `json:"plugin_name"`
OldState EventEntityState `json:"old_state"`
NewState EventEntityState `json:"new_state"`
}
EventStateById ...
type EventStateChanged ¶
type EventStateChanged struct {
StorageSave bool `json:"storage_save"`
DoNotSaveMetric bool `json:"do_not_save_metric"`
PluginName string `json:"plugin_name"`
EntityId common.EntityId `json:"entity_id"`
OldState EventEntityState `json:"old_state"`
NewState EventEntityState `json:"new_state"`
}
EventStateChanged ...
type EventTaskCompleted ¶
type EventTaskUnloaded ¶
type EventTaskUnloaded struct {
Id int64 `json:"id"`
}
EventTaskUnloaded ...
type EventTriggerCompleted ¶
type EventTriggerLoaded ¶
type EventTriggerLoaded struct {
Id int64 `json:"id"`
}
EventTriggerLoaded ...
type EventTriggerUnloaded ¶
type EventTriggerUnloaded struct {
Id int64 `json:"id"`
}
EventTriggerUnloaded ...
type EventUpdateUserLocation ¶
type EventUpdateUserLocation struct {
UserID int64 `json:"user_id"`
Lat float32 `json:"lat"`
Lon float32 `json:"lon"`
Accuracy float32 `json:"accuracy"`
}
EventUpdateUserLocation ...
type EventUpdatedActionModel ¶
EventUpdatedActionModel ...
type EventUpdatedConditionModel ¶
type EventUpdatedConditionModel struct {
Id int64 `json:"id"`
}
EventUpdatedConditionModel ...
type EventUpdatedEntityModel ¶
EventUpdatedEntityModel ...
type EventUpdatedMetric ¶
EventUpdatedMetric ...
type EventUpdatedScriptModel ¶
type EventUpdatedScriptModel struct {
Common
ScriptId int64 `json:"script_id"`
Script *m.Script `json:"script"`
OldScript *m.Script `json:"old_script"`
}
EventUpdatedScriptModel ...
type EventUpdatedTaskModel ¶
type EventUpdatedTaskModel struct {
Id int64 `json:"id"`
}
EventUpdatedTaskModel ...
type EventUpdatedTriggerModel ¶
type EventUpdatedTriggerModel struct {
Id int64 `json:"id"`
}
EventUpdatedTriggerModel ...
type EventUpdatedVariableModel ¶
EventUpdatedVariableModel ...
type EventUpdatedZigbee2mqttModel ¶
type EventUpdatedZigbee2mqttModel struct {
Id int64 `json:"id"`
Bridge *m.Zigbee2mqtt `json:"bridge"`
}
EventUpdatedZigbee2mqttModel ...
type EventUploadedBackup ¶
type EventUploadedBackup struct {
Name string `json:"name"`
}