Jump to content

Official emby home assistant integration


skank

Recommended Posts

  • 3 weeks later...
skank
On 7/12/2023 at 2:49 AM, seanbuff said:

Sounds pretty confusing. 😵‍💫

There should be no way Emby is sending to an ID you never gave it. If I were you I would start again, clean from scratch, including getting HA to generate a new webhook ID for you (not edit it yourself) and then delete and create a brand new webhook on the Emby side using the new URL.

Give that a shot and see how you go -- at least you know what you're looking for now. Good luck.

Tried like 10 times from scratch, it just doenst work :(

Link to comment
Share on other sites

seanbuff
21 minutes ago, skank said:

Tried like 10 times from scratch, it just doenst work :(

And in your Emby log, are you seeing the HttpClient POST towards HA?

And is it using the ID that Home Assistant generated for you?

Link to comment
Share on other sites

  • 3 weeks later...
fudgeum

I'm trying to copy the "active emby users" template from this thread but I'm getting a load of errors, is anyone able to help please?  I don't really know what I'm doing :D

am I also right in thinking that the "rejectattr" lines are for the players that I want to exclude from the end list?

 

 

 

 

 

emby_yaml.png

Link to comment
Share on other sites

fudgeum

I can't find a way to edit my previous post, but I got the following working.  For anyone else struggling the indentations are critical, count the little dots to make sure you get it right

 

image.png.864d45513c224070bed5c9a912149de4.png

Link to comment
Share on other sites

seanbuff
33 minutes ago, fudgeum said:

I can't find a way to edit my previous post, but I got the following working.  For anyone else struggling the indentations are critical, count the little dots to make sure you get it right

Glad you figured it out. Yes indentation is very important when using YAML.

Link to comment
Share on other sites

seanbuff
19 minutes ago, coreyjohnson75 said:

I'd like to get more like what Homepage shows:

 

image.png.04bcc0ce246f51e16af90ee8aa0e00f3.png

what Homepage are you referring to?

Link to comment
Share on other sites

seanbuff
37 minutes ago, lundblad said:

Anyone has anything nice in ha with emby who wants to share? :)

Have you gone through this thread already? Is there something in particular you are after?

Link to comment
Share on other sites

seanbuff
33 minutes ago, coreyjohnson75 said:

https://gethomepage.dev/en/installation/

It's a nice landing page btu would prefer to have it in HA.

Oh cool, thanks for that.

I mean, HA is pretty flexible and you can achieve something fairly close to what you want if you use the right components.

image.png.5870bc4b6278b9d1e9dbdf692892e4f9.png

Top card is a "Picture Card" -- you can obviously supply any image you want

Middle card is a "Horizontal Stack" of entities for the media counts (found earlier in this thread)

Bottom card is the template card showing the Active Streams ...again, text is customizable to say whatever you want it to.

 

There are also a bunch of different HA themes you can use to make it look just the way you want.

Link to comment
Share on other sites

coreyjohnson75
2 hours ago, lundblad said:

Anyone has anything nice in ha with emby who wants to share? :)

Just did this in HA:

image.png.64e0563838cf85ca8430b7848947c511.png

Below is the code for the lower card. I'm sure it could be made better.

type: entities
entities:
  - entity: sensor.emby_users_watching
    icon: mdi:account-group
  - entity: sensor.emby_album_count
    icon: mdi:album
  - entity: sensor.emby_book_count
    icon: fas:book-open
  - entity: sensor.emby_movie_count
    icon: mdi:movie-open-settings-outline
  - entity: sensor.emby_song_count
    icon: mdi:headphones
  - entity: sensor.emby_tv_episode_count
    icon: mdi:television-guide
  - entity: sensor.emby_tv_series_count
    icon: mdi:television

 

Link to comment
Share on other sites

  • 2 months later...
FancyNerd92

I have mine here whioch worked for a year now and last 4 months is not...

