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

Hub does not work on the newest firmware and 5.4.8 #455

Closed
Pippo1989 opened this issue Nov 13, 2023 · 33 comments
Closed

Hub does not work on the newest firmware and 5.4.8 #455

Pippo1989 opened this issue Nov 13, 2023 · 33 comments
Labels
Help wanted Extra attention is needed

Comments

@Pippo1989
Copy link

Description

Out of the blue, the setup of my four C420 cameras and their hub fails, so all devices and their entities are constantly unavailable.

I have not changed the configuration data and the hub IP address is correct.

Reconfiguring the integration does not change things.

The TAPO app works correctly and both the cameras and the hub have installed the latest firmware update available.

Reproduction Steps

\

Expected behavior

\

If applicable, add error logs.

2023-11-13 16:41:30.443 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:41:31.557 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:41:32.255 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:41:32.262 DEBUG (MainThread) [custom_components.tapo_control] async_get_media_source
2023-11-13 16:41:39.876 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:41:41.764 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:41:45.684 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:41:55.956 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:41:57.013 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:41:57.721 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:42:17.945 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:42:19.019 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:42:19.712 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:43:00.056 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:43:01.104 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:43:01.853 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:44:22.054 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:44:23.113 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:44:23.828 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:45:44.090 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:45:45.142 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:45:45.863 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:47:06.264 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:47:07.320 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:47:08.052 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:48:28.527 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:48:29.583 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:48:30.280 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:49:50.605 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:49:51.657 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:49:52.360 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:51:12.657 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:51:13.709 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:51:14.407 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:52:34.619 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:52:35.676 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:52:36.389 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:53:56.865 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:53:57.904 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:53:58.604 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:55:19.059 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:55:20.114 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:55:20.808 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:56:40.949 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:56:41.984 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:56:42.682 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:58:03.145 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:58:04.214 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:58:04.923 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 16:59:25.169 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 16:59:26.206 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 16:59:26.914 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:00:47.071 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:00:48.127 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:00:48.829 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:02:09.050 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:02:10.122 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:02:10.819 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:03:31.240 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:03:32.303 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:03:33.004 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:04:53.152 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:04:54.222 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:04:54.931 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:06:15.263 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:06:16.321 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:06:17.051 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:07:37.411 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:07:41.076 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:07:41.785 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:09:01.856 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:09:02.938 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:09:03.646 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:10:24.010 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:10:25.073 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:10:25.769 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:11:46.154 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:11:47.227 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:11:47.963 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:13:08.371 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:13:09.421 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:13:10.113 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:14:30.426 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:14:31.475 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:14:32.163 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:15:52.472 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:15:53.532 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:15:54.222 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:17:14.720 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:17:15.772 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:17:16.465 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:18:36.775 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:18:37.858 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:18:38.562 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:19:58.722 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:19:59.832 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:20:00.960 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:21:21.101 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:21:22.144 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:21:22.836 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:22:42.993 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:22:44.024 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:22:44.719 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'
2023-11-13 17:24:05.116 DEBUG (MainThread) [custom_components.tapo_control] Detected base_url schema: http
2023-11-13 17:24:06.132 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-11-13 17:24:06.793 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'

Device Firmware

1.2.23 Build 20231012 rel.49638

Integration Version

5.4.4

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

HASSIO on Raspberry Pi 4

Search for similar issues

Yes

Additional information

No response

@JurajNyiri
Copy link
Owner

I will need a the hub with port 443 port forwarded along with all credentials so that I can debug this as I do not currently own camera with this firmware. Contact me via juraj.nyiri@gmail.com.

@JurajNyiri
Copy link
Owner

Could you try with older version? 5.3.9.

@JurajNyiri JurajNyiri added the Help wanted Extra attention is needed label Nov 15, 2023
@JurajNyiri
Copy link
Owner

Closing due to inactivity.

@Fruitsmart
Copy link

Hello, I have the same problem. With version 5.3.9 it does not accept the password.

@JurajNyiri JurajNyiri reopened this Nov 17, 2023
@JurajNyiri
Copy link
Owner

Please download and install https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/tree/pytapo_3.3.12 manually.

Add following to configuration.yaml:

logger:
  logs:
    custom_components.tapo_control: debug

Post full log in case of an error, now we will know what exactly happened during auth.

@Fruitsmart
Copy link

Sorry, it works with Tapo-Control-5.4.0.

@Exelord
Copy link

Exelord commented Nov 17, 2023

Hi,

I have exactly the same issue. After hub update the integration stopped working with the following error:

2023-11-17 11:35:00.508 ERROR (MainThread) [custom_components.tapo_control] [initOnvifEvents] Initiating onvif connection failed.
2023-11-17 11:35:00.508 ERROR (MainThread) [custom_components.tapo_control] Authority failure
2023-11-17 11:35:06.619 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: 'getPresetConfig'

