wijnandtop / home_assistant_gardena

Custom component to support Gardena smart devices
32 stars 7 forks source link

There seems to be a connection issue with the official API #13

Closed kayloehmann closed 4 years ago

kayloehmann commented 4 years ago

Hi, i get this error since the last update of homeassistant 0.107.5. Can you please check?

` Protokolldetails ( ERROR )

Logger: homeassistant.helpers.entity Source: custom_components/gardena/init.py:68 First occurred: 08:07:32 (2 occurrences) Last logged: 08:07:37

Update for binary_sensor.beet_ambient_frost_warning fails
Update for binary_sensor.vorgarten_ambient_frost_warning fails

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 61, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen chunked=chunked, File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn conn.connect() File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 300, in connect conn = self._new_conn() File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0xb20b6b70>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='sg-api.dss.husqvarnagroup.net', port=443): Max retries exceeded with url: /sg-1/devices?locationId=d67249e3-d22a-409c-a09b-7f3f0e931946 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xb20b6b70>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, self.kwargs) File "/config/custom_components/gardena/binary_sensor.py", line 43, in update self.gardena.update_devices() # is a throttled update File "/usr/src/homeassistant/homeassistant/util/init.py", line 240, in wrapper result = method(args, kwargs) File "/config/custom_components/gardena/init.py", line 68, in update_devices self.my_gardena.update_devices() File "/usr/local/lib/python3.7/site-packages/wt/pygardena/account.py", line 35, in update_devices location.update_devices() File "/usr/local/lib/python3.7/site-packages/wt/pygardena/location.py", line 56, in update_devices self.update_raw_data() File "/usr/local/lib/python3.7/site-packages/wt/pygardena/location.py", line 65, in update_raw_data self.raw_devices = self.rest_api.get_devices(self.id) File "/usr/local/lib/python3.7/site-packages/wt/pygardena/rest_api.py", line 45, in get_devices 'locationId': location_id File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 543, in get return self.request('GET', url, kwargs) File "/usr/local/lib/python3.7/site-packages/wt/pygardena/rest_api.py", line 17, in request return super().request(method, urljoin(self.base_url, url), args, kw) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='sg-api.dss.husqvarnagroup.net', port=443): Max retries exceeded with url: /sg-1/devices?locationId=d67249e3-d22a-409c-a09b-7f3f0e931946 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xb20b6b70>: Failed to establish a new connection: [Errno -3] Try again'))

`

ppurice commented 4 years ago

Good morning,

Just an information, I can use gardena water without gardena gateway ? I have only gardena water .

Thanks Paolo

From: Kay notifications@github.com Sent: lunedì 23 marzo 2020 08:51 To: wijnandtop/home_assistant_gardena home_assistant_gardena@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [wijnandtop/home_assistant_gardena] There seems to be a connection issue with the official API (#13)

Hi, i get this error since the last update of homeassistant 0.107.5. Can you please check?

` Protokolldetails ( ERROR )

Logger: homeassistant.helpers.entity Source: custom_components/gardena/init.py:68 First occurred: 08:07:32 (2 occurrences) Last logged: 08:07:37

Update for binary_sensor.beet_ambient_frost_warning fails Update for binary_sensor.vorgarten_ambient_frost_warning fails

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 61, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen chunked=chunked, File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn conn.connect() File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 300, in connect conn = self._new_conn() File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0xb20b6b70>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='sg-api.dss.husqvarnagroup.net', port=443): Max retries exceeded with url: /sg-1/devices?locationId=d67249e3-d22a-409c-a09b-7f3f0e931946 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xb20b6b70>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, self.kwargs) File "/config/custom_components/gardena/binary_sensor.py", line 43, in update self.gardena.update_devices() # is a throttled update File "/usr/src/homeassistant/homeassistant/util/init.py", line 240, in wrapper result = method(args, kwargs) File "/config/custom_components/gardena/init.py", line 68, in update_devices self.my_gardena.update_devices() File "/usr/local/lib/python3.7/site-packages/wt/pygardena/account.py", line 35, in update_devices location.update_devices() File "/usr/local/lib/python3.7/site-packages/wt/pygardena/location.py", line 56, in update_devices self.update_raw_data() File "/usr/local/lib/python3.7/site-packages/wt/pygardena/location.py", line 65, in update_raw_data self.raw_devices = self.rest_api.get_devices(self.id) File "/usr/local/lib/python3.7/site-packages/wt/pygardena/rest_api.py", line 45, in get_devices 'locationId': location_id File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 543, in get return self.request('GET', url, kwargs) File "/usr/local/lib/python3.7/site-packages/wt/pygardena/rest_api.py", line 17, in request return super().request(method, urljoin(self.base_url, url), args, kw) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='sg-api.dss.husqvarnagroup.net', port=443): Max retries exceeded with url: /sg-1/devices?locationId=d67249e3-d22a-409c-a09b-7f3f0e931946 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xb20b6b70>: Failed to establish a new connection: [Errno -3] Try again'))

`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wijnandtop/home_assistant_gardena/issues/13 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZDR2QKI77Q4UFAFNXPZHDRI4IHTANCNFSM4LRVGP7A . https://github.com/notifications/beacon/ANZDR2S6XM6STMKVQ5X2A4TRI4IHTA5CNFSM4LRVGP7KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IXNVT5Q.gif

wijnandtop commented 4 years ago

Good morning, Just an information, I can use gardena water without gardena gateway ? I have only gardena water . Thanks Paolo

The gateway is required to make it "smart" and is required for this plugin.

wijnandtop commented 4 years ago

@kayloehmann were you able to fix the issue in your fork?

kayloehmann commented 4 years ago

@kayloehmann were you able to fix the issue in your fork?

I dont think it makes sense to spent more time on this, rather implementing the official API. Or?

thecem commented 4 years ago

Could you bring a little bit more light in this, which API is used rigt know ? If I have a look into https://developer.1689.cloud/apis/GARDENA+smart+system+API#/readme There is no Water_computer, but a VALVE (Water Control) and VALVE_SET (Irrigation Control), so this will be the main reason why the Water switch will not work any more. Let me know if I could support in any way...

wijnandtop commented 4 years ago

At the time i created this plugin there was no official API yet. So the "api" which I use is based on other people's (non python) code and did some (wireshark) reverse engineering.

So it makes sense to implement the new api, but will be more time-consuming (which I'm currently lacking). The are some other people working on a new plugin but no release yet.

So the shortest route would be fixing the current implementation.

TheFitzZZ commented 4 years ago

I did some research and someone is quite active and seemingly has the real api implemented. He also tried (?) to have an integration merged into HA core. Can't we use this? https://github.com/grm/py-smart-gardena

wijnandtop commented 4 years ago

The same guy also worked on a HA implementation (https://github.com/grm/home-assistant/tree/feature/smart_gardena ) he diid a PR towards HA (https://github.com/home-assistant/core/pull/27690 ) but for some reason didn't finalise it. I did ask him about his plans regarding the plugin, but no reply yet (https://github.com/grm/py-smart-gardena/issues/49 )

Maybe this one can be altered towards an HACS plugin.

northpower25 commented 4 years ago

I‘ve too switch over to -> https://github.com/py-smart-gardena/hass-gardena-smart-system

Thanks for your work @wijnandtop but i think the Integration of @osks is now closer to the target to become an official HA integration status with use of the official Gardena/Husquarna API

wijnandtop commented 4 years ago

This project is no longer supported, it was build at a time when there was no official supported Gardena API. By now there is a new implementation, with realtime interaction and supporting all gardena devices:

https://github.com/py-smart-gardena/hass-gardena-smart-system