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

Send events over MQTT too #75

Open
hakan42 opened this issue May 14, 2021 · 5 comments
Open

Send events over MQTT too #75

hakan42 opened this issue May 14, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@hakan42
Copy link

hakan42 commented May 14, 2021

Send the event to be tweeted about as a json-formatted message to a MQTT server, a client of which in turn can decide whether to tweet about it or notify the home automation or to water plants :)

This could be in addition to the tweet setup, or the tweeting part could be extracted into its own container.

If a running total of the current day / week / whatever could be included in the message, this could tie in well with #21

@kx1t
Copy link
Member

kx1t commented May 14, 2021

How would that work? Where would the mqttwarn server be running? On the same Rpi? In the Planefence container?
Generating a JSON formatted message isn't too hard, but I need some help / research on how to send that message to a MQTT server.

@kx1t kx1t added the enhancement New feature or request label May 14, 2021
@hakan42
Copy link
Author

hakan42 commented May 14, 2021

The mqttwarn server would run... wherever you want it to. I would assume that someone who would run such a setup would already have a server where mqttwarn is already available.

I would avoid running the tweeter in the same container as planefence, I tend to keep each container as small as possible. For people who want to have the same functionality as now without changing too much, we could create a compose file which starts planefence, mosquitto and mqttwarn.

I could set up a documentation how to create a tweeting agent, there are examples in the mqttwarn docu itself.

@kx1t
Copy link
Member

kx1t commented May 14, 2021 via email

@hakan42
Copy link
Author

hakan42 commented May 15, 2021

You could send your message to mosquitto using the command line client. Steve has many good examples on his guide.

For the docker image, the command line tools should be included in the "mosquitto-client" package.

I guess you would want to include the path to the screen shot in the message as well, and whoever wants to consume the message would need to find their own way to get the image file to the mqttwarn container.

@hakan42
Copy link
Author

hakan42 commented May 16, 2021

Actually, @mikenye created some shell scripts to push json-formatted data to an MQTT server too:

https://github.com/mikenye/docker-adsb-to-mqtt/tree/master/rootfs/usr/local/bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants