From 748e12b1e3e5fe74c81aa8321629d3a79da4a9aa Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Sat, 17 Sep 2022 03:53:00 +0200 Subject: [PATCH] Added debugging prints --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 7092afb..d75ce15 100644 --- a/main.go +++ b/main.go @@ -99,6 +99,8 @@ func (ntfy *ntfy) notifyPresence(home bool) { actions = "broadcast, Set as home, extras.cmd=presence, extras.state=1, clear=true" } + fmt.Printf("https://ntfy.sh/%s\n", ntfy.topic) + req, err := http.NewRequest("POST", fmt.Sprintf("https://ntfy.sh/%s", ntfy.topic), strings.NewReader(description)) if err != nil { panic(err) @@ -161,6 +163,7 @@ func connectMQTT() MQTT.Client { func connectNtfy() ntfy { topic, _ := os.LookupEnv("NTFY_TOPIC") + fmt.Println(topic) ntfy := ntfy{topic} // @TODO Make sure the topic is valid?