DeerMaximum / Technische-Alternative-CMI

Custom Home Assistant integration to read data from a C.M.I.
MIT License
43 stars 4 forks source link

Can't connect to the CMI system #49

Open creuter27 opened 1 year ago

creuter27 commented 1 year ago

First off thank you for your great work!

In my browser I can access the CMI using the URL http://192.168.178.169:8088/#home.cgi If I only enter http://192.168.178.169:8088 then I am automatically forwarded to the address above. The CMI then asks me to enter the user and password and I can log in.

However, I can't find a way to get this integration connected to my CMI. I have installed the integration (most recent version 1.41 and also tried the latest beta version) using HACS as described here. After restarting HA I went to Settings->Integrations->Add integration->Technische Alternative C.M.I. Then the configuration dialog popped up as expected. From here I am unable to find a configuration that works. For the following tests I have always used the correct (admin) user and password. I also tried everything with the credentials of a normal (non-admin) user.

If I use the URL http://192.168.178.169:8088 then I get an error message immediately saying "Error while communicating with a device. See logs for details". The log entry says: Logger: custom_components.ta_cmi Source: custom_components/ta_cmi/config_flow.py:127 Integration: ta_cmi (documentation, issues) First occurred: 10:08:01 (2 occurrences) Last logged: 10:38:03 Error while communicating with a device (1): Invalid response from CMI: 404

Using the complete URL http://192.168.178.169:8088/#home.cgi causes the dialog to show the wait symbol for a minute or so and then show the message "unknown error occurred". The log says: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 146, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper result = await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 271, in async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/config/custom_components/ta_cmi/config_flow.py", line 127, in async_step_user return await self.async_step_devices() File "/config/custom_components/ta_cmi/config_flow.py", line 188, in async_step_devices await fetch_device(dev) File "/config/custom_components/ta_cmi/config_flow.py", line 69, in fetch_device await device.fetch_type() File "/usr/local/lib/python3.10/site-packages/ta_cmi/device.py", line 96, in fetch_type self._extract_device_info(await self._make_request_to_device()) File "/usr/local/lib/python3.10/site-packages/ta_cmi/device.py", line 88, in _make_request_to_device return await self._make_request(url) File "/usr/local/lib/python3.10/site-packages/ta_cmi/baseApi.py", line 24, in _make_request data = json.loads(raw_response) File "/usr/local/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I also tried the URL without the port (http://192.168.178.169). After a minute wait time or so I get the following error message in the dialog: [%key:common::config_flow::error::cannot_connect%] There is no new log entry in this case.

Any ideas how to make this work?

creuter27 commented 1 year ago

Update: I have now tried setting the CMI to the default port (80) so that it is not necessary to add the port to the URL. I used the URL http://192.168.178.169 in the configuration dialog but this resulted in the same error as using the URL http://192.168.178.169:8088 before changing the port. (404 error)

DeerMaximum commented 1 year ago

Can you pull up those urls directly in the browser and send me the results?

http://192.168.178.169/INCLUDE/can_nodes.cgi?_=1 http://192.168.178.169:8088/INCLUDE/can_nodes.cgi?_=1

creuter27 commented 1 year ago

Sure, The first URL opens a white page with the text "1;" in the top left corner (without the quotes) The second URL can't work anymore since I have changed the port to the default port. (80) as mentioned above. As expected I get "ERR_CONNECTION_TIMED_OUT" in Chrome. Thank you for your support!

DeerMaximum commented 1 year ago

In this case you have to enter http://192.168.178.169 as host in the setup. Then the integration should work.

Daste87 commented 1 year ago

Hi guys, I have the same problem as creuter27.

I can reach the http page under: http://192.168.178.64 and successfully login. If I use the IP and the correct credentials within the integration, it can not connect.

If I open: http://192.168.178.64/INCLUDE/can_nodes.cgi?_=1 I am getting the following output: 1;3;22;

Ana ideas?

DeerMaximum commented 1 year ago

@Daste87 Could you set the integration to the debug log level and send me the logs?

logger:
  default: info
  logs:
    custom_components.ta_cmi: debug
    ta_cmi: debug
Daste87 commented 1 year ago

