diff options
Diffstat (limited to 'shelly.go')
| -rw-r--r-- | shelly.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -9,7 +9,11 @@ import ( "github.com/gorilla/websocket" ) -func ShellyRun(config ShellyConfigs, route Route) { +func ShellyRun(config ShellyConfigs, tx chan MQTTMessage, route Route) { + for _, shelly := range config { + tx <- MQTTMessage{fmt.Sprintf("cover/%s", shelly.ID), []byte("exists"), true} + } + for message := range route.Destination { ip, command, err := parseMessage(config, message) if err != nil { |
