Tautulli (PlexPy) Custom Component

if you go to IPADDRESS:PORT/api/v2?cmd=get_activity&apikey=APIKEY can you tell me what you get back?

Sureā€¦

{"response": {"message": null, "data": {"stream_count": "0", "sessions": []}, "result": "success"}}

I see stream_count but it looks like the others may have been added to the API with the update to tautulli.

I donā€™t even see a stream count when I am watching anything?

I have many errors in my logā€¦

Mon Feb 26 2018 22:15:14 GMT+0000 (GMT)

Unable to fetch data from Tautulli

Edit:
Also getting this errorā€¦

Error fetching data: <PreparedRequest [GET]>

what does your config look like?

- platform: tautulli
  host: PLEXPYIP:8181
  ssl: true
  verify_ssl: false
  token: my api token
  monitored_conditions:
    - stream_count
    - stream_count_transcode
    - stream_count_direct_play
    - stream_count_direct_stream
    - total_bandwidth

EDIT
Also worth highlighting perhaps that if I disable the Tautulli sensor, I do not get the 2nd error Error fetching data: <PreparedRequest [GET]>

do you have ssl enabled in plexpy? Try setting ssl: false

Ok, so I switched that setting above, and the stream sensor works but not of the other onesā€¦intact they have completely disappearedā€¦

File "/home/homeassistant/.homeassistant/custom_components/sensor/tautulli.py", line 105, in state
    return_value = self._api.data['response']['data'][self._var_id]
KeyError: 'total_bandwidth'

Cool. So itā€™s working. The other sensors are pulling data that donā€™t exist in the PlexPy API. I could add a config option to designate the version so eliminate the errors. Iā€™ll see if I can get some time this week to give that a shot.

EDIT: Actually, probably just easier to remove the extra monitored_conditions - Iā€™ll add a note in the OP.

thanks for your help.

Perhaps I am missing something hereā€¦but is there a difference with PlexPy and Tautulli?
If so how do I run / install Tautulli?

If I go to the Tautulli website, and click ā€˜Get Nowā€™ and then Github it leads me to https://github.com/Tautulli/Tautulli, but it all seems to refer to PlexPy?

Tautulli is the the new name/version for PlexPy. It is in Beta right now but very stable (link above with Reddit post for install instructions).

Many thanks!
Canā€™t believe I missed that!
Now Iā€™ve pulled the beta the other sensors are working!

1 Like

Great to hear! Sorry for the confusion.

Hell dude, donā€™t apologizeā€¦it was all me!

Tautulli has now hit stable, such a huge improvement over v1 wow!!! Guess its either time to check out this component or wait patiently for it to get submitted and merged lol.

Any plans to display information about individual streams? Such as user/player/media?

User and media is an attribute that shows on the streams. Player could be added but it would over clutter the current way the cards show them.

Im having issues w/ this w/ the Docker instance?
I have Hass and Tautulli in (seperate) docker containers.
The yaml checker keeps yelling about sensor.tautulli not being found?

Is the port number required? My tautulli is behind a reverse proxy
Can we get library stats extended to the plugin? Iā€™m trying to cross reference w/ MySQL kodi stats I managed to get working.

I have tried creating:
/config/custom_components/sensor/tautulli/tautulli.py
/config/custom_components/sensor/tautulli.py
/config/custom_components/tautulli.py
/config/custom_components/tautulli/tautulli.py

I use a /config/sensors.yaml which is !included in my configuration.yaml
I entered based on the post in my sensors.yaml

Yes, port number is required. You mention that you use a reverse proxy, do you also use a base URL? that needs to be included in the sensor. below is my setup that is working:

platform: tautulli
host: 192.168.1.250:8181/tautulli
token: !secret tautulli_token
monitored_conditions:
  - stream_count
  - stream_count_transcode
  - stream_count_direct_play
  - stream_count_direct_stream
  - total_bandwidth