Giter Site home page Giter Site logo

homeassistant-aemet-sensor's Introduction

Hi there 👋

homeassistant-aemet-sensor's People

Contributors

djmoren avatar kalanda avatar outon avatar wrt54g avatar

Stargazers

 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

homeassistant-aemet-sensor's Issues

Missing sensors ...

Hello, suddenly all the sensors from two different locations that I had configured have disappeared. Any indication?

Call to API is out of date?

I think component is not runnig because API is out of date. Is possible?

Sorry, my English is not good :-(

Invalid response: 200

Hola

Estoy tratando de instalar esta integración pero no lo consigo. He seguido los pasos pero me da error, pongo aquí mi configuración de configuration.yaml ¿que puedo estar haciendo mal?

Gracias

20200718_132126

Screenshot_20200718-132205_Home Assistant

20200718_131922

Handshake error in HA 0.96

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)')))

New version 0.92.0

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].

Excessive API request rate.

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

It,s posible to use the "municipio" XML data instead the station?

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.

UV sensor

Hello,

Do you know if it is possible to also get UV sensor value as part of the report?

Thanks,

Alexandre

No info retrieved on Hass.IO 0.98.3

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

Forecast shown as "Unknown"

Sensors readings work fine but forecast info appears as "Unknown". Any additional config missing?

aemet

here is the code:

weather:
  - platform: aemet
    name: "AEMET"
    api_key: "eyJhbGciOiJIUzI1NiJ...."
    station_id: "XXXX"

Could you consider creating a spin-off for meteocat?

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! :)

Invalid response

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

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.