juftin / camply

camply, the campsite finder ⛺️ - a tool to find campsites at sold out campgrounds through sites like recreation.gov
https://juftin.com/camply/
MIT License
486 stars 94 forks source link

Notifications over MQTT? #266

Closed brayStorm closed 1 year ago

brayStorm commented 1 year ago

Is your feature request related to a problem? Please describe. Greatly prefer local consumption of notifications.

Describe the solution you'd like MQTT!

Describe alternatives you've considered

Additional context

juftin commented 1 year ago

MQTT is compatible via Apprise Notifications https://juftin.com/camply/command_line_usage/#send-a-notification-using-apprise-compatible-services

juftin commented 1 year ago
pipx install "camply[apprise]"

Your APPRISE_URL env variable / config entry would be in the following format:

mqtt://hostname/topic
mqtt://user@hostname/topic
mqtts://user:pass@hostname:9883/topic

https://github.com/caronc/apprise/wiki/Notify_mqtt

juftin commented 1 year ago

Let me know what your experience is like with that.

pipx install "camply[apprise]"
export APPRISE_URL=xxxxxxxxxxxx
camply test-notifications --notifications apprise

You may, or may not need to perform a dependency injection into the pipx environment to make that work

pipx inject camply paho-mqtt
brayStorm commented 1 year ago

I'm monitoring with MQTT Explorer. I've tried all the options for apprise under MQTT URL, and camply seems to send the test notification just fine, but I receive nothing on the MQTT feed. Any ideas?

brayStorm commented 1 year ago

pipx install "camply[apprise]" doesn't work, but pipx install apprise does. 🤷

juftin commented 1 year ago

Did you end up getting this to work @brayStorm? I noticed it's marked as closed.

brayStorm commented 1 year ago

Yes! Had to run pipx install apprise.