Documentation ¶
Index ¶
- Constants
- func FirstN(s string, n int) string
- func MsgPubAdvStateDiffuser(on bool) (string, string)
- func MsgPubAdvStateLight(on bool) (string, string)
- func MsgPubCheckStatus11() (string, string)
- func MsgPubCheckWater() (string, string)
- func MsgPubSetDiffuser(on bool) (string, string)
- func MsgPubSetLight(on bool) (string, string)
- func MsgPubSetLightColor(color int) (string, string)
- func MsgPubSetLightDim(dim int) (string, string)
- func MsgPubSetLightMode(mode int) (string, string)
- func Start(config *Config, mqttSubMsgChannel chan<- Msg) chan<- Msg
- func TopicSubError() string
- func TopicSubPower1() string
- func TopicSubPower2() string
- func TopicSubState() string
- func TopicSubStatus11() string
- type Config
- type Msg
Constants ¶
View Source
const ( DefMqttClientId = "smokey_mqtt_agent" // no longer than 23 characters DefBrokerURL = "tcp://192.168.10.238:1883" DefBrokerUser = "" DefBrokerPass = "" DefTopicPrefix = "smokey/" )
View Source
const ( DefTopicSubPower1 = "stat/POWER1" DefTopicSubPower2 = "stat/POWER2" //DefTopicSubResult = "stat/RESULT" DefTopicSubError = "stat/error" //DefTopicSubFanMode = "stat/fanmode" DefTopicSubStatus11 = "stat/STATUS11" DefTopicSubState = "tele/STATE" DefTopicPubAdvStateLight = "state/light" DefTopicPubAdvStateDiffuser = "state/diffuser" DefTopicPubCheckStatus = "cmnd/Status" DefTopicPubCheckWater = "cmnd/TuyaSend8" DefTopicPubDiffuser = "cmnd/Power1" DefTopicPubLight = "cmnd/Power2" DefTopicPubLightMode = "cmnd/TuyaEnum2" DefTopicPubLightDim = "cmnd/Dimmer0" DefTopicPubLightColor = "cmnd/Color1" )
Variables ¶
This section is empty.
Functions ¶
func MsgPubAdvStateDiffuser ¶
func MsgPubAdvStateLight ¶
func MsgPubCheckStatus11 ¶
func MsgPubCheckWater ¶
func MsgPubSetDiffuser ¶
func MsgPubSetLight ¶
func MsgPubSetLightColor ¶
func MsgPubSetLightDim ¶
func MsgPubSetLightMode ¶
func TopicSubError ¶
func TopicSubError() string
func TopicSubPower1 ¶
func TopicSubPower1() string
func TopicSubPower2 ¶
func TopicSubPower2() string
func TopicSubState ¶
func TopicSubState() string
func TopicSubStatus11 ¶
func TopicSubStatus11() string
Types ¶
Click to show internal directories.
Click to hide internal directories.