GithubHelp home page GithubHelp logo

jugla / keyatome Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 4.0 186 KB

Home Assistant component to handle key atome (linky) -conso live feature-

License: MIT License

Python 100.00%
atome hacs home-assistant keyatome linky

keyatome's People

Contributors

aubierr avatar benoitanastay avatar jugla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

keyatome's Issues

Previous Value not updated

Describe the bug
At midnight, the daily previous value is not updated

To Reproduce
Steps to reproduce the behavior:

  1. Wait midnight

Expected behavior
Perform the update

Additional context
In source code sensor.py, it seems that the current value can be set to None : so if it occurs at midnight, None is recorded

2 subscriptions the second is atome

I have 2 subscriptions to totalEnergie and only second one have atome key
in this code and the package (pyKeyAtome) we have things like this :
user_reference = login_value["subscriptions"][0]["reference"]

in my case subscription 0 don't have atome key can we imagine a parameter ?

ToManyServerError & no data

Hi there,

Impossible to pull any data :(

Got the "ToManyServerError" log message
image

Running HA 2022.11.1
Supervisor 2022.10.2

Am I the only one having this issue ?

Atome Daily count error

Hello,

I don't know if APIv2 is the problem. But we have a difference between the energy dashboard and the sensor value :

23,46 kWh (wrong) vs 12,528 kWh
image

image

In the log :

Logger: custom_components.keyatome.sensor
Source: custom_components/keyatome/sensor.py:536
Integration: KeyAtome Linky (documentation, issues)
First occurred: 20:31:23 (39 occurrences)
Last logged: 21:28:06

Live Data : Missing last value in values: None
Live Data : Missing last value in values: {'error': 'An exception occurred in driver: SQLSTATE[08006] [7] timeout expired'}
Live Data : Missing last value in values: {'error': 'Warning: SessionHandler::read(): Failed to write session lock: A TIMEOUT OCCURRED'}
Live Data : Missing last value in values: {'error': 'Warning: SessionHandler::read(): Unable to clear session lock record'}


Cette erreur provient d'une intégration personnalisée

Logger: custom_components.keyatome.sensor
Source: custom_components/keyatome/sensor.py:852
Integration: KeyAtome Linky (documentation, issues)
First occurred: 22 septembre 2022 à 14:45:14 (101 occurrences)
Last logged: 21:44:10

Period are strictly increasing except reset to zero

Do you have a solution ?
Thanks for your job 👍

more connection with KeyAtome integration

hello since today the integration no longer works apparently no more access to the server
I tested with the total energy application and everything works correctly

"Atome_Diagnostic changé en TooManyServerError"

KeyAtome
.'

Home Assistant 2023.9.3
Supervisor 2023.09.2
Operating System 10.5
Interface utilisateur : 20230911.0 - latest

in any case thank you again for this superb integration

No data received with "TooManyServerError" error message

Describe the bug
No data is received on any of the sensors. Atome_Diagnostic is set to TooManyServerError despite removing the configuration.yaml issue

To Reproduce
Steps to reproduce the behavior:
install the integration with logon information for TotalEnergies Atome key (which delivers "conso live" data in the app)

Expected behavior
sensors report consumption data

v6.3.0
2022.8.7

day : Missing total value in values:

Hello,

since few days i have no data in the energy section. live info is working but no historical.

i have thoses errors in logs :

#Cette erreur provient d'une intégration personnalisée

Logger: custom_components.keyatome.sensor
Source: custom_components/keyatome/sensor.py:588
Integration: KeyAtome Linky (documentation, issues)
First occurred: 09:52:48 (186 occurrences)
Last logged: 22:55:16

day : Missing total value in values: {'isConnected': True, 'time': '2022-09-15T22:39:31+02:00', 'total': 0, 'logTargetStd': 0.0, 'goal': 100, 'startPeriod': '2022-09-15T00:00:00+02:00', 'endPeriod': '2022-09-15T22:39:31+02:00', 'pricingChange': 0, 'filteredPower': 0.0, 'impactCo2': 11767, 'impactVehicleType': 'CAR', 'impactVehicleKm': 107}
day : Missing total value in values: {'isConnected': True, 'time': '2022-09-15T22:44:38+02:00', 'total': 0, 'logTargetStd': 0.0, 'goal': 100, 'startPeriod': '2022-09-15T00:00:00+02:00', 'endPeriod': '2022-09-15T22:44:38+02:00', 'pricingChange': 0, 'filteredPower': 0.0, 'impactCo2': 11767, 'impactVehicleType': 'CAR', 'impactVehicleKm': 107}
day : Missing total value in values: {'isConnected': True, 'time': '2022-09-15T22:49:43+02:00', 'total': 0, 'logTargetStd': 0.0, 'goal': 100, 'startPeriod': '2022-09-15T00:00:00+02:00', 'endPeriod': '2022-09-15T22:49:43+02:00', 'pricingChange': 0, 'filteredPower': 0.0, 'impactCo2': 11767, 'impactVehicleType': 'CAR', 'impactVehicleKm': 107}
day : Missing total value in values: {'isConnected': True, 'time': '2022-09-15T22:54:48+02:00', 'total': 0, 'logTargetStd': 0.0, 'goal': 100, 'startPeriod': '2022-09-15T00:00:00+02:00', 'endPeriod': '2022-09-15T22:54:48+02:00', 'pricingChange': 0, 'filteredPower': 0.0, 'impactCo2': 11767, 'impactVehicleType': 'CAR', 'impactVehicleKm': 107}
week : Missing total value in values: {'isConnected': True, 'time': '2022-09-15T22:55:16+02:00', 'total': 0, 'logTargetStd': 0.0, 'goal': 100, 'startPeriod': '2022-09-12T00:00:00+02:00', 'endPeriod': '2022-09-15T22:55:16+02:00', 'pricingChange': 0, 'filteredPower': 0.0, 'impactCo2': 44913, 'impactVehicleType': 'CAR', 'impactVehicleKm': 408}

what should i do ?

thanks !

Missing total value in values: {'error': 'no price set'} --> no atome/conso live feature

Hello :)

I tried your extension to have reporting about my electricity consumption and I met an issue. For the moment I have any data and when I am taking a looking into HA logs, I have these logs :

2022-02-20 09:56:06 ERROR (SyncWorker_3) [custom_components.keyatome.sensor] Live Data : Missing last value in values: {'isConnected': False, 'time': '2022-02-20T09:56:06+01:00', 'timeLimitBeforePowerFailure': -1}
2022-02-20 09:56:06 WARNING (SyncWorker_3) [custom_components.keyatome.sensor] day : Missing total value in values: {'error': 'no price set'}
2022-02-20 09:56:08 ERROR (SyncWorker_3) [custom_components.keyatome.sensor] day : Missing total value in values: {'error': 'no price set'}
2022-02-20 09:56:08 WARNING (SyncWorker_6) [custom_components.keyatome.sensor] week : Missing total value in values: {'error': 'no price set'}
2022-02-20 09:56:09 ERROR (SyncWorker_6) [custom_components.keyatome.sensor] week : Missing total value in values: {'error': 'no price set'}
2022-02-20 09:56:09 WARNING (SyncWorker_5) [custom_components.keyatome.sensor] month : Missing total value in values: {'error': 'no price set'}
2022-02-20 09:56:11 ERROR (SyncWorker_5) [custom_components.keyatome.sensor] month : Missing total value in values: {'error': 'no price set'}
2022-02-20 09:56:11 WARNING (SyncWorker_3) [custom_components.keyatome.sensor] year : Missing total value in values: {'error': 'no price set'}
2022-02-20 09:56:11 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform keyatome is taking over 10 seconds.
2022-02-20 09:56:12 ERROR (SyncWorker_3) [custom_components.keyatome.sensor] year : Missing total value in values: {'error': 'no price set'}

I do not see in your document how to specify a price and on HA, I searched into the integration settings how to fix that but I did not find. I guess/hope this issue prevent from scrapping data from the remote API.

How to fix that ?

Thank you for your work and have a nice day!

Sensor costs showing unknown value

Describe the bug

I had 2 problems with atome :

  • Can't update data after 2 hours
  • Sensor costs showing unknown value

I stopped using native atome and installed keyatome. Update data has been resolved, many thanks for your great work !
Then, I still have a problem with sensor costs. I don't know what I'm doing wrong, do I need to edit my configuration.yaml ?

To Reproduce
Steps to reproduce the behavior:

  1. Add the entity "sensor.atome_daily_cost" on dashboard
    It's been a week now.

Expected behavior
I'm waiting for the value in €.

Screenshots
Link of my screenshot (dashboard).

Desktop (please complete the following information):

  • OS: Raspberry pi 4 with Home assistant operating system
  • Browser : Chrome, Safari
  • Version HA : 2021.12.7
  • Version Core : core-2021.12.7

Doc: cost vs price

The energy Dashboard of HA requires an entity or fixed price in EUR/kWh.

What the Atome key API provides is not a price but the current cost.

The doc says we can used the price attribute (template) in the HA Energy Dashboard but that's not true. HA refuses to take the value because the unit is not a price per kWh ;-)

I am trying to setup the HA Energy Dashboard with the plugin but I find the instructions quite hard to follow. I have set my price per kWh manually consequently (to 0.1740).

Any help would be greatly appreciated :-)

Thanks a lot of this plugin also!! That's very nice to be able to grab these data from Conso Live!

Log error total_increasing can't be used with device class 'monetary'

As the title mentions, I regularly get an error with price entities. See attached a screenshot of the error logged.

iShot_2024-08-10_08 47 25

Below the Yaml configuration used:

template:
  # Atome Linky Template Montly Tracking
  - sensor:
      - name: Atome Monthly Price
        unique_id: atome_monthly_price
        state: "{{ state_attr('sensor.atome_monthly', 'price') | float }}"
        unit_of_measurement: "EUR"
        state_class: total_increasing
        device_class: monetary
  - sensor:
      - name: Atome Weekly Price
        unique_id: atome_weekly_price
        state: "{{ state_attr('sensor.atome_weekly', 'price') | float }}"
        unit_of_measurement: "EUR"
        state_class: total_increasing
        device_class: monetary
  - sensor:
      - name: Atome Daily Price
        unique_id: atome_daily_price
        state: "{{ state_attr('sensor.atome_daily', 'price') | float }}"
        unit_of_measurement: "EUR"
        state_class: total_increasing
        device_class: monetary

Installation by HACS doesn't work

Describe the bug
I try to install this integration in HACS by the UI

To Reproduce
The doc says : Press add icon and search for keyatome

but the search returns nothing with this keyword : keyatome

Expected behavior
Installation works by UI.

Desktop (please complete the following information):

  • OS: Raspberry OS
  • Docker installation of HA
  • Version HA : Home Assistant 2023.10.5

POWER_WATT will be deprecated in HA Core 2025.1.

Good morning,

I am pointing out this which is showing up as a warning in the logs.
Is it possible to update?

POWER_WATT was used from keyatome, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.WATT instead

Thank you

Statut unknow en continu

L'intégration marchait bien jusqu'au 8 janvier 2024.

J'ai beau relancer ça reste toujours en unknow. La clé atome transmets pourtant correctement sur l'app Total Énergie.

Prix

Bonjour, je parle en français puisque je suppose que le fait d'avoir créé cette intégration vous êtes français, sinon désolé je changerai de langue.

Le code :

template:
  - sensor:
      - name: atome_daily_price
        state: "{{ state_attr('sensor.atome_daily', 'price') | float }}"
        unit_of_measurement: 'EUR'
        state_class: total_increasing
        device_class: monetary

Fonctionne très bien et me renvoie un prix. Il va sûrement chercher ce prix dans l'application totalenergie puisque j'ai le même.
Est-ce que ce prix tiens en compte le prix du kWh et de l'abonnement ? Ou juste les kWh ?

Peut on faire le même sensor pour afficher la veille ? Si oui comment ?

Merci d'avance pour l'aide et surtout merci pour cette intégration

Price is not reporting corectly

Hello,

I have added current price in my energy dashboard using this attribute as increasing cost for energy consumption

  • name: sensor.atome_daily_cost
    state: "{{ state_attr('sensor.atome_daily', 'price') | float }}"
    unit_of_measurement: 'euro'

But each day it only reports 1.75€ instead of the real price.

As I login into my Total Énergie account I can see real price.

Maybe something I misconfigured or misunderstood ?

wrong pyatome library called

Describe the bug
The pyatome library is called insted of pykeyatome

To Reproduce
Steps to reproduce the behavior:

  1. Install custom component
  2. Run It

Expected behavior
The pykeyatome library has to be called

Version
KeyAtome V1.0.0 is used

deprecated `async_get_registry`

Is your feature request related to a problem? Please describe.
getting this error message:
2022-07-20 20:43:56 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses deprecated async_get_registry to access entity registry, use async_get instead. Please report issue to the custom component author for keyatome using this method at custom_components/keyatome/sensor.py, line 664: registry = await async_get_registry(self.hass)

Describe the solution you'd like
replace the "async_get_registry" by the new solution you better know than me

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

{'error': 'Warning: SessionHandler::read(): Failed to write session lock: A TIMEOUT OCCURRED'}

A lot of errors today!

Cette erreur provient d'une intégration personnalisée

Logger: custom_components.keyatome.sensor
Source: custom_components/keyatome/sensor.py:452 
Integration: KeyAtome Linky (documentation, issues) 
First occurred: 03:16:00 (141 occurrences) 
Last logged: 17:35:53

day : Missing total value in values: {'error': 'Warning: SessionHandler::read(): Unable to clear session lock record'}
day : Missing total value in values: {'error': 'Warning: SessionHandler::read(): Failed to write session lock: A TIMEOUT OCCURRED'}
day : Missing total value in values: None
month : Missing total value in values: None
week : Missing total value in values: None

