Lovelace: Upcoming Media Card

I’m not sure what you’re saying. Did you try the card outside of card-modder? What error are you getting? The error that you provided before just tells me that the card doesn’t see the sensor. Does the sensor appear and if so what data is it showing? Do the default HA radarr & plex components work?

Yes, I tried out the card-modder and the same error. All sensors work - radarr, plex, here’s the code.

     Radarr
  • platform: radarr_upcoming_media
    api_key: !secret radarr
    host: 192.168.1.199
    port: 7878
    days: 120
    ssl: false

    plex

  • platform: plex_recently_added
    token: !secret plex
    server_name: HP
    ssl: false
    ssl_cert: false
    download_images: false
    max: 5

Under developer tools on the bottom of the sidebar click the icon that looks like this <>

What data is displayed for sensor.radarr_upcoming_media and sensor.plex_recently_added

He does not show the data

What do you see when you go to the url below

http://[radarr_IP]:[radar_port]/api/calendar?apikey=[radarr_API_key]&start=2018-11-14&end=2019-3-14

Something wrong - I get the following error depending on what you wrote me down
{
“error”: “Unauthorized”
}

Yes, something is wrong with radarr then. I unfortunately couldn’t tell you what.

Some things you might try:

  • make sure you’re using https if you use ssl in radarr
  • make sure your IP address, port, and API key are correct
  • make sure you’re using a URL base if it’s set
1 Like

I agree on json being easier to work with than xml! I did a get in postman for recentlyAdded and this is the response for one of the movies, if it helps: https://pastebin.com/HpBBqRNx
It seems like the “originally available at” should be the right one to take the date from? Or is it one of the weirdly formatted ones?
I thought I mis-googled since I couldn’t find the docs, but then I see. If I have some time to spare, do you mind me forking your component and maybe adding an option for On deck?

Not only do I not mind, I’d be thrilled and appreciate any contributions! I’m sure I’ve mentioned it before, but this is my learning project. Before this I knew very little javascript and had zero python skills, so any help with features, refactoring, etc. is much appreciated.

1 Like

Actually its ‘addedAt’ unfortunately its in epoch time.

@teachingbirds @mayker
I also experience the same 18/01 date being displayed for all recently added tv series in Plex, while Radarr has downloaded them over a period of a couple of days this week.

I am having issues with sensor.plex_recently_added
It never seems to load, no matter how I put it… either with the hostname or IP+MAC

I put the .js file in /config/custom_components/sensor/

I have tried with with server_name and also with host(giving the IP or computer name)+port, also SSL and no SSL enabled. I will get back later with the logs. Is there anything I am missing? Also on plex I tried with “Secure connections” to “preferred” and “disabled”

Okay, will look into it. Might have to wait till next week though, going away for a bit.

1 Like

Hard to tell without the error or more information. I have started a bit of a troubleshooting guide. Be sure to check it out.

No hurry, enjoy your free time!

I really do not know what to do anymore.

  1. I removed the radar
  2. I moved to the plex

Settings:

  - platform: plex_recently_added
    token: !secret plex
    host: 192.168.1.199
    port: 32400
    server_name: HP
    ssl: false
    ssl_cert: false
    download_images: false
    max: 5 

     - type: custom:card-modder
        card:
          type: custom:upcoming-media-card
          entity: sensor.plex_recently_added
          title: Recently Downloaded

        style:
          background-image: url("/local/lovelace/background/cardbackK.png")
          background-repeat: no-repeat
          background-color: rgba(50,50,50,0.3)
          background-size: 100%
          border-radius: 15px
          border: solid 1px rgba(100,100,100,0.3)
          box-shadow: 3px 3px rgba(0,0,0,0.4)

When I go into a direct link I get all the information:

http://192.168.1.199:32400/library/metadata/6298?checkFiles=1&includeExtras=1&includeBandwidths=1&X-Plex-Token=xxx

Does the regular radarr sensor work? https://www.home-assistant.io/components/sensor.radarr/

Looking at the warnings it cant find the host. So if the regular radarr sensor works then something is strange.

Also, for plex you should use either host/ip or server name. Not both right?

Updates

Plex:

  • Added $aired keyword. Displays the original air date for items (Plex is the only one to use this at the moment.). Thanks to @teachingbirds!
  • Possible fix for incorrect download dates
  • Possible fix for directory errors when downloading images

Card:

4 Likes

Thanks for the quick Plex date fix, correct dates are displayed now.

1 Like

So, just noticed that Plex recently added card does not update with new content. Restart of home assistant and new content is added. Dont really know what the problem is. No issues in log. Anyone else seen this.
Upcoming media card 0.3.2
Plex recently added sensor 0.1.4

1 Like