kalanda / homeassistant-aemet-sensor Goto Github PK
View Code? Open in Web Editor NEWAEMET integration for Home Assistant
License: MIT License
AEMET integration for Home Assistant
License: MIT License
Hello, suddenly all the sensors from two different locations that I had configured have disappeared. Any indication?
2021-03-08 02:34:39 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'aemet'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'aemet'
I think component is not runnig because API is out of date. Is possible?
Sorry, my English is not good :-(
Thanks for this great component, unfortunatelly it stopped working when I upgraded my raspberry hassbian system after the last 0.96 release., as this last release requires the system upgrade to
It seems the key the API uses is weak and openssl does not allow the connection. I don´t know if there is any way to bypass this
2019-07-29 09:25:14 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform aemet
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/connectionpool.py", line 344, in _make_request
self._validate_conn(conn)
File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/connectionpool.py", line 843, in _validate_conn
conn.connect()
File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/connection.py", line 370, in connect
ssl_context=context)
File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 355, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/lib/python3.7/ssl.py", line 412, in wrap_socket
session=session
File "/usr/local/lib/python3.7/ssl.py", line 853, in _create
self.do_handshake()
File "/usr/local/lib/python3.7/ssl.py", line 1117, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1056)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/util/retry.py", line 399, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='opendata.aemet.es', port=443): Max retries exceeded with url: /opendata/api/observacion/convencional/datos/estacion/3191E?api_key=eyJhbGciOiJIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxJ0Zll1mpUlO_y5fmudQ (Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1056)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/aemet/sensor.py", line 69, in setup_platform
aemetData.update()
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/__init__.py", line 224, in wrapper
result = method(*args, **kwargs)
File "/home/homeassistant/.homeassistant/custom_components/aemet/sensor.py", line 147, in update
main_rsp = requests.get(endpoint_url, params=params)
File "/srv/homeassistant/lib/python3.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='opendata.aemet.es', port=443): Max retries exceeded with url: /opendata/api/observacion/convencional/datos/estacion/3191E?api_key=eyJhbGciOiJIUzI1Nixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3EyJ0Zll1mpUlO_y5fmudQ (Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1056)')))
Hello,
It could be great if you add more info, for example the % of the rain by aemet api
Seguí todos los pasos muy bien y nada...
Is it posible to get an entity_id of the weather (in general, not for specific sensors)? For example: "weather.aemet". It would be used for simple-weather-card or weather forecast card
With the new version this magnificent component stops working, for now I managed to log the log, adding the following file.
Test version 0.92.0b3
https://developers.home-assistant.io/docs/en/creating_integration_manifest.html
File: manifest.json
{
"domain": "aemet",
"name": "AEMET",
"documentation": "https://github.com/kalanda/homeassistant-custom-components",
"dependencies": [],
"codeowners": ["@kalanda"],
"requirements": []
}
Log Details (WARNING)
Tue Apr 23 2019 23:13:16 GMT+0200 (hora de verano de Europa central)
Your configuration contains extra keys that the platform does not support.
Please remove [name], [api_key], [station_id], [monitored_conditions].
I have noticed that HomeAssistant makes 4 requests every 90 seconds to the AEMET API to get the same data every time because the API only updates the values every hour.
Is it possible to increase the query interval to adapt it more to the availability of the data?
aemetsensor.log
I see that the AEMET website provides climatological approximation values (I don't understand how it does the calculation) in cities without a service station, in XML format.
In my city I don't have a station and the closest one is very far away, so the values are not at all reliable, not to say useless.
Is it possible to use these values in XML?
Thank you.
Hi
Why is it not considered like a weather service ? it makes it impossible to put it in a weather card in lovelace :(
Thanks
Hello,
Do you know if it is possible to also get UV sensor value as part of the report?
Thanks,
Alexandre
Hi,
After installing and configuring, it seems like the sensor is not retrieving any info. When checking "developer tools" log on Hass.IO, the error reads "Invalid response: 200".
Both api_key and station_id are correctly configured on configuration.yaml
Version: 2021.12.3
Alfter upgrade, AEMET sensor does not work anymore:
This is due to this change in HA.
home-assistant/core#58380
Hi there,
loving the integration so far. Many thanks for putting it together! :)
I'm just wondering if you could easily do a spin-off so that meteocat can be also included? Meteocat has an Rest API service published here: https://apidocs.meteocat.gencat.cat/ and maybe your code can be easily extended given what you may have learnt so far while doing the AEMET integration.
I really can't code at all. That's why I'm reaching out. I see that there is already a project in github but there have only been 3 commits so far, and the last one dates back from 2019.
Many thanks for even considering it! :)
Hi,
I've followed the instructions and there is no way I can manage to make this integration to work. I keep getting this error:
[custom_components.aemet.AemetApi] Invalid response: 200
prior to opening this issue, I've changed the API key and the Station to no avail.
Thanks
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.