Giter Club home page Giter Club logo

teleinfo-home-assistant's People

Contributors

sberthelot avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

teleinfo-home-assistant's Issues

Fail to finish integration

Just reinstalled a fresh HA and tried this extension with no success:

Despite the modification on configuration (see here after remarks) the extension does not start

 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: sensor.enedis
2022-10-15 19:40:22.388 WARNING (MainThread) [homeassistant.components.sensor] Timed out adding entities for domain sensor with platform enedis after 500s
2022-10-15 19:40:22.429 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{{ states.sensor.enedis_teleinfo.attributes["PRM"] }}")
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/template.py", line 420, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/template.py", line 1915, in _render_with_context
    return template.render(**kwargs)
  File "/srv/homeassistant/lib/python3.9/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/srv/homeassistant/lib/python3.9/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/srv/homeassistant/lib/python3.9/site-packages/jinja2/sandbox.py", line 303, in getitem

Note that documentation should be updated:

  • extension name is ENEDIS but config sample still point on TELEINFO
    • replace 1st line "plateform: teleinfo" with "plateform: enedis"
  • When using default Rasbery TTY port, console should be stop and homeassistant user should be able to access group tty

A simpler option without any extension

It is in fact possible to get Linky information without using any extension by simply using HA templating.

# add following line within your configuration.yaml
# reference: https://www.enedis.fr/media/2035/download

sensor:
  - platform: serial
    name: Enedis
    serial_port: /dev/ttyAMA0
    baudrate: 9600
    parity: E
    bytesize: 7
    value_template: >-
      {% set slots = value.split('\t') %}
      {{ slots[0] }},{{ slots[1] }}

  - platform: template
    sensors:

      #debug_enedis:
      #   unique_id: enedis:teleinfo:debug
      #   friendly_name: "Debug Input"
      #   icon_template: mdi:current-ac
      #   device_class: current  
      #   value_template: "{{ states('sensor.enedis') }}"

      enedis_watt:
        unique_id: enedis:teleinfo:watt
        friendly_name: "Conso-VA"
        unit_of_measurement: "VA"
        icon_template: mdi:current-ac
        device_class: current
        value_template: >-
          {% if states('sensor.enedis').startswith('SINSTS') %}
            {{ states('sensor.enedis').split(',')[1] }}
          {% else %}
            {{ states('sensor.enedis_watt') }}
          {% endif %}

      enedis_amp:
        unique_id: enedis:teleinfo:amp
        friendly_name: "Conso-Amp"
        unit_of_measurement: "A"
        icon_template: mdi:current-ac
        device_class: current
        value_template: >-
          {% if states('sensor.enedis').startswith('IRMS1') %}
            {{ states('sensor.enedis').split(',')[1] }}
          {% else %}
            {{ states('sensor.enedis_amp') }}
          {% endif %}

How to deploy to HA

Hello sberthelot,
I am new to HA but come from Domoticz on which I had Teleinfo data from ttyAMA0.
Sorry to open an issue for that: how to integrate your work to HA?
I have a base 6kVA power supply.
Thanks

Home to configure in HA ?

I placed component into ~/.homeassistant/custom_components/teleinfo. HA see and warn about it at boot time

Aug 05 11:10:40 raspberry systemd[1]: Started Home Assistant.
Aug 05 11:10:43 raspberry hass[1837]: 2022-08-05 11:10:43 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration enedis which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

Nevertheless I cannot find it from web integration UI.
Question: how do we configure this componant for HA ?
Merci

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.