@DeerMaximum Yes, sure. To be honest, I am a beginner with Home Assitant, but generally experienced with Smarthome. Could you please tell me how to do this, where to do this, in which file exatcly?

DeerMaximum commented 1 year ago

Sure.

You can find information about logging in Home Assistant here. You need to add the code snippet in your configuration.yaml

Daste87 commented 1 year ago

Within the home-assistant.log I am getting the following message: [ta_cmi] Receive list of nodes from C.M.I [ta_cmi] Received list of nodes from C.M.I: 1;3;22; [customer_components.ta_cmi] Sleep mode for 61 seconds to prevent rate limiting

I tried it several times, and that is the message, I am getting all the time.

DeerMaximum commented 1 year ago

The logs say that the integration waits 61 seconds before sending a new request to the CMI. Did you wait for this time? If not can you wait the minute and see if there are new log entries?

Lorress commented 1 year ago

Hello DeerMaximum, i know this is not the write place to ask but is there a way to connect the uvr1611 via BLNET? thanks

DeerMaximum commented 1 year ago

@Lorress Since I have neither a uvr1611 or experience with BLNET, I can't help you there.

dagassa commented 1 year ago

Hello @DeerMaximum unfortunately I'm experiencing the same issue. However, also the network of the C.M.I goes down during the setup (LAN LED flashing) and is not pingable anymore. It comes back after some minutes.

What is it about this rate limiting, is TA setting this rate limit, and if so maybe 61 seconds is not enough?

My second question is, does this integration have just read or also write permission on the C.M.I ?

