Compare commits

...

1 Commits

Author SHA1 Message Date
Cedric Verstraeten
59358acb30 add logging + empty friendly name 2023-09-12 15:17:56 +02:00
2 changed files with 3 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ type Config struct {
Type string `json:"type"`
Key string `json:"key"`
Name string `json:"name"`
FriendlyName string `json:"friendly_name"`
FriendlyName string `json:"friendly_name,omitempty" bson:"friendly_name,omitempty"`
Time string `json:"time" bson:"time"`
Offline string `json:"offline"`
AutoClean string `json:"auto_clean"`

View File

@@ -256,6 +256,8 @@ func MQTTListenerHandler(mqttClient mqtt.Client, hubKey string, configDirectory
// Not relevant for this device, so we'll ignore it.
} else {
// We'll find out which message we received, and act accordingly.
log.Log.Info("MQTTListenerHandler: received message with action: " + payload.Action)
switch payload.Action {
case "record":
HandleRecording(mqttClient, hubKey, payload, configuration, communication)