jugla / keyatome Goto Github PK
View Code? Open in Web Editor NEWHome Assistant component to handle key atome (linky) -conso live feature-
License: MIT License
Home Assistant component to handle key atome (linky) -conso live feature-
License: MIT License
Describe the bug
At midnight, the daily previous value is not updated
To Reproduce
Steps to reproduce the behavior:
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
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 ?
Sensors shows unknown...
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
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 👍
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"
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
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
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 !
Since 4/2/2021, Total Energy server doesn't provide live data.
Only periodic : day/week/month/year
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!
Describe the bug
I had 2 problems with atome :
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:
Expected behavior
I'm waiting for the value in €.
Screenshots
Link of my screenshot (dashboard).
Desktop (please complete the following information):
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!
As the title mentions, I regularly get an error with price entities. See attached a screenshot of the error logged.
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
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):
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
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.
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
Hello,
I have added current price in my energy dashboard using this attribute as increasing cost for energy consumption
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 ?
Describe the bug
The pyatome library is called insted of pykeyatome
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The pykeyatome library has to be called
Version
KeyAtome V1.0.0 is used
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.
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
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.
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}
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.
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)).
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.
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 ?
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:
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):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
HA OS 10.5
HA CORE 2023.8.4 (26/08/2023 07H30)
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:
Any clues?
Hello,
Your integration work but disconnect sometimes like atome.
Can we do reload if 30 minutes without change ?
If yes, how please ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.