Skip to content
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

Total Connect - add integration user/pass returns "Unknown error occurred" or "invalid flow specified" #116462

Closed
mondomx opened this issue Apr 30, 2024 · 13 comments · Fixed by #116827

Comments

@mondomx
Copy link

mondomx commented Apr 30, 2024

The problem

It started yesterday with a failed to connect error. I removed the integration to set it up again and now I’m getting an “Unknown error” (sometimes it just closes the dialog box, returns a blank dialog box and other times its an “invalid flow specified” error) when I put in my credentials (which do work on the TC 2.0 app and the website).

At first I thought it was a server error on the Total Connect side, but I suspect there might be an issue with the integration as I’m seeing a long “[aiohttp.server] Error handling request” error dump on the logs whenever I try to add the integration again.

image

What version of Home Assistant Core has the issue?

core-2024.4.4

What was the last working version of Home Assistant Core?

core-2024.4.3

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Total Connect

Link to integration documentation on our website

https://www.home-assistant.io/integrations/totalconnect/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-04-30 09:26:36.941 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 71, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 356, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 402, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 506, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/totalconnect/config_flow.py", line 51, in async_step_user
    client = await self.hass.async_add_executor_job(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/total_connect_client/client.py", line 86, in __init__
    self.authenticate()
  File "/usr/local/lib/python3.12/site-packages/total_connect_client/client.py", line 267, in authenticate
    response = self.request(operation_name, (
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/total_connect_client/client.py", line 216, in request
    self.soap_client = zeep.Client(self.API_ENDPOINT, transport=transport)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/client.py", line 76, in __init__
    self.wsdl = Document(wsdl, self.transport, settings=self.settings)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 92, in __init__
    self.load(location)
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 97, in load
    root_definitions = Definition(self, document, self.location)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 193, in __init__
    self._load(doc)
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 198, in _load
    self.parse_types(doc)
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 330, in parse_types
    self.types.add_documents(schema_nodes, self.location)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/schema.py", line 111, in add_documents
    document = self.create_new_document(node, location)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/schema.py", line 195, in create_new_document
    schema.load(self, node)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/schema.py", line 421, in load
    visitor.visit_schema(node)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 165, in visit_schema
    self.process(child, parent=node)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 93, in process
    result = visit_func(self, node, parent)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 615, in visit_complex_type
    kwargs = self.visit_complex_content(children[0], node)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 659, in visit_complex_content
    base, element, attributes = self.visit_restriction_complex_content(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 773, in visit_restriction_complex_content
    base_type = self._get_type(base_name)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 1204, in _get_type
    name = self._create_qname(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 1226, in _create_qname
    self.visit_import(import_node, None)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 238, in visit_import
    schema_node = self._retrieve_data(location, base_url=self.document._location)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 1198, in _retrieve_data
    return load_external(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/loader.py", line 89, in load_external
    content = transport.load(url)
              ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/transports.py", line 123, in load
    content = self._load_remote_data(url)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/transports.py", line 136, in _load_remote_data
    response.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Site Not Found for url: https://schemas.xmlsoap.org/soap/encoding/

Additional information

No response

@home-assistant
Copy link

Hey there @austinmroczek, mind taking a look at this issue as it has been labeled with an integration (totalconnect) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of totalconnect can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign totalconnect Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


totalconnect documentation
totalconnect source
(message by IssueLinks)

@mondomx
Copy link
Author

mondomx commented Apr 30, 2024

I noticed a 404 error at the bottom of the error log. Interestingly for if I try to reach https://schemas.xmlsoap.org/soap/envelope/ on my browser I do get a response, but if I try to reach https://schemas.xmlsoap.org/soap/encoding I get the 404.

I don't know if this is related.

@fwedler
Copy link

fwedler commented Apr 30, 2024

I am also seeing this issue.

Logs from active integration:

Logger: homeassistant.config_entries
Source: config_entries.py:551
First occurred: April 29, 2024 at 8:30:28 PM (4 occurrences)
Last logged: 1:26:12 PM

Error setting up entry Total Connect for totalconnect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/totalconnect/__init__.py", line 44, in async_setup_entry
    client = await hass.async_add_executor_job(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/total_connect_client/client.py", line 86, in __init__
    self.authenticate()
  File "/usr/local/lib/python3.12/site-packages/total_connect_client/client.py", line 267, in authenticate
    response = self.request(operation_name, (
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/total_connect_client/client.py", line 216, in request
    self.soap_client = zeep.Client(self.API_ENDPOINT, transport=transport)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/client.py", line 76, in __init__
    self.wsdl = Document(wsdl, self.transport, settings=self.settings)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 92, in __init__
    self.load(location)
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 97, in load
    root_definitions = Definition(self, document, self.location)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 193, in __init__
    self._load(doc)
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 198, in _load
    self.parse_types(doc)
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 330, in parse_types
    self.types.add_documents(schema_nodes, self.location)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/schema.py", line 111, in add_documents
    document = self.create_new_document(node, location)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/schema.py", line 195, in create_new_document
    schema.load(self, node)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/schema.py", line 421, in load
    visitor.visit_schema(node)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 165, in visit_schema
    self.process(child, parent=node)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 93, in process
    result = visit_func(self, node, parent)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 615, in visit_complex_type
    kwargs = self.visit_complex_content(children[0], node)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 659, in visit_complex_content
    base, element, attributes = self.visit_restriction_complex_content(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 773, in visit_restriction_complex_content
    base_type = self._get_type(base_name)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 1204, in _get_type
    name = self._create_qname(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 1226, in _create_qname
    self.visit_import(import_node, None)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 238, in visit_import
    schema_node = self._retrieve_data(location, base_url=self.document._location)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 1198, in _retrieve_data
    return load_external(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/loader.py", line 89, in load_external
    content = transport.load(url)
              ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/transports.py", line 123, in load
    content = self._load_remote_data(url)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/transports.py", line 136, in _load_remote_data
    response.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Site Not Found for url: https://schemas.xmlsoap.org/soap/encoding/

Logs from deleting the integration and trying to re-add it (which fails):

Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
First occurred: 1:26:49 PM (3 occurrences)
Last logged: 1:31:19 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 71, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 356, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 402, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 506, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/totalconnect/config_flow.py", line 51, in async_step_user
    client = await self.hass.async_add_executor_job(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/total_connect_client/client.py", line 86, in __init__
    self.authenticate()
  File "/usr/local/lib/python3.12/site-packages/total_connect_client/client.py", line 267, in authenticate
    response = self.request(operation_name, (
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/total_connect_client/client.py", line 216, in request
    self.soap_client = zeep.Client(self.API_ENDPOINT, transport=transport)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/client.py", line 76, in __init__
    self.wsdl = Document(wsdl, self.transport, settings=self.settings)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 92, in __init__
    self.load(location)
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 97, in load
    root_definitions = Definition(self, document, self.location)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 193, in __init__
    self._load(doc)
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 198, in _load
    self.parse_types(doc)
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/wsdl.py", line 330, in parse_types
    self.types.add_documents(schema_nodes, self.location)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/schema.py", line 111, in add_documents
    document = self.create_new_document(node, location)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/schema.py", line 195, in create_new_document
    schema.load(self, node)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/schema.py", line 421, in load
    visitor.visit_schema(node)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 165, in visit_schema
    self.process(child, parent=node)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 93, in process
    result = visit_func(self, node, parent)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 615, in visit_complex_type
    kwargs = self.visit_complex_content(children[0], node)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 659, in visit_complex_content
    base, element, attributes = self.visit_restriction_complex_content(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 773, in visit_restriction_complex_content
    base_type = self._get_type(base_name)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 1204, in _get_type
    name = self._create_qname(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 1226, in _create_qname
    self.visit_import(import_node, None)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 238, in visit_import
    schema_node = self._retrieve_data(location, base_url=self.document._location)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/visitor.py", line 1198, in _retrieve_data
    return load_external(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/loader.py", line 89, in load_external
    content = transport.load(url)
              ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/transports.py", line 123, in load
    content = self._load_remote_data(url)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/transports.py", line 136, in _load_remote_data
    response.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Site Not Found for url: https://schemas.xmlsoap.org/soap/encoding/

@austinmroczek
Copy link
Contributor

It seems the website is just not responding. Looks like a website configuration error.

The TotalConnect integration depends on total_connect_client, which depends on the zeep SOAP client. This is reported as an issue at mvantellingen/python-zeep#1417 with a suggested fix. I'll have to find a way to apply the fix to total_connect_client and then the new version pushed into HA.

I created an issue at craigjmidwinter/total-connect-client#223 to track progress.

@FedgarLurch
Copy link

Yeah I looked to see if I could figure out what or why it was, maybe a regional dns thing, but I didn't get anywhere.

Either way, thanks for your help Austin, you were the one that helped me get this started four years ago and it's worked basically flawless ever since. I appreciate it!

@tbclark3
Copy link

tbclark3 commented May 1, 2024

For me it only started with 2024.5.0. When I reverted to 2024.4.4 , the Total Connect integration connected normally.

@fwedler
Copy link

fwedler commented May 1, 2024

@tbclark3 I'm still on 2024.4.4 (never upgraded to 2024.5.0) so I think the reload after upgrade when it tried to re-authenticate is your failure point, not the version.

@tbclark3
Copy link

tbclark3 commented May 1, 2024

I don't think so. While running 2024.5.0 I reloaded multiple times, each resulting in the same failure, so then I deleted the integration and was unable to add it back. When I reverted to 2024.4.4, I was able to re-add it on the first try and it worked correctly on the first try.
EDIT: You may be right. After reading your response, I again upgraded to 2024.5.0 and the Total Connect integration loaded without error.

@fwedler
Copy link

fwedler commented May 1, 2024

Based on austinmroczek's analysis of the issue, it is odd you can connect on either version. I would start to suspect some sort of caching taking place. What happens when you visit https://schemas.xmlsoap.org/soap/encoding/ from your network?

@tbclark3
Copy link

tbclark3 commented May 1, 2024

Using curl (so I don't think it's caching) I am getting seemingly random responses--about 50% 404 and 50% legitimate xml. The site has a rather convoluted set of DNS records:

schemas.xmlsoap.org is an alias for schemaspublic.z01.azurefd.net.
schemaspublic.z01.azurefd.net is an alias for star-azurefd-prod.trafficmanager.net.
star-azurefd-prod.trafficmanager.net is an alias for shed.dual-low.part-0042.t-0009.t-msedge.net.
shed.dual-low.part-0042.t-0009.t-msedge.net is an alias for part-0042.t-0009.t-msedge.net.
part-0042.t-0009.t-msedge.net has address 13.107.213.70
part-0042.t-0009.t-msedge.net has address 13.107.246.70
part-0042.t-0009.t-msedge.net has IPv6 address 2620:1ec:bdf::70
part-0042.t-0009.t-msedge.net has IPv6 address 2620:1ec:46::70

However, I tested each of the actual hosts, and all (?both) are returning errors at random.

@ahahamyan
Copy link

Having the same issue, both with 2024.4.4 and 2024.5.0, getting the 404, I did notice https://status.resideo.com/ reporting degraded performance on May 1, but the Total Connect 2 mobile app works fine, so not sure if this is related. Reloading keeps failing. Please help.

@ahahamyan
Copy link

Just reloaded and it worked. https://schemas.xmlsoap.org/soap/encoding/ is loading now, so 404 appears to be resolved.

@fwedler
Copy link

fwedler commented May 2, 2024

I can also confirm that I was able to install the add-on successfully now. But this exposes a weakness in the design so I would still be interested in the fix to localize the code dependency.

@austinmroczek austinmroczek mentioned this issue May 5, 2024
20 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants