Digital movie poster - Kodi version (dennisaion) Plex version (Lanky)

Thanks! I hope the code is helpful. I’m not familiar with Kodi at all, but if it’s just a matter of getting xml from particular URLs, you’d just need to update the URLs and xml tags in my code.

Another milestone TTS announcing movies played.

- alias: 'Announcement Movie playing'
  trigger:
    platform: state
    entity_id: media_player.kodi
    from: 'paused'
    to: 'playing'
  action:
    service: notify.notify
    data_template:
      message:  >
        {{ trigger.to_state.attributes.media_title }} is now {{ states.media_player.kodi.state }} in the {{ trigger.to_state.attributes.friendly_name }}.
      title: ""

- alias: 'Announcement Movie paused'
  trigger:
    platform: state
    entity_id: media_player.kodi
    from: 'playing'
    to: 'paused'
  action:
    service: notify.notify
    data_template:
      message:  >
        {{ trigger.to_state.attributes.media_title }} is now {{ states.media_player.kodi.state }} in the {{ trigger.to_state.attributes.friendly_name }}.
      title: ""

Yea today my LVDS Controller board came in. I can now finally finish the DMP.

1 Like

That just looks beautiful man!

Thank you. Will post pick when media room is ready. Maybe will do a video of the whole thing in action with the scenes and verbal announcement etc

WALL-E!!!

I ABSOLUTELY LOVE WALL-E. I watched the movie during Friday nights when I celebrate the end of the week with pizza (Digiorno’s Stuffed Crust Supreme Pizza–I sometimes went with Pizza Hut). I actually watch The Incredibles, Tron: Legacy, and Tomorrowland, but mostly two weeks in a month I watch WALL-E since I don’t think Pixar can do any better than that movie. The reason why is because of Axiom and I’m not talking about fat people, as that’s not like me. Axiom is the coolest ship that makes me glimpse into the future–that’s my personality. The Incredibles has that futuristic hallway that took place in the remote island and I like how the waterfall opens up so the vehicle in the rail goes through. As for Tomorrowland–

Whoops! I’m going way too far off-topic. Sometimes I feel like speaking my mind out. But I hope you get the idea–to me it’s like being at the Future World in Epcot and enjoy the futuristic sights. I can’t compare to MK’s Tomorrowland with all the busy crowds and loud dance music that just doesn’t feel right to me. Heh… :slight_smile:

Anyway, I would love to build myself a digital poster to put it beside the door that leads to a dedicated home theater room when I build a house.

If you need a writeup on how to make the framed DMP itself I can help you out.

First you need to score a LCD/LED panel from a broken laptop. Panel needs to be in tiptop shape.

Try and get 15" or up. When you get the panel out make sure any attached wiring comes along in one piece.

When you have the panel out check on the back for the exact model number.
Tell me which model it is and I’ll tell you which LVDS board to get and where to get it.

For the frame you can either built one yourself or order a custom one.
Make sure to measure the panel and give that an extra two millimeter for width and length as “INNER measurement” for the frame.

And yes I also watch the movie on a regular basis for the same reason. Like the extra’s where you get to watch the ship without any people or robots in it.

Hey. I’ve just tried this but when I go to the address all I’m seeing is the html code from the index file, not the page itself. Is that something I did wrong somewhere?

Okay so just if anybody is having the same issue as me.
It was never going into the “source.onmessage” function. I had to append my api password with ?api_password=xxx to both the url in the browser as well as to the line

var source = new EventSource("/api/stream?api_password=xxx");

I was logged in to HA on another tab with my API password being stored in cookies with the “remember me” checkbox.

Maybe it has to do something with the fact that I run HA with https and a dynDNS.

Any ideas how to not have to enter the api_password?

Been playing with this a bit. I use plex and have it set to only secure connections. I couldn’t get it to work at first but after playing with it a bit I got it. I had to change all the http: code in the script to https: then change the part in the script that says

entity_picture = entity_picture.replace(“http://localhost”, “https://”);

to add in the https:

Also had to add in a new variable for the X-Plex-Token, I just added it under the following.

    var pmsAddress = "<IP ADDRESS>";
var pmsPort = "32400";
    var pmsKey = "?X-Plex-Token=<TOKEN>"

You can get the token by using the browser to log into your plex app and clicking any media then clicking INFO and SHOW XML. The token will be in the address that is opened.

Finally I had to add in the pmsKey variable I made into the following lines.

jQuery.get(“https://” + pmsAddress + “:” + pmsPort + “/library/sections/” + pmsKey).done(function(xml)

jQuery.get(“https://” + pmsAddress + “:” + pmsPort + “/library/sections/” + sKey + “/unwatched/” + pmsKey).done(function(xml)

sArt = “https://” + pmsAddress + “:” + pmsPort + sArt + “/” + pmsKey;

Don’t forget to clear your cache as stated in previous posts. The first time you run it it will fail. If you hit F12 to bring up the debug and click on the “Network” tab you will see it’s trying to hit a page and failing. You have to rightclick on that link and open in new tab then hit accept through the security prompts. You have to do this everytime you clear cache. After that you can hit refresh on the page and it should load.

I’m not a programmer so this is probably not the correct/best way to do this but it worked for me.

Enjoy.

2 Likes

I am having similar issues to atomicpapa, however, I was able to play a file that finally showed the entity_picture within HASS. It just wont transfer to the DMP page. I am using kodi, I have the index.html and css files in their appropriate pages. The page shows up with the title and gray background. However no image or text is displayed. I can navigate to the the location of the entity_picture and see the movie cover. Any ideas?

You probably run your Kodi with a username and password set.
Remove this and you’ll see it works.

Removed the the username/password from kodi and the HASS configuration. Still blank page.

Did you clear browser cache and update library on Kodi before you ran it again?

Yes I did. The movies within my library now show an entity_picture within HASS. However, it doesn’t show up on DMP.

Change your Kodi port to 80 instead of 8080 in Kodi settings and in your Yaml file.
Restart Kodi and then restart HA.

I think the latest version of HASS has changed how the entity_picture is stored. It looks like this now: entity_picture: /api/media_player_proxy/media_player.lr_kodi?token=XXXXXXXXXXXXXXXX

Dude. The DMP takes the picture from KODI not from HASS. :blush:

HASS serves up the location of the picture on Kodi to DMP.

attributes entity_picture

var entity_picture = obj.data.new_state.attributes.entity_picture;

Does this not read the link to the entity_picture from HASS? I realize that the link for the entity_picture points to a Kodi hosted file. My point is that my photos used to show up and entity_picture contained a valid link to a Kodi hosted picture of the movie posters. However this is no longer the case, and now I see:

entity_picture: /api/media_player_proxy/media_player.lr_kodi?token=XXXXXXXXXXXXXXXX

Nevertheless, persistence is the key, I’ll eventually figure it out.

I see this

{
  "entity_picture": "http://192.168.0.106:80/image/image%3A%2F%2Fhttp%253a%252f%252fimage.tmdb.org%252ft%252fp%252foriginal%252fy31QB9kn3XSudA15tV7UWQ9XLuW.jpg%2F",
  "friendly_name": "Media Room",
  "icon": "mdi:filmstrip",
  "is_volume_muted": false,
  "media_content_id": {
    "unknown": ""
  },
  "media_content_type": "video",
  "media_duration": 7251,
  "media_title": "Guardians of the Galaxy",
  "supported_media_commands": 4671,
  "volume_level": 1
}