/INCLUDE/cannodes.cgi?=1` 2;3;

2023-07-18 13:23:16.653 DEBUG (MainThread) [ta_cmi] Receive list of nodes from C.M.I 2023-07-18 13:23:16.677 DEBUG (MainThread) [ta_cmi] Received list of nodes from C.M.I: 2;3; 2023-07-18 13:23:16.678 DEBUG (MainThread) [custom_components.ta_cmi] Sleep mode for 61 seconds to prevent rate limiting 2023-07-18 13:24:17.680 DEBUG (MainThread) [custom_components.ta_cmi] Try to fetch device type: 2 2023-07-18 13:24:17.680 DEBUG (MainThread) [ta_cmi] Make request to device 2 with parameters: I,O 2023-07-18 13:24:18.352 DEBUG (MainThread) [custom_components.ta_cmi] Sleep mode for 61 seconds to prevent rate limiting 2023-07-18 13:25:19.354 DEBUG (MainThread) [custom_components.ta_cmi] Try to fetch available device channels: 2 2023-07-18 13:25:19.354 DEBUG (MainThread) [ta_cmi] Update device: 2 2023-07-18 13:25:19.355 DEBUG (MainThread) [ta_cmi] Make request to device 2 with parameters: I,O,D,Sg,Sd,St,Ss 2023-07-18 13:26:21.961 DEBUG (MainThread) [ta_cmi] Make request to device 2 with parameters: La,Ld 2023-07-18 13:26:21.979 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, 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/view.py", line 148, in handle result = await handler(request, *request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post return await super().post(request, flow_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper result = await method(view, request, data, args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post result = await self._flow_mgr.async_configure(flow_id, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 297, in async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 393, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ta_cmi/config_flow.py", line 127, in async_step_user return await self.async_step_devices() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ta_cmi/config_flow.py", line 188, in async_step_devices await fetch_device(dev) File "/config/custom_components/ta_cmi/config_flow.py", line 74, in fetch_device await device.update() File "/usr/local/lib/python3.11/site-packages/ta_cmi/device.py", line 78, in update res: Dict[str, Any] = await self._make_request_to_device() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/ta_cmi/device.py", line 67, in _make_request_to_device data["Data"].update((await self._api.get_device_data(self.id, params))["Data"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/ta_cmi/cmi_api.py", line 47, in get_device_data return await self._make_data_request(url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/ta_cmi/cmi_api.py", line 51, in _make_data_request data = await self._make_request(url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/ta_cmi/api.py", line 27, in _make_request return json.loads(raw_response) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 8 column 1 (char 76)

🙏 Thanks

DeerMaximum commented 1 year ago

@dagassa To address your questions. The API that the integration uses only allows read access. Regarding the rate limit, I will increase the delay to 75 seconds.

dagassa commented 1 year ago

Thank you @DeerMaximum,

unfortunately, I still get the error "Unknown error occurred"

2023-07-26 16:55:51.544 INFO (SyncWorker_8) [homeassistant.util.package] Attempting install of ta-cmi==2.0.2 2023-07-26 16:58:09.190 DEBUG (MainThread) [ta_cmi] Receive list of nodes from C.M.I 2023-07-26 16:58:09.213 DEBUG (MainThread) [ta_cmi] Received list of nodes from C.M.I: 2;3; 2023-07-26 16:58:09.214 DEBUG (MainThread) [custom_components.ta_cmi] Sleep mode for 61 seconds to prevent rate limiting 2023-07-26 16:59:10.215 DEBUG (MainThread) [custom_components.ta_cmi] Try to fetch device type: 2 2023-07-26 16:59:10.216 DEBUG (MainThread) [ta_cmi] Make request to device 2 with parameters: I,O 2023-07-26 16:59:10.239 DEBUG (MainThread) [ta_cmi] Failed response received: {"Header": {"Version": 6, "Device": "87", "Timestamp": 1690390750}, "Data": {}, "Status": "FAIL", "Status code": 2} 2023-07-26 16:59:10.240 DEBUG (MainThread) [custom_components.ta_cmi] Sleep mode for 61 seconds to prevent rate limiting 2023-07-26 17:00:11.242 DEBUG (MainThread) [custom_components.ta_cmi] Try to fetch device type: 2 2023-07-26 17:00:11.243 DEBUG (MainThread) [ta_cmi] Make request to device 2 with parameters: AM 2023-07-26 17:00:11.268 DEBUG (MainThread) [ta_cmi] Failed response received: {"Header": {"Version": 6, "Device": "87", "Timestamp": 1690390811}, "Data": {}, "Status": "FAIL", "Status code": 2} 2023-07-26 17:00:11.269 WARNING (MainThread) [custom_components.ta_cmi] Error while communicating with a device (2): Failure during the CAN-request/parameter not available for this device 2023-07-26 17:00:11.352 DEBUG (MainThread) [custom_components.ta_cmi] Sleep mode for 61 seconds to prevent rate limiting 2023-07-26 17:01:12.354 DEBUG (MainThread) [custom_components.ta_cmi] Try to fetch device type: 3 2023-07-26 17:01:12.354 DEBUG (MainThread) [ta_cmi] Make request to device 3 with parameters: I,O

However, I can reach the API and manually request everything above with the same parameters. I get a response from the C.M.I. with the needed data. In this case, there is generally no Modbus set. Would it be possible to skip this part in the script if it is not available?

DeerMaximum commented 1 year ago

@dagassa The setup wizard tries to determine the type of the device. First only with I and O as arguments and if the query fails, for example if the device has no inputs and outputs, a new attempt is made.

In such a case it will try again, but with the arguments A and M.

Since the first query fails, even though the device has inputs and outputs, this cycle is also run. Normally a UVR16x2 never tries to access the modbus during setup.

Since I also have UVR16x2 in use, I find the error very unusual.

From the logs I see that you want to set up a second device besides the UVR16x2, what kind of device is it? And can you set up the second device?

Maybe it could help to reinstall the integration again.

dagassa commented 1 year ago

@DeerMaximum The question is why it fails as I do get a response from the API with the same arguments.

2023-07-27 14:01:17.358 DEBUG (MainThread) [ta_cmi] Receive list of nodes from C.M.I 2023-07-27 14:01:17.373 DEBUG (MainThread) [ta_cmi] Received list of nodes from C.M.I: 2;3; 2023-07-27 14:01:17.374 DEBUG (MainThread) [custom_components.ta_cmi] Sleep mode for 75 seconds to prevent rate limiting 2023-07-27 14:02:32.375 DEBUG (MainThread) [custom_components.ta_cmi] Try to fetch device type: 2 2023-07-27 14:02:32.376 DEBUG (MainThread) [ta_cmi] Make request to device 2 with parameters: I,O 2023-07-27 14:02:32.407 DEBUG (MainThread) [ta_cmi] Failed response received: {"Header": {"Version": 6, "Device": "87", "Timestamp": 1690466552}, "Data": {}, "Status": "FAIL", "Status code": 2}

http://CMI/INCLUDE/api.cgi?jsonnode=2&jsonparam=I,O `{ "Header": { "Version": 6, "Device": "87", "Timestamp": 1690467112 }, "Data": { "Inputs": [ { "Number": 1, "AD": "A", "Value": { "Value": 18.2, "Unit": "1" } }, { "Number": 2, "AD": "A", "Value": { "Value": 39.9, "Unit": "1" } }, { "Number": 3, "AD": "A", "Value": { "Value": 40.3, "Unit": "1" } }, { "Number": 4, "AD": "A", "Value": { "Value": 38.7, "Unit": "1" } }, { "Number": 5, "AD": "A", "Value": { "Value": 38, "Unit": "1" } }, { "Number": 6, "AD": "A", "Value": { "Value": 50, "Unit": "1" } }, { "Number": 7, "AD": "A", "Value": { "Value": 59.1, "Unit": "1" } }, { "Number": 8, "AD": "A", "Value": { "Value": 47.5, "Unit": "1" } }, { "Number": 10, "AD": "D", "Value": { "Value": 1, "Unit": "43" } }, { "Number": 11, "AD": "D", "Value": { "Value": 1, "Unit": "43" } }, { "Number": 12, "AD": "D", "Value": { "Value": 1, "Unit": "43" } }, { "Number": 13, "AD": "D", "Value": { "Value": 1, "Unit": "43" } }, { "Number": 14, "AD": "D", "Value": { "Value": 0, "Unit": "43" } } ], "Outputs": [ { "Number": 1, "AD": "D", "Value": { "Value": 0, "Unit": "43" } }, { "Number": 2, "AD": "D", "Value": { "Value": 0, "Unit": "43" } }, { "Number": 5, "AD": "D", "Value": { "Value": 0, "Unit": "43" } }, { "Number": 6, "AD": "D", "Value": { "Value": 0, "Unit": "43" } }, { "Number": 7, "AD": "D", "Value": { "Value": 0, "Unit": "43" } }, { "Number": 14, "AD": "D", "Value": { "Value": 0, "Unit": "43" } }, { "Number": 15, "AD": "A", "Value": { "State": 1, "Value": 0.2, "Unit": "13" } } ] }, "Status": "OK", "Status code": 0`

2023-07-27 14:02:32.407 DEBUG (MainThread) [custom_components.ta_cmi] Sleep mode for 75 seconds to prevent rate limiting 2023-07-27 14:03:47.410 DEBUG (MainThread) [custom_components.ta_cmi] Try to fetch device type: 2 2023-07-27 14:03:47.411 DEBUG (MainThread) [ta_cmi] Make request to device 2 with parameters: AM 2023-07-27 14:03:47.435 DEBUG (MainThread) [ta_cmi] Failed response received: {"Header": {"Version": 6, "Device": "87", "Timestamp": 1690466627}, "Data": {}, "Status": "FAIL", "Status code": 2} 2023-07-27 14:03:47.436 WARNING (MainThread) [custom_components.ta_cmi] Error while communicating with a device (2): Failure during the CAN-request/parameter not available for this device

2023-07-27 14:03:47.485 DEBUG (MainThread) [custom_components.ta_cmi] Sleep mode for 75 seconds to prevent rate limiting 2023-07-27 14:05:02.488 DEBUG (MainThread) [custom_components.ta_cmi] Try to fetch device type: 3 2023-07-27 14:05:02.488 DEBUG (MainThread) [ta_cmi] Make request to device 3 with parameters: I,O

http://CMI/INCLUDE/api.cgi?jsonnode=3&jsonparam=I,O The second device is a UVR1611 HEXID 80 `{ "Header": { "Version": 6, "Device": "80", "Timestamp": 1690467431 }, "Data": { "Inputs": [ { "Number": 1, "AD": "A", "Value": { "Value": 53.9, "Unit": "1" } }, { "Number": 2, "AD": "A", "Value": { "Value": 53.7, "Unit": "1" } }, { "Number": 3, "AD": "A", "Value": { "Value": 39.8, "Unit": "1" } }, { "Number": 4, "AD": "A", "Value": { "Value": 59.2, "Unit": "1" } }, { "Number": 5, "AD": "A", "Value": { "Value": 55.2, "Unit": "1" } }, { "Number": 6, "AD": "A", "Value": { "Value": 49.4, "Unit": "1" } }, { "Number": 7, "AD": "A", "Value": { "Value": 48.4, "Unit": "1" } }, { "Number": 8, "AD": "A", "Value": { "Value": 48.2, "Unit": "1" } }, { "Number": 9, "AD": "A", "Value": { "Value": 49.5, "Unit": "1" } }, { "Number": 10, "AD": "A", "Value": { "Value": 47.6, "Unit": "1" } }, { "Number": 11, "AD": "A", "Value": { "Value": 44.8, "Unit": "1" } }, { "Number": 12, "AD": "A", "Value": { "Value": 49.4, "Unit": "1" } }, { "Number": 13, "AD": "D", "Value": { "Value": 0, "Unit": "43" } }, { "Number": 14, "AD": "D", "Value": { "Value": 0, "Unit": "43" } }, { "Number": 15, "AD": "D", "Value": { "Value": 0, "Unit": "43" } }, { "Number": 16, "AD": "D", "Value": { "Value": 0, "Unit": "43" } } ], "Outputs": [ { "Number": 1, "AD": "A", "Value": { "State": 0, "Value": 0, "Unit": "0" } }, { "Number": 2, "AD": "A", "Value": { "State": 0, "Value": 0, "Unit": "0" } }, { "Number": 3, "AD": "D", "Value": { "Value": 0, "Unit": "0" } }, { "Number": 4, "AD": "D", "Value": { "Value": 0, "Unit": "0" } }, { "Number": 5, "AD": "D", "Value": { "Value": 0, "Unit": "0" } }, { "Number": 6, "AD": "A", "Value": { "State": 0, "Value": 0, "Unit": "0" } }, { "Number": 7, "AD": "A", "Value": { "State": 0, "Value": 0, "Unit": "0" } }, { "Number": 8, "AD": "D", "Value": { "Value": 0, "Unit": "0" } }, { "Number": 9, "AD": "D", "Value": { "Value": 0, "Unit": "0" } }, { "Number": 10, "AD": "D", "Value": { "Value": 0, "Unit": "0" } }, { "Number": 11, "AD": "D", "Value": { "Value": 1, "Unit": "0" } }, { "Number": 12, "AD": "D", "Value": { "Value": 0, "Unit": "0" } }, { "Number": 13, "AD": "D", "Value": { "Value": 0, "Unit": "0" } } ] }, "Status": "OK", "Status code": 0 }`

I have also reinstalled the integration but doesn't help at all. Unfortunately, I can't set up the second device, the wizard stops at this point.

dossidr commented 7 months ago

I have exactly the same problem. As soon as I try to connect the module to the CMI, nothing happens in the setup window. No instance is created but I get error messages in the HA log.

`Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.ta_cmi Source: custom_components/ta_cmi/config_flow.py:125 Integration: Technische Alternative C.M.I. (documentation, issues) First occurred: 17:16:35 (4 occurrences) Last logged: 17:22:51

Error while communicating with a device (2): Failure during the CAN-request/parameter not available for this device Error while communicating with a device (3): Failure during the CAN-request/parameter not available for this device Error while communicating with a device (13): Device not supported Error while communicating with a device (16): Device not supported`

When I call the URL I get the following values ​​{2;3;13;16;}.

If I retrieve them one after the other in the browser with the following URL: http://192.168.178.11/INCLUDE/api.cgi?jsonnode=2&jsonparam=I,O

http://192.168.178.11/INCLUDE/api.cgi?jsonnode=3&jsonparam=I,O

I get the values ​​from the system. Here too, only addresses 2 and 3 provide values. At 13 and 16 I get Device not supported.

What can I do to find out what the problem might be? I am only a user at the CMI, unfortunately not an editor.

best regards denny