Homey Community Forum

[APP] Sonarr and Radarr

sonarrradarr

Connect Sonarr and Radarr with Homey

App Store page : https://homey.app/a/tv.video.sonarr.radarr/

Description

Connect Sonarr and/or Radarr with Homey and receive updates about grabbed and finished downloads and upcoming episodes and movies.

Instructions

For Homey to be able to receive updates from Sonarr and Radarr these applications need to send notifications to Homey on events like finished downloads. This is achieved by registering a webhook in Sonarr and/or Radarr. Below is a short instruction on how to register this webhook.

  • First add your Sonarr, Radarr or Lidarr installations as devices in Homey. You will need to fill in the IP address and API key from your instance. Also make sure you have done the basic setup of your Sonarr, Radarr or Lidarr instance, adding a clean install to Homey wont work.
  • Then log into your Sonarr or Radarr installation and go to “Settings > Connect” (these steps are not needed for a Lidarr installation).
  • Click on the plus button and click on the Webhook notification in the Add Notification popup
  • Enter the details as followed:
    • Name: Homey (or something similar)
    • On Grab: Yes
    • On Download: Yes
    • On Upgrade: No
    • On Rename: No
    • Filter Series Tags: Empty
    • URL for Sonarr: http(s)://yourip-or-homey-url/api/app/tv.video.sonarr.radarr/sonarr/ where you add the local IP of Homey (if on the same network as Sonarr) or the external cloud URL of Homey
    • URL for Radarr: http(s)://yourip-or-homey-url/api/app/tv.video.sonarr.radarr/radarr/ where you add the local IP of Homey (if on the same network as Radarr) or the external cloud URL of Homey
    • Method: POST

Donations

I enjoy creating apps for Homey and try to support them as best as I can. If you enjoy using my apps a donation in return for the time I put into this is much appreciated.

1 Like

Changelog

v2.1.1 - 2020-04-19

Add SSL (https) support for Sonarr, Radarr or Lidarr installations. Re-pair or edit device settings to enable.

v2.1.0 - 2020-03-25

Add support for notifications from Lidarr

v2.0.8 - 2019-11-15

Moved installation instructions from app store to community support topic.

v2.0.7 - 2019-02-06

FIX: improvements to pairing templates for firmware 2.x

v2.0.6 - 2018-12-27

FIX: removed incoming IP address security validation in api.js due to Athom removing the request object in firmware 2.x

v2.0.5 - 2018-12-14

FIX: update compatibility to enable install on Homey firmware v2.x

v2.0.4 - 2018-09-09

REFACTORING: switched from request node module to node-fetch (reduced footprint from 7,5MB to 400 kB)

v2.0.3 - 2018-08-22

  • UPDATE: updated app manifest to include id of new forum support topic
  • UPDATE: updated node packages to latest versions

v2.0.2 - 2018-04-26

  • UPDATE: updated dependencies to fix security issue in on of the packages, no functionality changes

This url http://123.12.1.1/api/app/tv.video.sonarr.radarr/sonarr/ (example ip ofcourse) just responds with:

{
    status: 404,
    result: "not_found"
}

Neither radarr nor sonarr can push to homey :frowning:

The API URL only listens to POST request, not to direct GET requests. What is the error you see in Sonarr or Radarr when you webhook notification as described in the instructions?

Ah, sorry, my bad. I had “GET” as method for some reason.

Hi! First of all thanks for making this app.

I have a flow that uses the ACTION to speak the latest movies or episodes downloaded.
However, If i ask google home to “ask homey” the flow is started nicely but the answer is being given on te homey speaker (which sounds horrible).
Is there a way to get the answer back through the google home speaker?

U can try with the Google TTS app, works like a charm!

1 Like

I keep getting a ‘error: Could not find that PairSession’, even after getting a new key from sonarr, any idea what i’m doing wrong here?

All i can tell you is to make sure the IP and port are correct and that your homey is connected on the same network.
I had the ports mixed up at the start and got the same error.

You can test the API + key from command line or any browswer in the same network.

$  curl http://IP:PORT/api/system/status?apikey=YOUR_API_KEY
    {
      "version": "2.0.0.5322",
<SNIP>

Hi, any chance you will include Lidarr in this app at some point?

Sure, submit a feature request on GitHub and I’ll look into the possibilities.

v2.1.0 - 2020-03-25

Add support for notifications from Lidarr

Perfect, thank you. It works great the little I’ve gotten to try so far.

v2.1.1 - 2020-04-19

Add SSL (https) support for Sonarr, Radarr or Lidarr installations. Re-pair or edit device settings to enable.

Got all the settings correct as described by you, but no notifications to Homey. Radarr, Sonarr and Lidarr do confirm a correct web webhook. None of them notify to Homey.

Message
Unable to send OnReleaseImport notification to: Homey: HTTP request failed: [500:InternalServerError] [POST] at [http://10.0.1.160/api/app/tv.video.sonarr.radarr/lidarr/]

Exception
NzbDrone.Common.Http.HttpException: HTTP request failed: [500:InternalServerError] [POST] at [http://10.0.1.160/api/app/tv.video.sonarr.radarr/lidarr/]
at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x00130] in <96b70a41daeb490db51c9994341a8d2b>:0
at NzbDrone.Core.Notifications.Webhook.WebhookProxy.SendWebhook (NzbDrone.Core.Notifications.Webhook.WebhookPayload body, NzbDrone.Core.Notifications.Webhook.WebhookSettings settings) [0x0006f] in :0
at NzbDrone.Core.Notifications.Webhook.Webhook.OnReleaseImport (NzbDrone.Core.Notifications.AlbumDownloadMessage message) [0x000a2] in :0
at NzbDrone.Core.Notifications.NotificationService.Handle (NzbDrone.Core.MediaFiles.Events.AlbumImportedEvent message) [0x000cf] in :0
{“code”:500,“error”:“Invalid response from Lidarr”,“error_description”:“Er is een onbekende fout opgetreden [unknown_error]”}

Could something between your Sonarr, Radarr and Lidarr instances block the traffic to Homey. Is you are running them in docker containers you might need to tweak the network settings of the containers.

No, not running in a docker just as spk’s on Synology. Testing the webhook gives a confirmation message within all of them, just nothing is received in Homey. Currently I also use Prowl, without any issue. Port forwarding ports 80 and 443 within my router for testing doesn’t change the behavior.

Edit: In none of the logs in Sonarr, Radarr or Lidarr is an error message, so my previous posted error might have to do with a new installation or Lidarr that wasn’t fully functional yet. So at senders side all seems correct, as the confirmations tell. Could it be at receiver side? In Homey I get ‘connected’ for all three apps, so I’m puzzled where this faults.

Did you actually set up a flow doing something with the message send to Homey?

Sorry for the late response. Yes, I activated a flow with “Movie downloaded” from the Radarr plugin as trigger. If I test is, I get a notification in Homey and a push message to my phone. The web hook test in Radarr is also ok, but doesn’t trigger the flow. I’m unable to figure out what might be wrong in the settings.

Update:
Fixed. Started from scratch again and now it’s working. Thanks!

Is there a possibility to do it the other way around? That you can ask homey to download a movie/show via sonarr/radarr?