Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MQTT (Home Assistant) #86

Closed
simskij opened this issue Nov 19, 2020 · 8 comments
Closed

Add support for MQTT (Home Assistant) #86

simskij opened this issue Nov 19, 2020 · 8 comments
Labels
Status: Help wanted Extra attention is needed Type: Enhancement New feature or request

Comments

@simskij
Copy link
Member

simskij commented Nov 19, 2020

As requested in containrrr/watchtower#618 (comment), we should consider adding support for sending notifications to home assistant. I'm not sure exactly how, or if, this will work, so some investigation will be needed unless someone has a clear idea.

@dougle03
Copy link

MQTT messaging perhaps?

@rikardronnkvist
Copy link

As mentioned here...

containrrr/watchtower#676

@simskij
Copy link
Member Author

simskij commented Dec 20, 2020

What would be the use case of this? For instance, which lovelace panel would you use to visualize the messages you receive? As a home assistant user myself, I kind of fail to figure out how this would be used. 😅

@simskij simskij changed the title Add support for home assistant Add support for MQTT (Home Assistant) Jan 22, 2021
@Morphy99
Copy link

Morphy99 commented Mar 4, 2021

What would be the use case of this? For instance, which lovelace panel would you use to visualize the messages you receive? As a home assistant user myself, I kind of fail to figure out how this would be used.

I use Home Assistant in a docker container and I use Watchtower to update HA and other containers. It would be nice to get notifications when there is an image update available. I use HA mobile companion for my notifications so it would be good to get it through that.

I also have a lovelace panel for docker info, updating, etc.

@simskij simskij added Type: Enhancement New feature or request Status: Help wanted Extra attention is needed labels Apr 23, 2021
@fanuch
Copy link

fanuch commented Dec 17, 2021

I'm also in the same boat as @Morphy99.
HA user looking at Watchtower.

I don't think MQTT is the right choice though.

MQTT is no longer built in to Home Assistant core (as far as I recall) and adding another messaging protocol to this project that supports HTTP doesn't make much sense for maintenance, development, and direction (I will assume).

If you wanted notifications from shoutrrr to be detected on a micro-sensor that needs MQTT for the bandwidth/size then sure, but seems like everyone here is echoing that we want Shoutrrr to reach Home Assistant core for automation and notifications.

Creating a webhook is trivial and pairing that with a quick template to forward the webhook as an action to notify is also very simple and versatile.

Once you get this Shoutrrr message through to HA, you can chop and change the action to whatever notification service you please.

If this is an internal service, then by default no authentication is required on the webhook which further simplifies things.

I'm very fresh but I will be looking at how to pass a generic POST for the moment, but if a PR is required I will come back and give that ago.

edit just read containrrr/watchtower#618 (comment) and it echos my sentiments.
If there isn't a generic method to accept POST then that is definitely something that's a good idea for a messaging relay and that would potentially resolve this

@HeedfulCrayon
Copy link

I would agree with @fanuch on this one. I have tried testing the generic method with shoutrrr, and it doesn't seem to do a post, which is where the enhancement would be needed for home assistant since GET requests do not work for their webhook automations

@piksel
Copy link
Member

piksel commented Apr 8, 2022

@HeedfulCrayon Generic does use POST:

res, err := http.Post(postURL, config.ContentType, payload)

@simskij simskij closed this as completed May 26, 2022
@simskij
Copy link
Member Author

simskij commented May 26, 2022

As this is already covered from what I can tell, I'm closing this issue. Feel free to open new ones if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Help wanted Extra attention is needed Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants