Added debugging prints
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c8a61c0a8a
commit
748e12b1e3
3
main.go
3
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"
|
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))
|
req, err := http.NewRequest("POST", fmt.Sprintf("https://ntfy.sh/%s", ntfy.topic), strings.NewReader(description))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
@ -161,6 +163,7 @@ func connectMQTT() MQTT.Client {
|
||||||
|
|
||||||
func connectNtfy() ntfy {
|
func connectNtfy() ntfy {
|
||||||
topic, _ := os.LookupEnv("NTFY_TOPIC")
|
topic, _ := os.LookupEnv("NTFY_TOPIC")
|
||||||
|
fmt.Println(topic)
|
||||||
ntfy := ntfy{topic}
|
ntfy := ntfy{topic}
|
||||||
|
|
||||||
// @TODO Make sure the topic is valid?
|
// @TODO Make sure the topic is valid?
|
||||||
|
|
Reference in New Issue
Block a user