Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogTopicOnce ¶
Types ¶
type HandleFunc ¶
type HandleFunc func(c Config, input Input, outputFunc OutputFunc)
func GetHandler ¶
func GetHandler(implementation string) (h HandleFunc, err error)
type OutputFunc ¶
type OutputFunc func(output Output)
type SensorMessage ¶
type SensorMessage struct { Time string AM2301 *TemperatureHumidity SI7021 *TemperatureHumidity DS18B20 *struct { Temperature float64 } TempUnit string }
type StateMessage ¶
type StateMessage struct { Time string // save to timeValue Uptime string // save to timeValue Vcc float64 // save to floatValues Power string // save to boolValues Power1 string // save to boolValues Power2 string // save to boolValues Power3 string // save to boolValues Power4 string // save to boolValues Wifi Wifi }
examples:
{ "Time":"2018-12-16T23:05:14","Uptime":"1T11:32:21","Vcc":3.177,"POWER":"OFF", "Wifi":{"AP":1,"SSId":"piegn-iot","BSSId":"04:F0:21:33:40:99","Channel":1,"RSSI":66} }
{ "Time":"2018-12-16T23:06:09","Uptime":"8T03:08:26","Vcc":3.112, "POWER1":"ON","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF", "Wifi":{"AP":1,"SSId":"piegn-iot","BSSId":"04:F0:21:2F:B7:CC","Channel":1,"RSSI":100} }
type TemperatureHumidity ¶
Click to show internal directories.
Click to hide internal directories.