I would be happy to help if you could guide me :)


Using pytapo directly to connect works:

tapo = Tapo(host, user, password)
print(tapo.getBasicInfo())

returning device info.

print(tapo.getMost())`
Traceback (most recent call last):
  File "/Users/maciej/Developer/tapo/start.py", line 10, in <module>
    print(tapo.getMost())
  File "/opt/homebrew/lib/python3.10/site-packages/pytapo/__init__.py", line 1638, in getMost
    if returnData["getPresetConfig"]:
KeyError: 'getPresetConfig'

@Exelord
Copy link

Exelord commented Nov 17, 2023

Here is a PR that fixes it: JurajNyiri/pytapo#83

@JurajNyiri
Copy link
Owner

JurajNyiri commented Nov 17, 2023

Screenshot 2023-11-17 at 17 26 57

The issue is this really unexpected and invalid response from camera which we will need to handle.

@JurajNyiri JurajNyiri added Fixed Bug has been fixed. and removed Help wanted Extra attention is needed labels Nov 17, 2023
@JurajNyiri
Copy link
Owner

@Pippo1989
Copy link
Author

Hi,

I'll post the logs, since the integration does not seem to work even after installing the 5.4.8 release:

home-assistant_tapo_control_2023-11-17T23-11-14.554Z.log

@JurajNyiri JurajNyiri reopened this Nov 17, 2023
@JurajNyiri
Copy link
Owner

JurajNyiri commented Nov 17, 2023

It's failing because of this line. Now, we need to find out why the hub responds in the way it responds now, and in order to do that I will need access to it or someone to debug it for me. We need it to respond as expected to the getCamData request, now its response format is corrupted.

@Pippo1989 It is very hard to debug this for me as the hub responds in very unexpected format as I described here: #455 (comment) . I will need the hub with port 443 port forwarded along with admin account password so that I can debug this as I do not own a hub. Contact me via juraj.nyiri@gmail.com.

Also, please let me know if it works on 5.3.9 as I requested before.

@JurajNyiri JurajNyiri added Help wanted Extra attention is needed and removed Fixed Bug has been fixed. labels Nov 17, 2023
@Exelord
Copy link

Exelord commented Nov 18, 2023

Ok, I think I found some traces. It looks like the issue is only happening when caling:

{
    "method": "getAudioConfig",
    "params": {
      "method": "get",
      "audio_config": {"name": ["speaker", "microphone"] }
    },
}

with other requests in pytapo.

If I remove this call, the response is much bigger and does contain getDeviceInfo which was prev missing (hance the error).

Now, it looks like it is not really an issue with the Hub but with performRequest processing it. When I call it explicitly I get:

print(tapo.performRequest({
    "method": "getAudioConfig",
    "params": {
      "method": "get",
      "audio_config": {"name": ["speaker", "microphone"] }
    },
}))

response:

  File "/opt/homebrew/lib/python3.10/site-packages/pytapo/__init__.py", line 575, in performRequest
    raise err
  File "/opt/homebrew/lib/python3.10/site-packages/pytapo/__init__.py", line 566, in performRequest
    responseJSON = json.loads(self.decryptResponse(encryptedResponse))
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/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 1 column 2 (char 1)

and when calling it on child device I get:

{'err_code': -10008, 'err_msg': 'Unsupported API call.'}

The decrypted message from self.decryptResponse(encryptedResponse) is invalid:

b'{{"result":{"method":"get","error_code":-40106,"method":"get","error_code":-40106},"method":"getAudioConfig","error_code":0}}'

They payload has incorrect structure. It is double wrapped with {}

while for a chile it looks like this:

b'{"result":{"responses":[{"method":"controlChild","result":{"response_data":{"err_code":-10008,"err_msg":"Unsupported API call."}},"error_code":0}]},"error_code":0}'

Seams like the decrypted responses need to be decoded with .decode('utf-8'). this helps but JSON is still incorrect cuz of double {{}}.


I made a fix, and now the requests works fine. However, the hub still response incorrectly when asked for getAudioConfig in the same request. I think they would need to handle the bug in software update. In the meantime we could do a second request for the audio which now works fine

@JurajNyiri
Copy link
Owner

Thank you @Exelord I will take a deeper look a bit later today.
Quick question now - what is the exact request and response when the hub responds with double {{ and }}?

@Exelord
Copy link

Exelord commented Nov 18, 2023

{'error_code': 0, 'seq': 990, 'result': {'response': 'I54pVbnyR1SXEDPlb3ni2s+Aak/VgKqDuIWRbe7itSFjXuYaJdeqXhZPjrgfrQWT9VdjFjQvmdjpJ5dmoLqDhlf/BhK3GHOQbmy06SKSbu8NAegRRP4X2tNq4nX7SrgMSiX6Wq2kfcTQHZY4DmFMTorz4EfoKJsi00Kn8cGQw6Y='}}

this is the encrypted version straight from the hub,

then decrypted:

b'{{"result":{"method":"get","error_code":-40106,"method":"get","error_code":-40106},"method":"getAudioConfig","error_code":0}}'

@JurajNyiri
Copy link
Owner

print(tapo.performRequest({
    "method": "getAudioConfig",
    "params": {
      "method": "get",
      "audio_config": {"name": ["speaker", "microphone"] }
    },
}))

Is this the request?

@Exelord
Copy link

Exelord commented Nov 18, 2023

Yes

@Exelord
Copy link

Exelord commented Nov 18, 2023

This is even weirder. So it looks like the hub responds with getDeviceInfo but then json parser removes that?

Decoded and decrypted:

{"result":{"responses":[{"result":{"method":"getDetectionConfig","error_code":-40106,"method":"getVehicleDetectionConfig","error_code":-40106,"method":"getPersonDetectionConfig","error_code":-40106,"method":"getBCDConfig","error_code":-40106,"method":"getPetDetectionConfig","error_code":-40106,"method":"getDeviceInfo","result":{"device_info":{"basic_info":{"device_type":"SMART.TAPOHUB","device_model":"H200","device_name":"H200 1.0","device_info":"H200 1.0","hw_version":"1.0","sw_version":"1.2.23 Build 20231012 rel.49638","device_alias":"Tapo_Hub_1220","mac":"9C-53-22-1F-12-20","dev_id":"802D281A666D037A534574ECD058892720D58D73","oem_id":"20BDFF5DD35D9F82C31FC30217AA348D","hw_id":"99A36151C79A3A5D72823C98BC0FDA5F","status":"configured","bind_status":true,"child_num":2,"avatar":"hub_h200","latitude":363445,"longitude":-52444,"has_set_location_info":1,"need_sync_sha1_password":0,"product_name":"Tapo Smart Hub","region":"EU"},"info":{"device_type":"SMART.TAPOHUB","device_model":"H200","device_name":"H200 1.0","device_info":"H200 1.0","hw_version":"1.0","sw_version":"1.2.23 Build 20231012 rel.49638","device_alias":"Tapo_Hub_1220","mac":"9C-53-22-1F-12-20","dev_id":"802D281A666D037A534574ECD058892720D58D73","oem_id":"20BDFF5DD35D9F82C31FC30217AA348D","hw_id":"99A36151C79A3A5D72823C98BC0FDA5F","status":"configured","bind_status":true,"child_num":2,"avatar":"hub_h200","latitude":363445,"longitude":-52444,"has_set_location_info":1,"need_sync_sha1_password":0,"product_name":"Tapo Smart Hub","region":"EU"}}},"error_code":0,"method":"getBarkDetectionConfig","error_code":-40106,"method":"getMeowDetectionConfig","error_code":-40106,"method":"getGlassDetectionConfig","error_code":-40106,"method":"getTamperDetectionConfig","error_code":-40106,"method":"getLensMaskConfig","error_code":-40106,"method":"getLdc","result":{},"error_code":60808,"method":"getLastAlarmInfo","error_code":-40106,"method":"getLedStatus","result":{"led":{"config":{".name":"config",".type":"led","enabled":"off"}}},"error_code":0,"method":"getTargetTrackConfig","error_code":-40106,"method":"getPresetConfig","error_code":-40106,"method":"getFirmwareUpdateStatus","result":{"cloud_config":{"upgrade_status":{"state":"normal","lastUpgradingSuccess":true}}},"error_code":0,"method":"getMediaEncrypt","result":{"cet":{"media_encrypt":{"enabled":"on"}}},"error_code":0,"method":"getConnectionType","result":{"link_type":"wifi","ssid":"Lemonday_2G","rssi":"4","rssiValue":-27},"error_code":0,"method":"getAlarmConfig","error_code":-40106,"method":"getAlarmPlan","error_code":-40106,"method":"getSirenTypeList","error_code":-40106,"method":"getLightTypeList","error_code":-40106,"method":"getSirenStatus","error_code":-40106,"method":"getLightFrequencyInfo","result":{},"error_code":60801,"method":"getLightFrequencyCapability","error_code":-40106,"method":"getRotationStatus","result":{},"error_code":60808,"method":"getNightVisionModeConfig","error_code":-40106,"method":"getWhitelampStatus","error_code":-40106,"method":"getWhitelampConfig","error_code":-40106,"method":"getMsgPushConfig","result":{},"error_code":-40209,"method":"getSdCardStatus","result":{"harddisk_manage":{"hd_info":[{"hd_info_1":{"disk_name":"1","loop_record_status":"1","rw_attr":"rw","total_space":"7.35 GB","write_protect":"0","type":"local","status":"normal","detect_status":"normal","percent":"100","free_space":"7.32 GB","video_total_space":"6.86 GB","video_free_space":"6.83 GB"}}]}},"error_code":0,"method":"getCircularRecordingConfig","result":{"harddisk_manage":{"harddisk":{"loop":"on"}}},"error_code":0,"method":"getRecordPlan","result":{},"error_code":-60305,"method":"get","error_code":-40106,"method":"get","error_code":-40106,"method":"getFirmwareAutoUpgradeConfig","result":{"auto_upgrade":{"common":{"enabled":"on","time":"03:00","random_range":120}}},"error_code":0,"method":"getChildDeviceList","result":{"start_index":0,"child_device_list":[{"device_id":"802181B40592B8CEB22F73D5C69398AC21015636","parent_device_id":"802D281A666D037A534574ECD058892720D58D73","device_model":"C420","device_name":"C420 1.0","alias":"Camera 1","avatar":"camera c420","sw_ver":"1.2.14 Build 20230829 rel.65193","hw_ver":"1.0","mac":"48:22:54:85:78:F7","device_type":"SMART.IPCAMERA","category":"camera","hw_id":"C5B155806880C301179651EA0F9ECF88","oem_id":"FC5FF5303F725AF5CDE2115728A0AA86","system_time":1700302512,"led_status":"off","updating":false,"online":true,"firmware_status":"OK","power":"BATTERY","battery_percent":75,"battery_charging":"NO","rssi":-35,"dev_name":"Tapo Smart Camera","ipaddr":"172.23.30.2","short_addr":0,"ext_addr":"4822548578F70000","status":"configured","onboarding_timestamp":1693486347,"battery_voltage":3875,"battery_temperature":20,"battery_installed":1,"low_battery":false,"power_save_mode":"off","power_save_status":"off","uptime":384747,"cam_uptime":5396,"subg_cam_rssi":0,"subg_hub_rssi":0,"region":"EU"},{"device_id":"802178803F123F39888FEB44EA0B4CA02101DA65","parent_device_id":"802D281A666D037A534574ECD058892720D58D73","device_model":"C420","device_name":"C420 1.0","alias":"Camera 2","avatar":"camera c420","sw_ver":"1.2.14 Build 20230829 rel.65193","hw_ver":"1.0","mac":"48:22:54:85:87:86","device_type":"SMART.IPCAMERA","category":"camera","hw_id":"C5B155806880C301179651EA0F9ECF88","oem_id":"FC5FF5303F725AF5CDE2115728A0AA86","system_time":1700302512,"led_status":"off","updating":false,"online":true,"firmware_status":"OK","power":"BATTERY","battery_percent":75,"battery_charging":"NO","rssi":-56,"dev_name":"Tapo Smart Camera","ipaddr":"172.23.30.3","short_addr":0,"ext_addr":"4822548587860000","status":"configured","onboarding_timestamp":1693556741,"battery_voltage":3870,"battery_temperature":19,"battery_installed":1,"low_battery":false,"power_save_mode":"off","power_save_status":"off","uptime":649556,"cam_uptime":8907,"subg_cam_rssi":0,"subg_hub_rssi":0,"region":"EU"}],"sum":2},"error_code":0},"method":"getAudioConfig","error_code":0}]},"error_code":0}

Parsed my JSON:


{'result': {'responses': [{'result': {'method': 'getChildDeviceList', 'error_code': 0, 'result': {'start_index': 0, 'child_device_list': [{'device_id': '802181B40592B8CEB22F73D5C69398AC21015636', 'parent_device_id': '802D281A666D037A534574ECD058892720D58D73', 'device_model': 'C420', 'device_name': 'C420 1.0', 'alias': 'Camera 1', 'avatar': 'camera c420', 'sw_ver': '1.2.14 Build 20230829 rel.65193', 'hw_ver': '1.0', 'mac': '48:22:54:85:78:F7', 'device_type': 'SMART.IPCAMERA', 'category': 'camera', 'hw_id': 'C5B155806880C301179651EA0F9ECF88', 'oem_id': 'FC5FF5303F725AF5CDE2115728A0AA86', 'system_time': 1700302512, 'led_status': 'off', 'updating': False, 'online': True, 'firmware_status': 'OK', 'power': 'BATTERY', 'battery_percent': 75, 'battery_charging': 'NO', 'rssi': -35, 'dev_name': 'Tapo Smart Camera', 'ipaddr': '172.23.30.2', 'short_addr': 0, 'ext_addr': '4822548578F70000', 'status': 'configured', 'onboarding_timestamp': 1693486347, 'battery_voltage': 3875, 'battery_temperature': 20, 'battery_installed': 1, 'low_battery': False, 'power_save_mode': 'off', 'power_save_status': 'off', 'uptime': 384747, 'cam_uptime': 5396, 'subg_cam_rssi': 0, 'subg_hub_rssi': 0, 'region': 'EU'}, {'device_id': '802178803F123F39888FEB44EA0B4CA02101DA65', 'parent_device_id': '802D281A666D037A534574ECD058892720D58D73', 'device_model': 'C420', 'device_name': 'C420 1.0', 'alias': 'Camera 2', 'avatar': 'camera c420', 'sw_ver': '1.2.14 Build 20230829 rel.65193', 'hw_ver': '1.0', 'mac': '48:22:54:85:87:86', 'device_type': 'SMART.IPCAMERA', 'category': 'camera', 'hw_id': 'C5B155806880C301179651EA0F9ECF88', 'oem_id': 'FC5FF5303F725AF5CDE2115728A0AA86', 'system_time': 1700302512, 'led_status': 'off', 'updating': False, 'online': True, 'firmware_status': 'OK', 'power': 'BATTERY', 'battery_percent': 75, 'battery_charging': 'NO', 'rssi': -56, 'dev_name': 'Tapo Smart Camera', 'ipaddr': '172.23.30.3', 'short_addr': 0, 'ext_addr': '4822548587860000', 'status': 'configured', 'onboarding_timestamp': 1693556741, 'battery_voltage': 3870, 'battery_temperature': 19, 'battery_installed': 1, 'low_battery': False, 'power_save_mode': 'off', 'power_save_status': 'off', 'uptime': 649556, 'cam_uptime': 8907, 'subg_cam_rssi': 0, 'subg_hub_rssi': 0, 'region': 'EU'}], 'sum': 2}}, 'method': 'getAudioConfig', 'error_code': 0}]}, 'error_code': 0}

@JurajNyiri
Copy link
Owner

JurajNyiri commented Nov 18, 2023

Screenshot 2023-11-18 at 12 31 54

It's not a valid response.

You can use https://jsonformatter.curiousconcept.com/# to validate json.

@JurajNyiri
Copy link
Owner

JurajNyiri commented Nov 18, 2023

Something is really broken with the last firmware update on this hub...

What is the decoded & decrypted response if you remove getAudioConfig from the request? That is the outlayer in the response again.
Please post both request and decoded/decrypted response.

Request should look like this with it removed:

        requestData = {
            "method": "multipleRequest",
            "params": {
                "requests": [
                    {
                        "method": "getDeviceInfo",
                        "params": {"device_info": {"name": ["basic_info"]}},
                    },
                    {
                        "method": "getDetectionConfig",
                        "params": {"motion_detection": {"name": ["motion_det"]}},
                    },
                    {
                        "method": "getPersonDetectionConfig",
                        "params": {"people_detection": {"name": ["detection"]}},
                    },
                    {
                        "method": "getVehicleDetectionConfig",
                        "params": {"vehicle_detection": {"name": ["detection"]}},
                    },
                    {
                        "method": "getBCDConfig",
                        "params": {"sound_detection": {"name": ["bcd"]}},
                    },
                    {
                        "method": "getPetDetectionConfig",
                        "params": {"pet_detection": {"name": ["detection"]}},
                    },
                    {
                        "method": "getBarkDetectionConfig",
                        "params": {"bark_detection": {"name": ["detection"]}},
                    },
                    {
                        "method": "getMeowDetectionConfig",
                        "params": {"meow_detection": {"name": ["detection"]}},
                    },
                    {
                        "method": "getGlassDetectionConfig",
                        "params": {"glass_detection": {"name": ["detection"]}},
                    },
                    {
                        "method": "getTamperDetectionConfig",
                        "params": {"tamper_detection": {"name": "tamper_det"}},
                    },
                    {
                        "method": "getLensMaskConfig",
                        "params": {"lens_mask": {"name": ["lens_mask_info"]}},
                    },
                    {
                        "method": "getLdc",
                        "params": {"image": {"name": ["switch", "common"]}},
                    },
                    {
                        "method": "getLastAlarmInfo",
                        "params": {"msg_alarm": {"name": ["chn1_msg_alarm_info"]}},
                    },
                    {
                        "method": "getLedStatus",
                        "params": {"led": {"name": ["config"]}},
                    },
                    {
                        "method": "getTargetTrackConfig",
                        "params": {"target_track": {"name": ["target_track_info"]}},
                    },
                    {
                        "method": "getPresetConfig",
                        "params": {"preset": {"name": ["preset"]}},
                    },
                    {
                        "method": "getFirmwareUpdateStatus",
                        "params": {"cloud_config": {"name": "upgrade_status"}},
                    },
                    {
                        "method": "getMediaEncrypt",
                        "params": {"cet": {"name": ["media_encrypt"]}},
                    },
                    {
                        "method": "getConnectionType",
                        "params": {"network": {"get_connection_type": []}},
                    },
                    {"method": "getAlarmConfig", "params": {"msg_alarm": {}}},
                    {"method": "getAlarmPlan", "params": {"msg_alarm_plan": {}}},
                    {"method": "getSirenTypeList", "params": {"msg_alarm": {}}},
                    {"method": "getLightTypeList", "params": {"msg_alarm": {}}},
                    {"method": "getSirenStatus", "params": {"msg_alarm": {}}},
                    {
                        "method": "getLightFrequencyInfo",
                        "params": {"image": {"name": "common"}},
                    },
                    {
                        "method": "getLightFrequencyCapability",
                        "params": {"image": {"name": "common"}},
                    },
                    {
                        "method": "getChildDeviceList",
                        "params": {"childControl": {"start_index": 0}},
                    },
                    {
                        "method": "getRotationStatus",
                        "params": {"image": {"name": ["switch"]}},
                    },
                    {
                        "method": "getNightVisionModeConfig",
                        "params": {"image": {"name": "switch"}},
                    },
                    {
                        "method": "getWhitelampStatus",
                        "params": {"image": {"get_wtl_status": ["null"]}},
                    },
                    {
                        "method": "getWhitelampConfig",
                        "params": {"image": {"name": "switch"}},
                    },
                    {
                        "method": "getMsgPushConfig",
                        "params": {"msg_push": {"name": ["chn1_msg_push_info"]}},
                    },
                    {
                        "method": "getSdCardStatus",
                        "params": {"harddisk_manage": {"table": ["hd_info"]}},
                    },
                    {
                        "method": "getCircularRecordingConfig",
                        "params": {"harddisk_manage": {"name": "harddisk"}},
                    },
                    {
                        "method": "getRecordPlan",
                        "params": {"record_plan": {"name": ["chn1_channel"]}},
                    },
                    {
                        "method": "getFirmwareAutoUpgradeConfig",
                        "params": {
                            "auto_upgrade": {"name": ["common"]},
                        },
                    },
                ]
            },
        }

@Exelord
Copy link

Exelord commented Nov 18, 2023

it is like this when the audio request is removed

{
  result: {
    responses: [
      { method: "getPersonDetectionConfig", error_code: -40106 },
      { method: "getDetectionConfig", error_code: -40106 },
      { method: "getVehicleDetectionConfig", error_code: -40106 },
      { method: "getBCDConfig", error_code: -40106 },
      { method: "getBarkDetectionConfig", error_code: -40106 },
      { method: "getMeowDetectionConfig", error_code: -40106 },
      { method: "getPetDetectionConfig", error_code: -40106 },
      {
        method: "getDeviceInfo",
        result: {
          device_info: {
            basic_info: {
              device_type: "SMART.TAPOHUB",
              device_model: "H200",
              device_name: "H200 1.0",
              device_info: "H200 1.0",
              hw_version: "1.0",
              sw_version: "1.2.23 Build 20231012 rel.49638",
              device_alias: "Tapo_Hub_1220",
              mac: "9C-53-22-1F-12-20",
              dev_id: "802D281A666D037A534574ECD058892720D58D73",
              oem_id: "20BDFF5DD35D9F82C31FC30217AA348D",
              hw_id: "99A36151C79A3A5D72823C98BC0FDA5F",
              status: "configured",
              bind_status: True,
              child_num: 2,
              avatar: "hub_h200",
              latitude: 363445,
              longitude: -52444,
              has_set_location_info: 1,
              need_sync_sha1_password: 0,
              product_name: "Tapo Smart Hub",
              region: "EU",
            },
            info: {
              device_type: "SMART.TAPOHUB",
              device_model: "H200",
              device_name: "H200 1.0",
              device_info: "H200 1.0",
              hw_version: "1.0",
              sw_version: "1.2.23 Build 20231012 rel.49638",
              device_alias: "Tapo_Hub_1220",
              mac: "9C-53-22-1F-12-20",
              dev_id: "802D281A666D037A534574ECD058892720D58D73",
              oem_id: "20BDFF5DD35D9F82C31FC30217AA348D",
              hw_id: "99A36151C79A3A5D72823C98BC0FDA5F",
              status: "configured",
              bind_status: True,
              child_num: 2,
              avatar: "hub_h200",
              latitude: 363445,
              longitude: -52444,
              has_set_location_info: 1,
              need_sync_sha1_password: 0,
              product_name: "Tapo Smart Hub",
              region: "EU",
            },
          },
        },
        error_code: 0,
      },
      { method: "getGlassDetectionConfig", error_code: -40106 },
      { method: "getTamperDetectionConfig", error_code: -40106 },
      { method: "getLensMaskConfig", error_code: -40106 },
      { method: "getLdc", result: {}, error_code: 60808 },
      { method: "getLastAlarmInfo", error_code: -40106 },
      {
        method: "getLedStatus",
        result: {
          led: {
            config: { ".name": "config", ".type": "led", enabled: "off" },
          },
        },
        error_code: 0,
      },
      { method: "getTargetTrackConfig", error_code: -40106 },
      { method: "getPresetConfig", error_code: -40106 },
      {
        method: "getFirmwareUpdateStatus",
        result: {
          cloud_config: {
            upgrade_status: { state: "normal", lastUpgradingSuccess: True },
          },
        },
        error_code: 0,
      },
      {
        method: "getMediaEncrypt",
        result: { cet: { media_encrypt: { enabled: "on" } } },
        error_code: 0,
      },
      {
        method: "getConnectionType",
        result: {
          link_type: "wifi",
          ssid: "Lemonday_2G",
          rssi: "4",
          rssiValue: -27,
        },
        error_code: 0,
      },
      { method: "getAlarmConfig", error_code: -40106 },
      { method: "getAlarmPlan", error_code: -40106 },
      { method: "getSirenTypeList", error_code: -40106 },
      { method: "getLightTypeList", error_code: -40106 },
      { method: "getSirenStatus", error_code: -40106 },
      { method: "getLightFrequencyInfo", result: {}, error_code: 60801 },
      { method: "getLightFrequencyCapability", error_code: -40106 },
      { method: "getRotationStatus", result: {}, error_code: 60808 },
      { method: "getNightVisionModeConfig", error_code: -40106 },
      { method: "getWhitelampStatus", error_code: -40106 },
      { method: "getWhitelampConfig", error_code: -40106 },
      { method: "getMsgPushConfig", result: {}, error_code: -40209 },
      {
        method: "getSdCardStatus",
        result: {
          harddisk_manage: {
            hd_info: [
              {
                hd_info_1: {
                  disk_name: "1",
                  loop_record_status: "1",
                  rw_attr: "rw",
                  total_space: "7.35 GB",
                  write_protect: "0",
                  type: "local",
                  status: "normal",
                  detect_status: "normal",
                  percent: "100",
                  free_space: "7.31 GB",
                  video_total_space: "6.86 GB",
                  video_free_space: "6.83 GB",
                },
              },
            ],
          },
        },
        error_code: 0,
      },
      {
        method: "getCircularRecordingConfig",
        result: { harddisk_manage: { harddisk: { loop: "on" } } },
        error_code: 0,
      },
      { method: "getRecordPlan", result: {}, error_code: -60305 },
      {
        method: "getFirmwareAutoUpgradeConfig",
        result: {
          auto_upgrade: {
            common: { enabled: "on", time: "03:00", random_range: 120 },
          },
        },
        error_code: 0,
      },
      {
        method: "getChildDeviceList",
        result: {
          start_index: 0,
          child_device_list: [
            {
              device_id: "802181B40592B8CEB22F73D5C69398AC21015636",
              parent_device_id: "802D281A666D037A534574ECD058892720D58D73",
              device_model: "C420",
              device_name: "C420 1.0",
              alias: "Camera 1",
              avatar: "camera c420",
              sw_ver: "1.2.14 Build 20230829 rel.65193",
              hw_ver: "1.0",
              mac: "48:22:54:85:78:F7",
              device_type: "SMART.IPCAMERA",
              category: "camera",
              hw_id: "C5B155806880C301179651EA0F9ECF88",
              oem_id: "FC5FF5303F725AF5CDE2115728A0AA86",
              system_time: 1700327610,
              led_status: "off",
              updating: False,
              online: True,
              firmware_status: "OK",
              power: "BATTERY",
              battery_percent: 75,
              battery_charging: "NO",
              rssi: -37,
              dev_name: "Tapo Smart Camera",
              ipaddr: "172.23.30.2",
              short_addr: 0,
              ext_addr: "4822548578F70000",
              status: "configured",
              onboarding_timestamp: 1693486347,
              battery_voltage: 3858,
              battery_temperature: 17,
              battery_installed: 1,
              low_battery: False,
              power_save_mode: "off",
              power_save_status: "off",
              uptime: 409771,
              cam_uptime: 5438,
              subg_cam_rssi: 0,
              subg_hub_rssi: 0,
              region: "EU",
            },
            {
              device_id: "802178803F123F39888FEB44EA0B4CA02101DA65",
              parent_device_id: "802D281A666D037A534574ECD058892720D58D73",
              device_model: "C420",
              device_name: "C420 1.0",
              alias: "Camera 2",
              avatar: "camera c420",
              sw_ver: "1.2.14 Build 20230829 rel.65193",
              hw_ver: "1.0",
              mac: "48:22:54:85:87:86",
              device_type: "SMART.IPCAMERA",
              category: "camera",
              hw_id: "C5B155806880C301179651EA0F9ECF88",
              oem_id: "FC5FF5303F725AF5CDE2115728A0AA86",
              system_time: 1700327610,
              led_status: "off",
              updating: False,
              online: True,
              firmware_status: "OK",
              power: "BATTERY",
              battery_percent: 75,
              battery_charging: "NO",
              rssi: -56,
              dev_name: "Tapo Smart Camera",
              ipaddr: "172.23.30.3",
              short_addr: 0,
              ext_addr: "4822548587860000",
              status: "configured",
              onboarding_timestamp: 1693556741,
              battery_voltage: 3870,
              battery_temperature: 18,
              battery_installed: 1,
              low_battery: False,
              power_save_mode: "off",
              power_save_status: "off",
              uptime: 674653,
              cam_uptime: 8907,
              subg_cam_rssi: 0,
              subg_hub_rssi: 0,
              region: "EU",
            },
          ],
          sum: 2,
        },
        error_code: 0,
      },
    ],
  },
  error_code: 0,
};

@JurajNyiri
Copy link
Owner

That is a valid json, so we will need to remove the call or implement some special workaround. I will try to find some time later today or tomorrow.

@JurajNyiri JurajNyiri changed the title Configuration failed (TAPO C420). Hub does not work on the newest firmware and 5.4.8 Nov 18, 2023
@JurajNyiri
Copy link
Owner

JurajNyiri commented Nov 18, 2023

@Exelord please download latest https://github.com/JurajNyiri/pytapo manually, it should automatically detect wrong response and omit getAudioConfig from the request.

Run print(tapo.getMost()) and you should get a proper response now.

Please let me know the results and whether JurajNyiri/pytapo#84 is still required.

@JurajNyiri
Copy link
Owner

JurajNyiri commented Nov 19, 2023

Deployed above code in pytapo in https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/releases/tag/5.4.9 . Please test there.

Please let me know the results and whether JurajNyiri/pytapo#84 is still required.

@Exelord
Copy link

Exelord commented Nov 19, 2023

I think that works! The response contains device info now :)

print(tapo.getMost()) # ✅ works
print(tapo.getAudioConfig() # ✅ works

print(tapo.performRequest({
    "method": "getAudioConfig",
    "params": {
        "method": "get",
        "audio_config": {"name": ["speaker", "microphone"]},
    }
})) # 🚨 Does not work. Same issue with parsing

@JurajNyiri
Copy link
Owner

Thank you! I think they just messed up "getAudioConfig" call in that firmware, do other calls work as expected?

Let me know I have just released a new HA version, please check it there as well. In theory everything should work now unless something else is broken - (and maybe we need the decode for utf8?)

@Exelord
Copy link

Exelord commented Nov 19, 2023

Yes, when using json.loads in Python, it automatically decodes the JSON data using UTF-8 encoding by default. The json.loads function is part of the json module in Python, and it is used to deserialize a JSON-formatted string into a Python object.

So it is only needed if we decided to remove double {}

@Exelord
Copy link

Exelord commented Nov 19, 2023

Nice! The controls work again! 🚀

There are still some issues with setting it up. Eventually it works but Im getting this error all the time:

2023-11-19 10:13:27.383 ERROR (MainThread) [custom_components.tapo_control] [initOnvifEvents] Initiating onvif connection failed.
2023-11-19 10:13:27.383 ERROR (MainThread) [custom_components.tapo_control] Authority failure


And a need to reconfigure but this hub has no Camera account.

Screenshot 2023-11-19 at 10 16 29

And there a re a lot of config errors but I guess this is exppected

2023-11-19 10:13:34.337 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 192.168.1.41 for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 130, in async_setup_entry
    return await component.async_setup_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 187, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!

And now I am getting this and integration displays as failed:

2023-11-19 10:19:22.469 WARNING (MainThread) [homeassistant.config_entries] Config entry '192.168.1.41' for tapo_control integration could not authenticate: Invalid authentication data

although it still works!

@JurajNyiri
Copy link
Owner

For

2023-11-19 10:13:27.383 ERROR (MainThread) [custom_components.tapo_control] [initOnvifEvents] Initiating onvif connection failed.
2023-11-19 10:13:27.383 ERROR (MainThread) [custom_components.tapo_control] Authority failure

Disable motion events, this error is expected and can be ignored, we could talk about hiding it or making it a warning etc but that is out of scope of this ticket for now. It has been there forever.

ValueError: Config entry has already been setup!

That is not really expected, when does that error happen?

And a need to reconfigure but this hub has no Camera account.

How does adding the camera flow look like?

@JurajNyiri
Copy link
Owner

@Exelord can you come to discord for faster communication?

@zee36

This comment was marked as off-topic.

@JurajNyiri
Copy link
Owner

Make sure ha can reach the hub. Marking as off topic since this issue is for something else.

@JurajNyiri
Copy link
Owner

If the issue persists please open new one, should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Extra attention is needed
Projects
None yet
5 participants