claudegel/sinope-130

Error during setup of component neviweb130

Closed this issue · 6 comments

Logger: homeassistant.setup
Source: setup.py:332
First occurred: 7:34:09 PM (1 occurrences)
Last logged: 7:34:09 PM

Error during setup of component neviweb130
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/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.12/socket.py", line 963, 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.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f93c04e2c90>: 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.12/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='neviweb.com', port=443): Max retries exceeded with url: /api/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f93c04e2c90>: 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 "/config/custom_components/neviweb130/init.py", line 215, in __post_login_page
raw_res = requests.post(LOGIN_URL, data=data,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='neviweb.com', port=443): Max retries exceeded with url: /api/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f93c04e2c90>: 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.12/site-packages/homeassistant/setup.py", line 332, in _async_setup_component
result = await task
^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/neviweb130/init.py", line 135, in setup
data = Neviweb130Data(hass_config[DOMAIN])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/neviweb130/init.py", line 168, in init
self.neviweb130_client = Neviweb130Client(username, password, network, network2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/neviweb130/init.py", line 198, in init
self.__post_login_page()
File "/config/custom_components/neviweb130/init.py", line 219, in __post_login_page
raise PyNeviweb130Error("Cannot submit login form")
custom_components.neviweb130.PyNeviweb130Error: Cannot submit login form

Hi, look like you cannot log into Neviweb. What did you put in your configuration.yaml file for neviweb130?
You should have this:

neviweb130:
  username: !secret climate_username  <-- the email address you use to log in neviweb
  password: !secret climate_password <-- The password you put for Neviweb
  network: !secret climate_gateway130 <-- The name of the location name you've set in neviweb
  scan_interval: 360
  stat_interval: 600

You can put those three parameters directly in configuration.yaml or put it like I didi and place the real data in file secrets.yaml like this:

climate_username: 'user@you.com'
climate_password: 'Neviweb_passwd'
climate_gateway130: 'Location_name'

I double check and yes everiything is there. Try to connect directly on the neviweb.com platform and it's working.

Does your HA have access to internet ? firewall?
neviweb130 try to send login data but it fail. Look like a network problem. Can you install the module Terminal & SSH and try to ping neviweb.com.
What is your HA setup

Add this in your configuration.yaml file and restart HA. Then check in home-assistant.log to see the log for neviweb130.

logger:
  default: warning
  logs:
    homeassistant.custom_components: debug
    custom_components.neviweb130: debug

Thank you very much for your help. Firs I had a network problem with de DNS servers. Once corrected, I use the debug option to find out that there was a space in my network name in Neviweb and not in my config file.

Happy to see that you solved your problem. I'll check if I can add a little more debug message to point to the problem.