Documentation
¶
Overview ¶
Package types with IoTDomain data types used in input and output messages
Package types with IoTDomain input message type definitions and constants ¶
Package types with IoTDomain message types used in message addressing ¶
Package types with IoTDomain node message type definitions ¶
Package types with output message type definitions and constants ¶
Package types with publisher message type definitions ¶
Package types with units for input and outputs and time format
Index ¶
- Constants
- type ConfigAttr
- type ConfigAttrMap
- type DataType
- type InputAttr
- type InputDiscoveryMessage
- type InputType
- type MessageType
- type NodeAttr
- type NodeAttrMap
- type NodeConfigureMessage
- type NodeDiscoveryMessage
- type NodeStatus
- type NodeStatusMap
- type NodeType
- type OutputBatchMessage
- type OutputDiscoveryMessage
- type OutputEventMessage
- type OutputForecastMessage
- type OutputHistoryMessage
- type OutputLatestMessage
- type OutputType
- type OutputValue
- type PublisherFullIdentity
- type PublisherIdentityMessage
- type PublisherRunState
- type PublisherStatusMessage
- type SetInputMessage
- type SetNodeIDMessage
- type Unit
- type UpgradeFirmwareMessage
Constants ¶
const ( MessageTypeConfigure = "$configure" // node configuration, payload is NodeConfigureMessage MessageTypeCreate = "$create" // create node command MessageTypeDelete = "$delete" // delete node command MessageTypeEvent = "$event" // node outputs event, payload is EventMessage MessageTypeForecast = "$forecast" // output forecast, payload is HistoryMessage MessageTypeHistory = "$history" // output history, payload is HistoryMessage MessageTypeIdentity = "$identity" // publisher identity MessageTypeInputDiscovery = "$input" // input discovery, payload is InOutput object MessageTypeLatest = "$latest" // latest output, payload is latest message MessageTypeNodeDiscovery = "$node" // node discovery, payload is Node object MessageTypeOutputDiscovery = "$output" // output discovery, payload output definition MessageTypeStatus = "$status" // publisher runtime status, connected, disconnected, lost MessageTypeSetIdentity = "$setIdentity" // renew publisher identity keys MessageTypeSetInput = "$setInput" // command to set input value, payload is input value MessageTypeSetNodeID = "$setNodeId" // set node ID, payload is SetNodeIDMessage MessageTypeUpgrade = "$upgrade" // perform firmware upgrade, payload is UpgradeMessage MessageTypeRaw = "$raw" // raw output value // LocaldomainID for local-only domains (eg, no sharing outside this domain) LocalDomainID = "local" // local area domain TestDomainID = "test" // Domain to use in testing )
Available message types from the standard
const ( NodeRunStateError string = "error" // Node reports an error NodeRunStateReady string = "ready" // Node is ready for use NodeRunStateSleeping string = "sleeping" // Node has gone into sleep mode, often a battery powered devie NodeRunStateLost string = "lost" // Node is is no longer reachable )
Values for Node State These reflect whether a node is ready, sleeping or in error
const ( OutputTypeUnknown string = "" // Not a known property type OutputTypeAcceleration OutputType = "acceleration" OutputTypeAirQuality OutputType = "airquality" OutputTypeAlarm OutputType = "alarm" OutputTypeAtmosphericPressure OutputType = "atmosphericpressure" OutputTypeBattery OutputType = "battery" OutputTypeCarbonDioxideLevel OutputType = "co2level" OutputTypeCarbonMonoxideDetector OutputType = "codetector" OutputTypeCarbonMonoxideLevel OutputType = "colevel" OutputTypeChannel OutputType = "avchannel" OutputTypeColor OutputType = "color" OutputTypeColorTemperature OutputType = "colortemperature" OutputTypeConnections OutputType = "connections" OutputTypeCPULevel OutputType = "cpulevel" OutputTypeDewpoint OutputType = "dewpoint" OutputTypeDimmer OutputType = "dimmer" OutputTypeDoorWindowSensor OutputType = "doorwindowsensor" OutputTypeElectricCurrent OutputType = "current" OutputTypeElectricEnergy OutputType = "energy" OutputTypeElectricPower OutputType = "power" OutputTypeErrors OutputType = "errors" OutputTypeHeatIndex OutputType = "heatindex" OutputTypeHue OutputType = "hue" OutputTypeHumidex OutputType = "humidex" OutputTypeHumidity OutputType = "humidity" OutputTypeImage OutputType = "image" OutputTypeLatency OutputType = "latency" OutputTypeLevel OutputType = "level" // multilevel sensor OutputTypeLocation OutputType = "location" OutputTypeLock OutputType = "lock" OutputTypeLuminance OutputType = "luminance" OutputTypeMotion OutputType = "motion" OutputTypeMute OutputType = "avmute" OutputTypeOnOffSwitch OutputType = "switch" OutputTypePlay OutputType = "avplay" OutputTypePushButton OutputType = "pushbutton" // with nr of pushes OutputTypeRain OutputType = "rain" OutputTypeRelay OutputType = "relay" OutputTypeSaturation OutputType = "saturation" OutputTypeScale OutputType = "scale" OutputTypeSignalStrength OutputType = "signalstrength" OutputTypeSmokeDetector OutputType = "smokedetector" OutputTypeSnow OutputType = "snow" OutputTypeSoundDetector OutputType = "sounddetector" OutputTypeSwitch OutputType = "switch" // on/off switch: "on" "off" OutputTypeTemperature OutputType = "temperature" OutputTypeUltraviolet OutputType = "ultraviolet" OutputTypeVibrationDetector OutputType = "vibrationdetector" OutputTypeValue OutputType = "value" // generic value OutputTypeVoltage OutputType = "voltage" OutputTypeVolume OutputType = "volume" OutputTypeWaterLevel OutputType = "waterlevel" OutputTypeWeather OutputType = "weather" // description of weather, eg sunny OutputTypeWindHeading OutputType = "windheading" OutputTypeWindSpeed OutputType = "windspeed" )
NodeOutput and actuator types These determine the available units and the datatype.
const DSSPublisherID = "$dss"
DSSPublisherID defines the publisherID of a domain's security service the DSS is responsible for renewal of keys in a secured domain.
const DefaultInputInstance = "0"
DefaultInputInstance is the input instance identifier when only a single instance exists
const DefaultOutputInstance = "0"
DefaultOutputInstance is the output instance identifier when only a single instance exists
const NodeIDGateway = "gateway"
NodeIDGateway is the standard nodeOD of a gateway device. Intended as a convention for identifying gateway devices.
const TimeFormat = "2006-01-02T15:04:05.000-0700"
TimeFormat for publishing messages
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigAttr ¶
type ConfigAttr struct { DataType DataType `json:"datatype,omitempty"` // Data type of the attribute. [integer, float, boolean, string, bytes, enum, ...] Default string `json:"default,omitempty"` // Default value Description string `json:"description,omitempty"` // Description of the attribute Enum []string `json:"enum,omitempty"` // Possible valid enum values Max float64 `json:"max,omitempty"` // Max value for numbers Min float64 `json:"min,omitempty"` // Min value for numbers Secret bool `json:"secret,omitempty"` // The configuration attribute is secret. Don't show with attributes. }
ConfigAttr describes the attributes that are configurable
type ConfigAttrMap ¶
type ConfigAttrMap map[NodeAttr]ConfigAttr
ConfigAttrMap for storing node configuration
type DataType ¶
type DataType string
DataType of configuration, input and ouput values.
const ( // DataTypeBool value is true/false, 1/0, on/off DataTypeBool DataType = "boolean" // DataTypeBytes value is encoded byte array DataTypeBytes DataType = "bytes" // DataTypeDate ISO8601 date YYYY-MM-DDTHH:MM:SS.mmmZ DataTypeDate DataType = "date" // DataTypeEnum value is one of a predefined set of string values, published in the 'enum info field' DataTypeEnum DataType = "enum" // DataTypeInt value is an integer number DataTypeInt DataType = "int" // value is a float number DataTypeNumber DataType = "number" // a secret string that is not published DataTypeSecret DataType = "secret" DataTypeString DataType = "string" // 3D vector (x, y, z) or (lat, lon, 0) DataTypeVector DataType = "vector" // value is a json object DataTypeJSON DataType = "json" )
Available data types
type InputAttr ¶
type InputAttr string
InputAttr input configuration attributes
const ( InputAttrLogin InputAttr = "login" // Basic Auth login for rest endpoints, use secret=true InputAttrPassword InputAttr = "password" // Basic Auth login for rest endpoints, use secret=true InputAttrPollInterval InputAttr = "pollInterval" // input (poll) interval for REST endpoint InputAttrSetEnabled InputAttr = "setEnabled" // when enabled, the input can be set with a $set command, boolean InputAttrSource InputAttr = "source" // source address to read input from. subscription address, http://, or file:// )
Input Attributes
type InputDiscoveryMessage ¶
type InputDiscoveryMessage struct { Address string `json:"address"` // Discovery address of the input Attr NodeAttrMap `json:"attr"` // Attributes describing this input Config ConfigAttrMap `json:"config,omitempty"` // Optional configuration of input DataType DataType `json:"dataType,omitempty"` // input value data type EnumValues []string `json:"enumValues,omitempty"` // enum valid input values for enum datatypes Max float32 `json:"max,omitempty"` // optional max value of input for numeric data types Min float32 `json:"min,omitempty"` // optional min value of input for numeric data types Source string `json:"source,omitempty"` // the input source URL, empty for set commands Timestamp string `json:"timestamp"` // Time the record is last updated Unit Unit `json:"unit,omitempty"` // unit of value // For internal use. Filled when registering inputs InputID string `json:"-"` // ID of input using NodeHWID NodeHWID string `json:"-"` // Hardware address of the node the input belongs to PublisherID string `json:"-"` // publisher of the input InputType InputType `json:"-"` // type of input Instance string `json:"-"` // instance of input }
InputDiscoveryMessage with node input description
type InputType ¶
type InputType string
InputType defines the convention names for output types
const ( InputTypeUnknown InputType = "" // Not a known property type InputTypeChannel InputType = "avchannel" // select audio video input channel InputTypeColor InputType = "color" // set light color in hex: #RRGGBB InputTypeColorTemperature InputType = "colortemperature" // set light color temperature in kelvin InputTypeCommand InputType = "command" // issue input command InputTypeDimmer InputType = "dimmer" // control light dimmer 0-100% InputTypeHumidity InputType = "humidity" // humidity setting control 0-100% InputTypeImage InputType = "image" // image input InputTypeLevel InputType = "level" // multilevel input control InputTypeLock InputType = "lock" // lock "open" or "closed" InputTypeMute InputType = "avmute" // audi/video mute: "on" "off" InputTypeSwitch InputType = "switch" // set on/off switch: "on" "off" InputTypePlay InputType = "avplay" // audio/video play pushbutton InputTypePushButton InputType = "pushbutton" // push button with nr of pushes InputTypeRPM InputType = "rpm" // control rotations per minute InputTypeSpeed InputType = "speed" // control speed InputTypeTemperature InputType = "temperature" // set thermostat temperature InputTypeValue InputType = "value" // generic input value if not a level InputTypeVoltage InputType = "voltage" // set input control for voltage InputTypeWaterLevel InputType = "waterlevel" // set input control for water level )
NodeInput types These determine the available units and the datatype.
type NodeAttr ¶
type NodeAttr string
NodeAttr with predefined names of node attributes and configuration
const ( NodeAttrAddress NodeAttr = "address" // device domain or ip address NodeAttrBatch NodeAttr = "batch" // Batch publishing size NodeAttrColor NodeAttr = "color" // Color in hex notation NodeAttrDescription NodeAttr = "description" // Device description NodeAttrDisabled NodeAttr = "disabled" // device or sensor is disabled NodeAttrEvent NodeAttr = "event" // Enable/disable event publishing NodeAttrFilename NodeAttr = "filename" // filename to write images or other values to NodeAttrGatewayAddress NodeAttr = "gatewayAddress" // the node gateway address NodeAttrHostname NodeAttr = "hostname" // network device hostname NodeAttrIotcVersion NodeAttr = "iotcVersion" // IoTDomain version NodeAttrLatLon NodeAttr = "latlon" // latitude, longitude of the device for display on a map r/w NodeAttrLocalIP NodeAttr = "localIP" // for IP nodes NodeAttrLocationName NodeAttr = "locationName" // name of a location NodeAttrLoginName NodeAttr = "loginName" // login name to connect to the device. Value is not published NodeAttrMAC NodeAttr = "mac" // MAC address for IP nodes NodeAttrManufacturer NodeAttr = "manufacturer" // device manufacturer NodeAttrMax NodeAttr = "max" // maximum value of sensor or config NodeAttrMin NodeAttr = "min" // minimum value of sensor or config NodeAttrModel NodeAttr = "model" // device model NodeAttrName NodeAttr = "name" // Name of device or service NodeAttrNetmask NodeAttr = "netmask" // IP network mask NodeAttrPassword NodeAttr = "password" // password to connect. Value is not published. NodeAttrPublishBatch NodeAttr = "publishBatch" // int with nr of events per batch, 0 to disable NodeAttrPublishEvent NodeAttr = "publishEvent" // enable publishing as event NodeAttrPublishForecast NodeAttr = "publishForecast" // bool, publish output with $forecast message NodeAttrPublishHistory NodeAttr = "publishHistory" // bool, publish output with $history message NodeAttrPublishLatest NodeAttr = "publishLatest" // bool, publish output with $latest message NodeAttrPublishRaw NodeAttr = "publishRaw" // bool, publish output with $raw message NodeAttrPollInterval NodeAttr = "pollInterval" // polling interval in seconds NodeAttrPowerSource NodeAttr = "powerSource" // battery, usb, mains NodeAttrProduct NodeAttr = "product" // device product or model name NodeAttrPublicKey NodeAttr = "publicKey" // public key for encrypting sensitive configuration settings NodeAttrSoftwareVersion NodeAttr = "softwareVersion" // version of the software running the node NodeAttrSubnet NodeAttr = "subnet" // IP subnets configuration NodeAttrType NodeAttr = "type" // Node type NodeAttrURL NodeAttr = "url" // node URL )
Predefined node attribute names that describe the node. When they are configurable they also appear in Node Config section.
type NodeConfigureMessage ¶
type NodeConfigureMessage struct { Address string `json:"address"` // zone/publisher/node/$configure Attr NodeAttrMap `json:"attr"` // attributes to configure Sender string `json:"sender"` // sending node: zone/publisher/node Timestamp string `json:"timestamp"` }
NodeConfigureMessage with values to update a node configuration
type NodeDiscoveryMessage ¶
type NodeDiscoveryMessage struct { Address string `json:"address"` // Node discovery address using NodeID Attr NodeAttrMap `json:"attr,omitempty"` // Attributes describing this node Config ConfigAttrMap `json:"config,omitempty"` // Description of configurable attributes HWID string `json:"hwID"` // The node or service immutable hardware related ID NodeID string `json:"nodeId"` // nodeID used in address. Mutable. Default is HWAddress Status NodeStatusMap `json:"status,omitempty"` // Node performance status information Timestamp string `json:"timestamp"` // time the record is last updated // For convenience, filled when registering or receiving PublisherID string `json:"-"` }
NodeDiscoveryMessage definition published in node discovery
type NodeStatus ¶
type NodeStatus string
NodeStatus various node status attributes
const ( NodeStatusErrorCount NodeStatus = "errorCount" // nr of errors reported on this device NodeStatusHealth NodeStatus = "health" // health status of the device 0-100% NodeStatusLastError NodeStatus = "lastError" // most recent error message, or "" if no error NodeStatusLastSeen NodeStatus = "lastSeen" // ISO time the device was last seen NodeStatusLatencyMSec NodeStatus = "latencymsec" // duration connect to sensor in milliseconds NodeStatusNeighborCount NodeStatus = "neighborCount" // mesh network nr of neighbors NodeStatusNeighborIDs NodeStatus = "neighborIDs" // mesh network device neighbors ID list [id,id,...] NodeStatusRxCount NodeStatus = "rxCount" // Nr of messages received from device NodeStatusTxCount NodeStatus = "txCount" // Nr of messages send to device NodeStatusRunState NodeStatus = "runState" // Node run-state as per below )
Various NodeStatus attributes that describe the recent status of the node These indicate how the node is performing and are updated with each publication, typically once a day
type NodeStatusMap ¶
type NodeStatusMap map[NodeStatus]string
NodeStatusMap for storing status attributes
type NodeType ¶
type NodeType string
NodeType identifying the purpose of the node Based on the primary role of the device.
const ( NodeTypeAlarm NodeType = "alarm" // an alarm emitter NodeTypeAVControl NodeType = "avControl" // Audio/Video controller NodeTypeAVReceiver NodeType = "avReceiver" // Node is a (not so) smart radio/receiver/amp (eg, denon) NodeTypeBeacon NodeType = "beacon" // device is a location beacon NodeTypeButton NodeType = "button" // device is a physical button device with one or more buttons NodeTypeAdapter NodeType = "adapter" // software adapter or service, eg virtual device NodeTypePhone NodeType = "phone" // device is a phone NodeTypeCamera NodeType = "camera" // Node with camera NodeTypeComputer NodeType = "computer" // General purpose computer NodeTypeDimmer NodeType = "dimmer" // light dimmer NodeTypeGateway NodeType = "gateway" // Node is a gateway for other nodes (onewire, zwave, etc) NodeTypeKeypad NodeType = "keypad" // Entry key pad NodeTypeLock NodeType = "lock" // Electronic door lock NodeTypeMultisensor NodeType = "multisensor" // Node with multiple sensors NodeTypeNetRepeater NodeType = "netRepeater" // Node is a zwave or other network repeater NodeTypeNetRouter NodeType = "netRouter" // Node is a network router NodeTypeNetSwitch NodeType = "netSwitch" // Node is a network switch NodeTypeNetWifiAP NodeType = "wifiAP" // Node is a wifi access point NodeTypeOnOffSwitch NodeType = "onOffSwitch" // Node is a physical on/off switch NodeTypePowerMeter NodeType = "powerMeter" // Node is a power meter NodeTypeSensor NodeType = "sensor" // Node is a single sensor (volt,...) NodeTypeSmartlight NodeType = "smartlight" // Node is a smart light, eg philips hue NodeTypeThermometer NodeType = "thermometer" // Node is a temperature meter NodeTypeThermostat NodeType = "thermostat" // Node is a thermostat control unit NodeTypeTV NodeType = "tv" // Node is a (not so) smart TV NodeTypeUnknown NodeType = "unknown" // type not identified NodeTypeWallpaper NodeType = "wallpaper" // Node is a wallpaper montage of multiple images NodeTypeWaterValve NodeType = "waterValve" // Water valve control unit NodeTypeWeatherService NodeType = "weatherService" // Node is a service providing current and forecasted weather NodeTypeWeatherStation NodeType = "weatherStation" // Node is a weatherstation device NodeTypeWeighScale NodeType = "weighScale" // Node is an electronic weight scale )
Various Types of Nodes
type OutputBatchMessage ¶
type OutputBatchMessage struct { Address string `json:"address"` // Address of the publication: zone/publisher/node/$output/type/instance Batch []struct { Timestasmp string // Tunestamp if event Event map[string]string // event values } `json:"batch"` // time ordered list of events Timestamp string `json:"timestamp"` // timestamp the batch is created }
OutputBatchMessage message with multiple output events
type OutputDiscoveryMessage ¶
type OutputDiscoveryMessage struct { Address string `json:"address"` // Address of the publication: zone/publisher/node/$output/type/instance Attr NodeAttrMap `json:"attr,omitempty"` // Attributes describing this output Config ConfigAttrMap `json:"config,omitempty"` // Optional configuration of output DataType DataType `json:"dataType,omitempty"` // output value data type, default is string EnumValues []string `json:"enumValues,omitempty"` // possible enum output values for enum datatype Max float32 `json:"max,omitempty"` // optional max value of output for numeric data types Min float32 `json:"min,omitempty"` // optional min value of output for numeric data types Timestamp string `json:"timestamp"` // time the record is last updated Unit Unit `json:"unit,omitempty"` // unit of output value // For convenience, filled when registering or receiving OutputID string `json:"-"` NodeHWID string `json:"-"` PublisherID string `json:"-"` OutputType OutputType `json:"-"` Instance string `json:"-"` }
OutputDiscoveryMessage with node output description
type OutputEventMessage ¶
type OutputEventMessage struct { Address string `json:"address"` // Address of the publication: zone/publisher/node/$output/type/instance Event map[string]string `json:"event"` Timestamp string `json:"timestamp"` }
OutputEventMessage message with multiple output values
type OutputForecastMessage ¶
type OutputForecastMessage struct { Address string `json:"address"` // Address of the publication: zone/publisher/node/$output/type/instance Duration int `json:"duration,omitempty"` Forecast []OutputValue `json:"forecast"` // list of timestamp and value pairs Timestamp string `json:"timestamp"` // timestamp the forecast was created Unit Unit `json:"unit,omitempty"` }
OutputForecastMessage with prediction output values
type OutputHistoryMessage ¶
type OutputHistoryMessage struct { Address string `json:"address"` // Address of the publication: zone/publisher/node/$output/type/instance Duration int `json:"duration,omitempty"` History []OutputValue `json:"history"` Timestamp string `json:"timestamp"` Unit Unit `json:"unit,omitempty"` }
OutputHistoryMessage with historical output value
type OutputLatestMessage ¶
type OutputLatestMessage struct { Address string `json:"address"` // Address of the publication: zone/publisher/node/$output/type/instance Timestamp string `json:"timestamp"` // timestamp of value Unit Unit `json:"unit,omitempty"` Value string `json:"value"` // this can also be a string containing a list, eg "[ a, b, c ]"" }
OutputLatestMessage struct to send/receive the '$latest' command
type OutputValue ¶
type OutputValue struct { Timestamp string `json:"timestamp"` // Timestamp of the value is ISO 8601 Value string `json:"value"` // this can also be a string containing a list, eg "[ a, b, c ]"" EpochTime int64 `json:"epoch"` // seconds since jan 1st, 1970, }
OutputValue struct for history and forecast
type PublisherFullIdentity ¶
type PublisherFullIdentity struct { PublisherIdentityMessage PrivateKey string `json:"privateKey"` // private key for signing (PEM format) Sender string `json:"sender"` // sender of this update, usually the DSS }
PublisherFullIdentity containing the public identity, DSS signature and private key Also used by the DSS to renew a publisher's identity. This message MUST be encrypted and signed by the DSS
type PublisherIdentityMessage ¶
type PublisherIdentityMessage struct { Address string `json:"address"` // publication address of this identity, eg domain/publisherId/\$identity Certificate string `json:"certificate,omitempty"` // optional x509 cert base64 encoded Domain string `json:"domain"` // IoT domain name for this publisher IssuerID string `json:"issuerId"` // Issuer of the identity, the DSS, publisherId or CA Location string `json:"location,omitempty"` // city, province, country Organization string `json:"organization"` // publishing organization PublicKey string `json:"publicKey"` // public key in PEM format for signature verification and encryption PublisherID string `json:"publisherId"` // This publisher's ID for this domain ValidUntil string `json:"validUntil"` // timestamp this identity expires IdentitySignature string `json:"signature"` // base64 encoded signature of this identity Timestamp string `json:"timestamp"` // timestamp this message was created }
PublisherIdentityMessage contains the public identity of a publisher
type PublisherRunState ¶
type PublisherRunState string
PublisherRunState indicates the operating status of the publisher. Used in LWT.
const ( PublisherRunStateConnected PublisherRunState = "connected" // Publisher is connected and working PublisherRunStateDisconnected PublisherRunState = "disconnected" // Publisher has cleanly disconnected PublisherRunStateFailed PublisherRunState = "failed" // Publisher failed to start PublisherRunStateInitializing PublisherRunState = "initializing" // Publisher is initializing PublisherRunStateLost PublisherRunState = "lost" // Publisher unexpectedly disconnected )
PublisherState values
type PublisherStatusMessage ¶
type PublisherStatusMessage struct { Address string `json:"address"` // publication address of this message Status PublisherRunState `json:"status"` }
PublisherStatusMessage containing 'alive' status, used in LWT
type SetInputMessage ¶
type SetInputMessage struct { Address string `json:"address"` // zone/publisher/node/$set/type/instance Timestamp string `json:"timestamp"` Sender string `json:"sender"` // sending node: zone/publisher/nodeId Value string `json:"value"` // this can also be a string containing a list, eg "[ a, b, c ]"" }
SetInputMessage to control an input
type SetNodeIDMessage ¶
type SetNodeIDMessage struct { Address string `json:"address"` // zone/publisher/node/$alias - existing address NodeID string `json:"nodeId"` // new node ID to set Sender string `json:"sender"` // sending node: zone/publisher/node Timestamp string `json:"timestamp"` }
SetNodeIDMessage to change a node's ID
type Unit ¶
type Unit string
Unit defines constants with input and output unit names.
const ( UnitNone Unit = "" UnitAmp Unit = "A" UnitCelcius Unit = "C" UnitCandela Unit = "cd" UnitCount Unit = "#" UnitDegree Unit = "Degree" UnitFahrenheit Unit = "F" UnitFeet Unit = "ft" UnitGallon Unit = "Gal" UnitJpeg Unit = "jpeg" UnitKelvin Unit = "K" UnitKmPerHour Unit = "Kph" UnitLiter Unit = "L" UnitMercury Unit = "hg" UnitMeter Unit = "m" UnitMetersPerSecond Unit = "m/s" UnitMilesPerHour Unit = "mph" UnitMillibar Unit = "mbar" UnitMole Unit = "mol" UnitPartsPerMillion Unit = "ppm" UnitPng Unit = "png" UnitKWH Unit = "KWh" UnitKG Unit = "kg" UnitLux Unit = "lux" UnitPascal Unit = "Pa" UnitPercent Unit = "%" UnitPounds Unit = "lbs" UnitSpeed Unit = "m/s" UnitPSI Unit = "psi" UnitSecond Unit = "s " UnitVolt Unit = "V" UnitWatt Unit = "W" )
Defined unit types
type UpgradeFirmwareMessage ¶
type UpgradeFirmwareMessage struct { Address string `json:"address"` // message address MD5 string `json:"md5"` // firmware MD5 Firmware []byte `json:"firmware"` // firmware code FWVersion string `json:"fwVersion"` // firmware version Sender string `json:"sender"` // sending node: zone/publisher/nodeId Timestamp string `json:"timestamp"` }
UpgradeFirmwareMessage with node firmware