lockserver/zwavejs/messages-incoming.go

203 lines
8.2 KiB
Go
Raw Permalink Normal View History

package zwavejs
type IncomingMessage struct {
Type string `json:"type"`
MessageID string `json:"messageId"`
Success bool `json:"success"`
// Values for type = version
DriverVersion string `json:"driverVersion"`
ServerVersion string `json:"serverVersion"`
HomeID int `json:"homeId"`
Event *Event
Result *Result
}
type Event struct {
2024-04-09 23:18:43 +00:00
Source EventSource `json:"source"`
Event EventType `json:"event"`
NodeID int `json:"nodeId"`
Args NodeEventArgs `json:"args"`
NotificationLabel string `json:"notificationLabel"`
Parameters EventParameters `json:"parameters"`
}
type NodeEventArgs struct {
2024-04-09 23:18:43 +00:00
CommandClassName string `json:"commandClassName"`
CommandClass int `json:"commandClass"`
Property string `json:"property"`
Endpoint int `json:"endpoint"`
NewValue AnyType `json:"newValue"`
PrevValue AnyType `json:"prevValue"`
PropertyName string `json:"propertyName"`
}
type EventParameters struct {
UserID int `json:"userId"`
}
type Result struct {
2024-04-09 23:18:43 +00:00
Success bool
State struct {
Controller Controller
Driver Driver
Nodes []Node
}
}
type Controller struct {
Type int `json:"type"`
HomeID int64 `json:"homeId"`
OwnNodeID int `json:"ownNodeId"`
IsUsingHomeIDFromOtherNetwork bool `json:"isUsingHomeIdFromOtherNetwork"`
IsSISPresent bool `json:"isSISPresent"`
WasRealPrimary bool `json:"wasRealPrimary"`
ManufacturerID int `json:"manufacturerId"`
ProductType int `json:"productType"`
ProductID int `json:"productId"`
SupportedFunctionTypes []int `json:"supportedFunctionTypes"`
SucNodeID int `json:"sucNodeId"`
SupportsTimers bool `json:"supportsTimers"`
Statistics ControllerStatistics `json:"statistics"`
}
type ControllerStatistics struct {
MessagesTX int `json:"messagesTX"`
MessagesRX int `json:"messagesRX"`
MessagesDroppedRX int `json:"messagesDroppedRX"`
Nak int `json:"NAK"`
Can int `json:"CAN"`
TimeoutACK int `json:"timeoutACK"`
TimeoutResponse int `json:"timeoutResponse"`
TimeoutCallback int `json:"timeoutCallback"`
MessagesDroppedTX int `json:"messagesDroppedTX"`
InclusionState int `json:"inclusionState"`
IsSecondary bool `json:"isSecondary"`
IsStaticUpdateController bool `json:"isStaticUpdateController"`
IsSlave bool `json:"isSlave"`
IsHealNetworkActive bool `json:"isHealNetworkActive"`
LibraryVersion string `json:"libraryVersion"`
SerialAPIVersion string `json:"serialApiVersion"`
}
type Driver struct {
LogConfig DriverLogConfig
StatisticsEnabled bool
}
type DriverLogConfig struct {
Enabled bool `json:"enabled"`
Level int `json:"level"`
LogToFile bool `json:"logToFile"`
MaxFiles int `json:"maxFiles"`
Filename string `json:"filename"`
ForceConsole bool `json:"forceConsole"`
}
type Node struct {
NodeID int `json:"nodeId"`
Index int `json:"index"`
Status int `json:"status"`
Ready bool `json:"ready"`
IsListening bool `json:"isListening"`
IsRouting bool `json:"isRouting"`
ManufacturerID int `json:"manufacturerId"`
ProductID int `json:"productId"`
ProductType int `json:"productType"`
FirmwareVersion string `json:"firmwareVersion"`
DeviceConfig NodeDeviceConfig `json:"deviceConfig"`
Label string `json:"label"`
InterviewAttempts int `json:"interviewAttempts"`
Endpoints []NodeEndpoint `json:"endpoints"`
2024-04-09 23:18:43 +00:00
Values []NodeValue `json:"values"`
InterviewStage int `json:"interviewStage"`
IsFrequentListening any `json:"isFrequentListening"`
MaxBaudRate int `json:"maxBaudRate"`
Version int `json:"version"`
IsBeaming bool `json:"isBeaming"`
DeviceClass NodeDeviceClass `json:"deviceClass"`
InstallerIcon int `json:"installerIcon,omitempty"`
UserIcon int `json:"userIcon,omitempty"`
IsSecure bool `json:"isSecure,omitempty"`
ZwavePlusVersion int `json:"zwavePlusVersion,omitempty"`
NodeType int `json:"nodeType,omitempty"`
RoleType int `json:"roleType,omitempty"`
EndpointCountIsDynamic bool `json:"endpointCountIsDynamic,omitempty"`
EndpointsHaveIdenticalCapabilities bool `json:"endpointsHaveIdenticalCapabilities,omitempty"`
IndividualEndpointCount int `json:"individualEndpointCount,omitempty"`
AggregatedEndpointCount int `json:"aggregatedEndpointCount,omitempty"`
}
type NodeDeviceConfig struct {
Filename string `json:"filename"`
IsEmbedded bool `json:"isEmbedded"`
Manufacturer string `json:"manufacturer"`
ManufacturerID int `json:"manufacturerId"`
Label string `json:"label"`
Description string `json:"description"`
Devices []NodeDeviceConfigDevice `json:"devices"`
FirmwareVersion NodeDeviceFirmwareVersion `json:"firmwareVersion"`
Preferred bool `json:"preferred"`
Metadata NodeDeviceMetadata `json:"metadata"`
}
type NodeDeviceConfigDevice struct {
ProductType int `json:"productType"`
ProductID int `json:"productId"`
}
type NodeDeviceFirmwareVersion struct {
Min string `json:"min"`
Max string `json:"max"`
}
type NodeDeviceMetadata struct {
Comments []NodeDeviceMetadataComments `json:"comments"`
Wakeup string `json:"wakeup"`
Inclusion string `json:"inclusion"`
Exclusion string `json:"exclusion"`
Reset string `json:"reset"`
Manual string `json:"manual"`
}
type NodeDeviceMetadataComments struct {
Level string `json:"level"`
Text string `json:"text"`
}
type NodeEndpoint struct {
NodeID int `json:"nodeId"`
Index int `json:"index"`
}
2024-04-09 23:18:43 +00:00
type NodeValue struct {
Endpoint int `json:"endpoint"`
2024-04-09 23:18:43 +00:00
CommandClass CommandClass `json:"commandClass"`
CommandClassName CommandClassName `json:"commandClassName"`
Property AnyType `json:"property"`
PropertyName AnyType `json:"propertyName"`
PropertyKey AnyType `json:"propertyKey"`
CCVersion int `json:"ccVersion"`
Metadata NodeValuesMetadata `json:"metadata"`
2024-04-09 23:18:43 +00:00
Value AnyType `json:"value"`
}
type NodeValuesMetadata struct {
Type string `json:"type"`
Readable bool `json:"readable"`
Writeable bool `json:"writeable"`
Label string `json:"label"`
Min int `json:"min"`
Max int `json:"max"`
}
type NodeDeviceClass struct {
Basic string `json:"basic"`
Generic string `json:"generic"`
Specific string `json:"specific"`
MandatorySupportedCCs []string `json:"mandatorySupportedCCs"`
MandatoryControlCCs []string `json:"mandatoryControlCCs"`
}