Check of the credentials

It seems that whatever are the credentials (ident and password) on the UI, all are accepted, and change is only possible trough delete and new integration. Regards.

Atome sensors have stopped working (several subscriptions)

Describe the bug
Atome sensors have stopped working ...

2022-02-02 22:17:59 WARNING (SyncWorker_4) [custom_components.keyatome.sensor] Live Data : Missing last value in values: {'isConnected': False, 'time': '2022-02-02T22:17:59+01:00', 'timeLimitBeforePowerFailure': -1}
2022-02-02 22:18:00 ERROR (SyncWorker_4) [custom_components.keyatome.sensor] Live Data : Missing last value in values: {'isConnected': False, 'time': '2022-02-02T22:18:00+01:00', 'timeLimitBeforePowerFailure': -1}

Screenshots
image

image

image

Using both phone app & HA's keyatome ?

Hello there,

First and foremost, thanks for making this integration working (again), it's cool work.

I'm not sure how this should be filed but I've been having issues : When I use this integration, I can't use the phone app, the data in is empty.

After some testing it seems to be that credentials generated at login on phone are made invalid as soon as HA queries the API. Logging out on app, then logging back in restores the app power update, which then gets disabled again at next live update in HA (every 30s).

Since we're using the app to monitor costs (can't yet get the wife to go full HA), it prevents me from using this integration.

Is there a way around this ?
I tried editing const.py to make polls of live power more spaced but it just makes the issue happen less often.

Cheers if anyone can shed any light on this.

Unable to prepare setup for platform keyatome.sensor

Intregration is not working

To Reproduce
Steps to reproduce the behavior:
Reboot after installing keyatome integration using HACS

Logs

Logger: homeassistant.setup
Source: setup.py:317
First occurred: 14:27:26 (1 occurrences)
Last logged: 14:27:26

Unable to prepare setup for platform keyatome.sensor: Platform not found (cannot import name 'SensorDeviceClass' from 'homeassistant.components.sensor' (/volume2/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/sensor/init.py)).

fake_useragent.errors.FakeUserAgentError: No browser user-agent strings found for browser: chrome

Hello,

Thanks a lot for integration.

After last reboot (in my case was update to 2022.12.1) an error appear in keyatome.
I thought last update break something but i rollback to previous version and have same error.

Looks related to external, but not sure for a fix.

Logger: homeassistant.components.sensor
Source: custom_components/keyatome/sensor.py:191
Integration: Sensor (documentation, issues)
First occurred: 10:48:23 (1 occurrences)
Last logged: 10:48:23

Error while setting up keyatome platform for sensor
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/fake_useragent/utils.py", line 139, in load
browsers_dict[browser_name] = get_browser_user_agents(
File "/usr/local/lib/python3.10/site-packages/fake_useragent/utils.py", line 123, in get_browser_user_agents
raise FakeUserAgentError(
fake_useragent.errors.FakeUserAgentError: No browser user-agent strings found for browser: chrome

It looks related to unavailbity of https://useragentstring.com/pages/chrome/ and fallback
https://useragent.melroy.org/cache.json

Do you have any idea how to fix this?

Thanks a lot for your help.

KeyAtome Config Flow : No login available for atome server

Hello,

I am using latest version of HA & keyatome. Everything was fine until yesterday, no data received anymore.
I tried to remove the integration and reconfigure it but still the same error message

2022-11-07 21:37:19.985 ERROR (MainThread) [custom_components.keyatome.config_flow] KeyAtome Config Flow : No login available for atome server

I have checked my creds, it works on both iPhone app and computer web browser.

Do you have any idea ?

Atome Live Power no more updated

Describe the bug
A clear and concise description of what the bug is.

Atome Live Power no more updated (freezed) since 26/08/2023 20:23 when Atome_daily still always right updated, and led on Linky's key always flashing green, and live power always right live updated on Consolive TotalEnergie smartphone app

To Reproduce
Just see updates and history
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
https://e.pcloud.link/publink/show?code=XZOMD2Z7ICkRv0q6jB8tTlqI26q2XE8QPpy

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.
HA OS 10.5
HA CORE 2023.8.4 (26/08/2023 07H30)

No login available for atome server

Hi,

I am not able to use the compoment anymore. Everything is unavailable and I get the following error on the log: 2022-05-31 20:48:24 ERROR (MainThread) [custom_components.keyatome.sensor] No login available for atome server

I haven't touched the sensor.yaml where I still have the following:

Atome LINKY

  • platform: keyatome
    username: myemail
    password: mypassword

Any clues?

Disconnect sometimes

Hello,

Your integration work but disconnect sometimes like atome.

Can we do reload if 30 minutes without change ?

If yes, how please ?

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.