-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apiet krashar vid hämtning av usage data #26
Comments
Hmm okej, det låter ju som ett väldigt specifikt fel. |
Om jag hämtar ut datan via apiet får jag ut båda facilitysarna inkl id på
dem, och i appen syns båda.
Men det finns ingen möjlighet att ändra vilken som är primär tyvärr.
Kan inte ens ta bort den primära som jag flyttade ifrån för över ett år
sedan.
Har kontaktat greenely om det, men får inte något svar från dem.
Den lör 25 juni 2022 kl 16:29 skrev Carolin ***@***.***>:
… Hmm okej, det låter ju som ett väldigt specifikt fel.
Finns det något sätt att se facility id i appen? Kan du på något sätt
ändra vilket hem som är "primär"?
—
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA53YUALPCX34EPXOBIUI5TVQ4JTVANCNFSM5XTAHG3Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Jag antar att jag skulle kunna lägga till ett fält för vilket facility id man har (om man vet det, annars använder den det primära). Kan kika på det ikväll! |
Det vore toppen, tack!
… 27 juni 2022 kl. 19:10 skrev Carolin ***@***.***>:
Jag antar att jag skulle kunna lägga till ett fält för vilket facility id man har (om man vet det, annars använder den det primära). Kan kika på det ikväll!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Har du möjlighet att kolla vilka anrop som hämtar ut data? |
Hittade en lösning som jag hoppas fungerar, let me know! |
Toppen! :D ska försöka hinna med att uppdatera och se om det funkar bättre :)
… 29 juni 2022 kl. 14:10 skrev Carolin ***@***.***>:
Hittade en lösning som jag hoppas fungerar, let me know!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Får det inte att fungera tyvärr..
Min konfig är:
|
Laddar upp en ny release nu! |
Följande felmeddelande kastas när jag försöker hämta ut usage.
När jag testar anropet via postman till https://api2.greenely.com/v3/data/2022/05/30/usage fungerar det, men med tom data.
Det kan vara relaterat till att jag har 2 hem i greenely, där det gamla jag flyttat från för över ett år sedan ligger kvar som "primär".
`greenely: Error on device update!
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 72, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.9/socket.py", line 954, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolve
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fec890416a0>: Failed to establish a new connection: [Errno -2] Name does not resolve
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api2.greenely.com', port=443): Max retries exceeded with url: /v3/data/2022/5/30/usage (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fec890416a0>: Failed to establish a new connection: [Errno -2] Name does not resolve'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 736, in async_device_update
await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/greenely/sensor.py", line 244, in update
response = self._api.get_usage(str(previous_day.year), str(previous_day.month), str(previous_day.day))
File "/config/custom_components/greenely/api.py", line 55, in get_usage
response = requests.get(url, headers = self._headers)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api2.greenely.com', port=443): Max retries exceeded with url: /v3/data/2022/5/30/usage (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fec890416a0>: Failed to establish a new connection: [Errno -2] Name does not resolve'))`
The text was updated successfully, but these errors were encountered: