Tautulli (PlexPy) Custom Component

Thanks shire, honestly I dont think I’m getting that far based on the yaml checker saying it can’t find sensor.tautulli?

I use Docker for both, as well.

Your custom_components folder should live alongside your configuration.yaml - in my Docker Container, it lives in /config

/config
├── configuration.yaml
├── custom_components
│   └── sensor
│       └── tautulli.py

and my config entry looks like:

    - platform: tautulli
      host: 192.168.1.188:8282
      ssl: false
      verify_ssl: true
      token: !secret tautulli_token
      monitored_conditions:
        - stream_count
        - stream_count_transcode
        - stream_count_direct_play
        - stream_count_direct_stream
        - total_bandwidth

Wow!

It works!

Thank you so much!

Hmm thanks kylerw;
Im still getting this
I put the .py file as you stated above
I put your configuation.yaml entry (as applicable) in my sensors.yaml
The API query IPADDRESS:PORT/api/v2?cmd=get_activity&apikey=APIKEY works just fine

Unable to find component sensor.tautulli
2018-04-09 12:38:56 ERROR (SyncWorker_38) [homeassistant.loader] Unable to find component sensor.tautulli
2018-04-09 12:38:56 ERROR (SyncWorker_12) [homeassistant.loader] Unable to find component sensor.tautulli
2018-04-09 12:38:57 ERROR (SyncWorker_29) [homeassistant.loader] Unable to find component sensor.tautulli
2018-04-09 12:38:58 ERROR (SyncWorker_3) [homeassistant.loader] Unable to find component sensor.tautulli

May be a silly question, but did you restart HA after putting the .py file in the custom_components/sensor/ folder?

Thank you sir; I typically run the yaml checker from Configuration checker and restart from there as well. I actually restarted the container and now its working. Thanks!
Typically I dont restart if yaml checker fails cause sometimes Hass doesn’t restart properly.
Appreciate your efforts and support. Cool when communities are engaged like this one

Yeah, with a custom component, it requires reboot so that it can load the new .py file before the yaml check will be able to use it for verification.

I’m glad we got you going, happy I could help.

Do you see any issues running this against two local instances of Tautulli?

Nope, should run fine.

I just also got InfluxDB / Grafana up.
I just noticed that I dont seem to see any of the sensors for the tautulli sensor in the drop down for grafana?
Is that expected by nature of the custom_component?
I saw the graphs in the History and was basically going to try to repro that Influx/grafana.

Custom components should function just like normal ones from that perspective. I’m not sure why you aren’t able to see them. I’ve not spent engough time in InfluxDB/Grafana to know what may be causing the problem.

Have it running against 2 instances and no issues. Entities just picked up “_2” on the end of them. Threw them in separate groups and it is off and running.

One request so far, I noticed the total bandwidth piece has wan/lan inside the graph. Is it possible to break these out into separate sensors?

Great job btw!

EDIT: Have it running through the LetsEncrypt reverse proxy over SSL with the BaseURL’s in the path without issue. (In case that hasn’t been tested yet)

It would be pretty easy to pull them out but I think I’m going to default to guiding you to use a template sensor:

  sensor:


    - platform: template
      sensors:
        tautulli_wan:
          friendly_name: "Tautulli WAN"
          value_template: "{{ states.sensor.tautulli_total_bandwidth.attributes.wan_bandwidth }}" 

    - platform: template
      sensors:
        tautulli_wan:
          friendly_name: "Tautulli LAN"
          value_template: "{{ states.sensor.tautulli_total_bandwidth.attributes.lan_bandwidth }}" 

1 Like

Works for me, great idea! I looked at modifying the Python code but then I didn’t want to have another branch of things when it becomes a PR. I need to jump back into my config anyways I’ve found the entities keep jumping back and forth between the two instances, need to throw in some custom names per sensor anyways.

Thanks for the response and I’ll report back on things if I have any issues with the template but I shouldn’t as I’ve used them before.

Hi!
Thanks for the component, works like a charm. :grinning:, is it possible to add a sensor for “RECENTLY ADDED” movie/serie/music…?

I can look at it… Can you hit: https:/HOST:PORT/api/v2?apikey=APIKEY&cmd=get_recently_added and let me know what response you get?

EDIT: NM, I figured it out… Let me see what I can come up with.

2 Likes

Thanks for your hard work and explanations. Was able to use the above information to get it working.

Given that a stream is transcoded, It will be nice if more_info could provide details on the stream.

Hmm, these are high level stats - the attributes do list what is playing. Are you saying in the Transcode entity to have those attributes also include the stream details?

I’d probably suggest using: https://github.com/custom-components/sensor.tautulli which will give you the details for each user.

Ideally, they’d be combined but for now I have both installed. I renamed mine to tautulli_stats.py