RandomNinjaAtk / arr-scripts

Extended Container Scripts - Automation scripts to make life easier!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] - Lidarr - Add notifications

bonelifer opened this issue · comments

Describe the solution you'd like
Ability to have notifcations for various notifcation services like Gotify, NTFY.sh, and Pushover

What would be the purpose of the notifications?

I don't use Telegram... Should of specified for the ARL notification. It'd be nice to have other notifications, just to know that it is running and doing stuff, but ARL notification would be fine.

I wouldn't be able to do Gotify as I'm on iOS. NTFY.sh looks interesting, and Pushover costs money to use...so eh.

So out of those 3, I can investigate NTFY.sh. Keep in mind, the Telegram functionality uses a bot, so you can set the new ARL token through the bot. Notification apps are a one-way street.

Pushover, is really just a curl command away from implementation. Should just work, so really no need for you to pay to implement it.

Pushover, is really just a curl command away from implementation. Should just work, so really no need for you to pay to implement it.

I also see the python implementation is really simple. Looks like there' s a free trial too. I'll give it a shot.
@RandomNinjaAtk would you be able to assign me?

Thanks!

@bonelifer I have something working for both ntfy (web version) and pushover. Is ntfy generally used in its web-hosted configuration, or self-hosted? Seems like the web-hosted version is really insecure since anyone can just subscribe to your topic.

I host it in docker.

Gotcha...hmmm. I'm wondering, because you can have python's requests listen on the ntfy topic, I bet you could send a notif to the topic and use that to set a new token. That's a "nice to have" though.

Any chance you could send me an example docker-compose for ntfy, or is their documentation easy enough? To be honest, I think I'd like to use it lol.

NTFY_UPSTREAM_BASE_URL needs to stay as is if you are using IOS.

version: '3'
services:
  ntfy:
    image: binwiederhier/ntfy
    container_name: ntfy
    environment:
      NTFY_BASE_URL: http://192.168.1.80
      NTFY_AUTH_FILE: /etc/ntfy/auth.db
      NTFY_AUTH_DEFAULT_ACCESS: read-write
      NTFY_BEHIND_PROXY: true
      NTFY_ATTACHMENT_CACHE_DIR: /etc/ntfy/attachments
      NTFY_UPSTREAM_BASE_URL: https://ntfy.sh
      NTFY_ENABLE_LOGIN: true
     # NTFY_WEB_PUSH_PUBLIC_KEY: <public_key>
     # NTFY_WEB_PUSH_PRIVATE_KEY: <private_key>
     # NTFY_WEB_PUSH_FILE: /etc/ntfy/webpush.db
     # NTFY_WEB_PUSH_EMAIL_ADDRESS: <email>
    volumes:
      - ./data/:/etc/ntfy
    ports:
      - 9191:80
    command: serve

    healthcheck: # optional: remember to adapt the host:port to your environment
        test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"]
        interval: 60s
        timeout: 10s
        retries: 3
        start_period: 40s
    restart: unless-stopped

Thanks, I'll get going on that.

Got it working in Pushover:
image

And on self-hosted ntfy:
image

@bonelifer Just out of curiosity, do you use Token Auth or Basic Auth? I suppose I could support both...but currently using token auth for ntfy.

Ok... token auth it is! PR #251 Created.

@bonelifer , can you verify that it works? I've got it working for both on my side, a 3rd party would be greatly appreciated before I close the issue.

I'll give it a try tomorrow.