sockless-coding / garo_wallbox

Garo wallbox - Home Assistant Component
MIT License
20 stars 35 forks source link

Does not work for me - SOLVED #6

Closed molcam closed 3 years ago

molcam commented 3 years ago

Tried both with and without HTTP:// and with the port and without the port (e.g. HTTP://192.168.0.XXX:8080, HTTP://192.168.0.XXX, 192.168.0.XXX:8080, or 192.168.0.XXX but it states "ABORTED Unexpected error creating device". What is the Friendly Name used for?

Form Log: ClientError Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection hosts = await asyncio.shield(host_resolved) File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 865, in _resolve_host addrs = await self._resolver.resolve(host, port, family=self._family) File "/usr/local/lib/python3.8/site-packages/aiohttp/resolver.py", line 31, in resolve infos = await self._loop.getaddrinfo( File "/usr/local/lib/python3.8/asyncio/base_events.py", line 825, in getaddrinfo return await self.run_in_executor( File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Try again

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/garo_wallbox/config_flow.py", line 42, in _create_device await device.init() File "/config/custom_components/garo_wallbox/garo.py", line 58, in init await self.async_get_info() File "/config/custom_components/garo_wallbox/garo.py", line 91, in async_get_info response = await self._session.request(method='GET', url=self.__get_url('config', True)) File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 520, in _request conn = await self._connector.connect( File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 535, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 892, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection raise ClientConnectorError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host http:80 ssl:default [Try again]


ClientError Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/yarl/_url.py", line 170, in new port = val.port File "/usr/local/lib/python3.8/urllib/parse.py", line 174, in port raise ValueError(message) from None ValueError: Port could not be cast to integer value as '8080:2222'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 404, in _request url = URL(str_or_url) File "/usr/local/lib/python3.8/site-packages/yarl/_url.py", line 172, in new raise ValueError( ValueError: Invalid URL: port can't be converted to integer

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/garo_wallbox/config_flow.py", line 42, in _create_device await device.init() File "/config/custom_components/garo_wallbox/garo.py", line 58, in init await self.async_get_info() File "/config/custom_components/garo_wallbox/garo.py", line 91, in async_get_info response = await self._session.request(method='GET', url=self.__get_url('config', True)) File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 406, in _request raise InvalidURL(str_or_url) from e aiohttp.clientexceptions.InvalidURL: http://192.168.0.108:8080:2222/rest/chargebox/config?=1611259130741

sockless-coding commented 3 years ago

Hi @molcam What model do you have and can you access the following urls: http://192.168.0.108:2222/rest/chargebox/status http://192.168.0.108:2222/rest/chargebox/config

Friendly name is a way to give the charger a name, if you do for instance call it 'garage charge' the entities will be called 'garage_chargerxxx' instead of '[model][ip]_xxx'

molcam commented 3 years ago

The model is GLBDCWM-T222WO

"ocppState":null,"connectedToInternet":true,"freeCharging":false,"ocppConnectionState":null,"connector":"CHARGING_FINISHED","mode":"ALWAYS_ON","currentLimit":16,"factoryCurrentLimit":32,"switchCurrentLimit":16,"powerMode":"ON","currentChargingCurrent":0,"currentChargingPower":0,"accSessionEnergy":7400,"latestReading":1600400,"chargeStatus":80,"updateStatus":{"serialsToUpdate":[],"serialsUpdated":[],"currentlyUpdating":-1,"currentProgress":-1,"failedUpdate":0},"currentTemperature":25,"slaveControlWarning":false,"pilotLevel":16,"sessionStartValue":1593000,"nrOfPhases":1}

sockless-coding commented 3 years ago

The GLBDCWM-T222WO is supported and all you should have to enter is the IP as Host. Could you give me the error when you enter just the IP, the gaierror indicates that it tries to resolve the host and fails.

molcam commented 3 years ago

I got it to work somehow. Thank you for a great HA addon!