Code Monkey home page Code Monkey logo

sensor.tautulli's Introduction

Archived

This is now a part of Home Assistant https://www.home-assistant.io/components/sensor.tautulli/


sensor.tautulli Build Status

A platform which allows you to get information from Tautulli.

To get started put /custom_components/sensor/tautulli.py here:
<config directory>/custom_components/sensor/tautulli.py

Example configuration.yaml:

sensor:
  platform: tautulli
  api_key: 24b6eac0a858748664878d146bf63623b4
  host: 192.168.1.14
  monitored_conditions:
    - magic_title

Configuration variables:

key description
platform (Required) The sensor platform name.
api_key (Required) Your Tautulli api_key
host (Required) The IP adress of the server running Tautulli.
port (Optional) The port the Tautulli uses, defaults to 8181
ssl (Optional) Set to Trueif your Tautulli instance uses SSL, defaults to False.
monitored_conditions (Optional) A list of monitored_conditions you want to monitor.
monitored_users (Optional) A list of users you want to monitor, if none is defined all users will be monitored. NB!: Case sensetive!

Due to how custom_componentes are loaded, it is normal to see a ModuleNotFoundError error on first boot after adding this, to resolve it, restart Home-Assistant.

sensor.tautulli's People

Contributors

ludeeus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sensor.tautulli's Issues

UnboundLocalError: local variable 'result' referenced before assignment

Version of the cusom_component
0.0.6

Describe the bug
Some times (not consistent) there is a stacktrace in the log

log

2018-07-25 20:05:57 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.tautulli fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 196, in async_update_ha_state
    yield from self.async_device_update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 319, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/sensor/tautulli.py", line 65, in update
    self._port, self._api_key)
  File "/config/deps/lib/python3.6/site-packages/pytautulli/__init__.py", line 88, in get_home_stats
    if result:
UnboundLocalError: local variable 'result' referenced before assignment

Dependabot couldn't find a requirements.txt for this project

Dependabot couldn't find a requirements.txt for this project.

Dependabot requires a requirements.txt to evaluate your project's current Python dependencies. It had expected to find one at the path: /requirements.txt.

If this isn't a Python project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Sensor is not pulling correct information

Version of the cusom_component
#6

Describe the bug
I'm using the example config shown in sensor.tautulli/README.md with my host and api key swapped in, but the sensor is not pulling in the correct information

What my actual library statistics show:
image

What Tautulli's sensor shows:
image

log

Log in HA that reference tatulli. Nothing else seemed of relevance that I could find. Willing to grab something specific to help if needed.

2018-09-04 22:32:27 WARNING (MainThread) [homeassistant.loader] You are using a custom component for sensor.tautulli which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-09-04 22:33:22 WARNING (MainThread) [homeassistant.components.sensor] Setup of platform tautulli is taking over 10 seconds.
2018-09-04 22:34:15 WARNING (MainThread) [homeassistant.components.sensor] Updating tautulli sensor took longer than the scheduled update interval 0:00:30

Not sure if this is the correct

Dependabot couldn't find a requirements.txt for this project

Dependabot couldn't find a requirements.txt for this project.

Dependabot requires a requirements.txt to evaluate your project's current Python dependencies. It had expected to find one at the path: /requirements.txt.

If this isn't a Python project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Cannot launch the custom component, error at config check

Version of the custom_component
latest from Github

Describe the bug
After installation of the custom component by the instructions, when doing a hassio ha check
the following error appears:

invalid syntax (tautulli.py, line 9)

Preceded by the following lines in the log:

core-ssh:/config# hassio homeassistant check ERROR INFO:homeassistant.util.package:Attempting install of colorlog==3.1.4 Testing configuration at /config ERROR:homeassistant.scripts.check_config:BURB Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 207, in check res['components'] = check_ha_config_file(hass) File "/usr/local/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 372, in check_ha_config_file platform = loader.get_platform(hass, domain, p_name) File "/usr/local/lib/python3.6/site-packages/homeassistant/loader.py", line 60, in get_platform return get_component(hass, PLATFORM_FORMAT.format(domain, platform)) File "/usr/local/lib/python3.6/site-packages/homeassistant/loader.py", line 92, in get_component module = importlib.import_module(path) File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 674, in exec_module File "<frozen importlib._bootstrap_external>", line 781, in get_code File "<frozen importlib._bootstrap_external>", line 741, in source_to_code File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/config/custom_components/sensor/tautulli.py", line 9 <!DOCTYPE html> ^ SyntaxError: invalid syntax Fatal error while loading config: invalid syntax (tautulli.py, line 9) Failed config General Errors: - invalid syntax (tautulli.py, line 9) Successful config (partial)

Add your logs here.

ERROR: state.length

my code:

`

Plex

      - type: picture-elements
        image: /local/lovelace/tv/plex.png
        elements:
          - type: custom:text-element
            text: "<b style='color: orange; font-size: 18px'>Now Playing: </b>"
            style:
              top: 7%
              left: 15px
              transform: none
          - type: custom:state-attribute-element
            entity: sensor.tautulli__abeksis 
            attribute: magic_title
            show_empty: false
            style:
              top: 20%
              left: 15px
              font-size: 16px
              color: white
              transform: none
          - type: custom:text-element
            text: "<b style='color: orange; font-size: 18px'>Statistics: </b>"
            style:
              top: 47%
              left: 15px
              transform: none
          - type: custom:state-attribute-element
            entity: sensor.tautulli
            attribute: Movie
            show_empty: true
            prefix: "<b style='color: orange; margin-right: 5px'>Most played movie: </b>"
            style:
              top: 60%
              left: 15px
              color: white
              transform: none
          - type: custom:state-attribute-element
            entity: sensor.tautulli
            attribute: TV
            show_empty: true
            prefix: "<b style='color: orange; margin-right: 11px'>Most played show: </b>"
            style:
              top: 70%
              left: 15px
              color: white
              transform: none
          - type: custom:state-attribute-element
            entity: sensor.tautulli
            attribute: User
            show_empty: true
            prefix: "<b style='color: orange; margin-right: 20px'>Most active user: </b>"
            style:
              top: 80%
              left: 15px
              color: white
              transform: none`

ERROR:

https://ip/local/state-attribute-element.js?v=2.1:10:14 TypeError: undefined is not an object (evaluating 'state.length')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.