diff --git a/GPIO/GPIO b/GPIO/GPIO index de79612..8ab9e8d 100644 Binary files a/GPIO/GPIO and b/GPIO/GPIO differ diff --git a/GPIO/GPIO.go b/GPIO/GPIO.go index e946c51..e0eef85 100644 --- a/GPIO/GPIO.go +++ b/GPIO/GPIO.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "io/ioutil" + "log" "os" "time" @@ -150,7 +151,7 @@ func LoadConfig(path string) { } func main() { // Bat debug - //mqtt.DEBUG = log.New(os.Stderr, "DEBUG ", log.Ltime) + mqtt.DEBUG = log.New(os.Stderr, "DEBUG ", log.Ltime) fmt.Println("======== START MAIN ==========") time.Sleep(1 * time.Second) if state_read_ecf == false { @@ -232,10 +233,10 @@ func mqtt_begin() { } } - opts_cms_bi.OnConnect = func(c mqtt.Client) { - fmt.Printf("Client connected, subscribing to: " + CMS_TOPIC_IN) - c.Subscribe(CMS_TOPIC_IN, 0, mqtt_messageHandler) - } + // opts_cms_bi.OnConnect = func(c mqtt.Client) { + // fmt.Printf("Client connected, subscribing to: " + CMS_TOPIC_IN) + // c.Subscribe(CMS_TOPIC_IN, 0, mqtt_messageHandler) + // } }