#Emby Media Counts
rest:
  - resource: https://<<IP>>:8920/emby/Items/Counts?api_key=xxxxxxxxxxxxxxxxxxxx
    method: GET
    scan_interval: 3600
    sensor:
      - name: "Emby Movie Count"
        value_template: '{{ value_json ["MovieCount"] }}'
      - name: "Emby TV Series Count"
        value_template: '{{ value_json ["SeriesCount"] }}'
      - name: "Emby TV Episode Count"
        value_template: '{{ value_json ["EpisodeCount"] }}'
      - name: "Emby Album Count"
        value_template: '{{ value_json ["AlbumCount"] }}'
      - name: "Emby Song Count"
        value_template: '{{ value_json ["SongCount"] }}'

 

It works as link but I'm not getting the numbers on HA

{"MovieCount":563,"SeriesCount":217,"EpisodeCount":6360,"GameCount":0,"ArtistCount":0,"ProgramCount":0,"GameSystemCount":0,"TrailerCount":0,"SongCount":533,"AlbumCount":162,"MusicVideoCount":0,"BoxSetCount":0,"BookCount":0,"ItemCount":0}

 

Here is my code on HA:

type: entities
entities:
  - entity: sensor.emby_movie_count
    name: Movies
    icon: mdi:movie-open
  - entity: sensor.emby_tv_series_count
    name: TV Shows
    icon: mdi:television
  - entity: sensor.emby_tv_episode_count
    name: Episodes
    icon: mdi:numeric

 

but....

Screenshot2023-10-25213213.png.cea1ae546d463c44fdea569798fdb3a3.png

 

Any ideas?

Link to comment
Share on other sites

seanbuff
On 26/10/2023 at 05:33, FancyNerd92 said:

Any ideas?

And if you go to Developer Tools > States and filter by "count"

image.png.430088df5c356e6f5a8727cbdff34e6a.png

What do you see there? Maybe your sensor entities changed names for some reason.

Link to comment
Share on other sites

On 2/25/2023 at 8:57 AM, Junglejim said:

Finally got around to the "Active Emby Users" sensor and it works really well. Thanks @seanbuff 👍🍻

Screenshot_2023-02-25_18-17-26.thumb.png.6f99df84e549de9b6f0adfc9f012ecd5.png

Edit: Had to play some more.. :) Saturday night and had a few.. ;)

Some OMV Love..

Screenshot_2023-02-25_18-58-20.thumb.png.8b23d74269973cde69d6ca31485e23dc.png

Hello do you have a video how to set it up.

i tried the upcoming media HA but i get lost like not finding the files that is needed like uilovlaceyaml mostly because i am new to home assistant dont how to put it and where to copy files

so is there a step by step how you got this ? like vidoe you have on youtube or are you willing to make one not only for me but for others who are also new in to this.

Link to comment
Share on other sites

Junglejim
18 minutes ago, Gofran said:

Hello do you have a video how to set it up.

i tried the upcoming media HA but i get lost like not finding the files that is needed like uilovlaceyaml mostly because i am new to home assistant dont how to put it and where to copy files

so is there a step by step how you got this ? like vidoe you have on youtube or are you willing to make one not only for me but for others who are also new in to this.

Hi mate, yeah sorry no YouTube videos. Also creating videos is not my thing. I just followed @seanbuffguides on this thread. It can be a bit intimidating at first, there are so many options with this software! If you have time to read though this thread, just look for @seanbuffcomments on the way to achieve what your looking for. 👍

Sorry Sean, had to pass to you... :)

  • Haha 1
Link to comment
Share on other sites

FancyNerd92
On 29/10/2023 at 02:21, seanbuff said:

And if you go to Developer Tools > States and filter by "count"

image.png.430088df5c356e6f5a8727cbdff34e6a.png

What do you see there? Maybe your sensor entities changed names for some reason.

I'm getting 2 sensors from my Roborock S7 and 1 from AdGuard Home... Nothing from emby 😕 

Link to comment
Share on other sites

seanbuff
On 26/10/2023 at 05:33, FancyNerd92 said:
rest:
  - resource: https://<<IP>>:8920/emby/Items/Counts?api_key=xxxxxxxxxxxxxxxxxxxx

 

56 minutes ago, FancyNerd92 said:

I'm getting 2 sensors from my Roborock S7 and 1 from AdGuard Home... Nothing from emby

Okay so that means that HA is not able to contact Emby for whatever reason to pull in data.

The URL above, can you confirm your Emby Server IP address is still valid, and the API Key is also valid?

Link to comment
Share on other sites

FancyNerd92
On 03/11/2023 at 03:33, seanbuff said:

 

Okay so that means that HA is not able to contact Emby for whatever reason to pull in data.

The URL above, can you confirm your Emby Server IP address is still valid, and the API Key is also valid?

 

yes it works as I wrote before I'm getting this when i visit it on browser and the numbers are correct and updated:

On 25/10/2023 at 21:33, FancyNerd92 said:
{"MovieCount":563,"SeriesCount":217,"EpisodeCount":6360,"GameCount":0,"ArtistCount":0,"ProgramCount":0,"GameSystemCount":0,"TrailerCount":0,"SongCount":533,"AlbumCount":162,"MusicVideoCount":0,"BoxSetCount":0,"BookCount":0,"ItemCount":0}

 

 

Link to comment
Share on other sites

seanbuff
23 minutes ago, FancyNerd92 said:

yes it works as I wrote before I'm getting this when i visit it on browser and the numbers are correct and updated

That's good, and I'm not suggesting that there is an issue with Emby.

However, it does indicate that something is preventing HA from contacting the Emby endpoint to fetch the data. Have you explored the Home Assistant log to see if there is anything obvious there? 'Settings > System > Logs'

Example:

image.png.e400ad4f198dcc6e20a741e985a79e99.png

There should be a reason in there as to why those 'Counts' are coming back as zero. Hopefully you can find something.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

FancyNerd92
23 hours ago, seanbuff said:

That's good, and I'm not suggesting that there is an issue with Emby.

However, it does indicate that something is preventing HA from contacting the Emby endpoint to fetch the data. Have you explored the Home Assistant log to see if there is anything obvious there? 'Settings > System > Logs'

Example:

image.png.e400ad4f198dcc6e20a741e985a79e99.png

There should be a reason in there as to why those 'Counts' are coming back as zero. Hopefully you can find something.

You seem right, I'm getting 2 errors:

Error connecting https://<<IP>>:8920/emby/Items/Counts?api_key=xxxxxxxxxxxxxxxxxxxxxx failed with [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1006)
00:52:49 – (ERROR) RESTful - message first occurred at 00:52:49 and shows up 5 times



Error connecting to https://<<IP>>:8920/emby/Items/Counts?api_key=xxxxxxxxxxxxxxxxxxxxxx failed with [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1006)
00:52:49 – (ERROR) RESTful - message first occurred at 00:52:49 and shows up 2 times

Now you mention it my SSL not always working outside of home and only http works....

Any ideas?

Link to comment
Share on other sites

seanbuff
3 hours ago, FancyNerd92 said:

Now you mention it my SSL not always working outside of home and only http works....

Any ideas?

If HA and Emby are local to each other, can you use the internal Emby IP via http to bypass SSL? i.e. http://<embylocalIP>:8096/xxx/xxx/

Link to comment
Share on other sites

FancyNerd92
On 07/11/2023 at 07:44, seanbuff said:

If HA and Emby are local to each other, can you use the internal Emby IP via http to bypass SSL? i.e. http://<embylocalIP>:8096/xxx/xxx/

Yes but even with http neither works on HA... as data their work as ssl but none of them on HA...

Link to comment
Share on other sites

seanbuff
1 hour ago, FancyNerd92 said:

Yes but even with http neither works on HA... as data their work as ssl but none of them on HA...

Apologies, I'm not following. Your HA logs indicate an issue connecting to Emby via HTTPS, what exactly is preventing you from making HA connect to Emby via the non-SSL URL (i.e. http only) ?

Are both of these services running locally in your own network? If so, there should be no reason why you cannot use internal http URLs.

Replace your rest code with the http address of Emby and restart HA. If you are still not getting counts, look at the HA log again and see what it says this time. Try that and let us know how you go.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...