Akuvox SmartPlus - View door camera feeds, open doors and manage temporary keys

more data from log file

2023-10-26 09:34:20.978 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/akuvox/api.py", line 545, in _api_wrapper
    response = await self.hass.async_add_executor_job(func, url, headers, data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/akuvox/api.py", line 543, in _api_wrapper
    async with async_timeout.timeout(10):
  File "/usr/local/lib/python3.11/site-packages/async_timeout/__init__.py", line 141, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.11/site-packages/async_timeout/__init__.py", line 228, in _do_exit
    raise asyncio.TimeoutError
TimeoutError

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

Traceback (most recent call last):
  File "/config/custom_components/akuvox/api.py", line 494, in async_retrieve_personal_door_log
    json_data = await self.async_get_personal_door_log()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/akuvox/api.py", line 521, in async_get_personal_door_log
    json_data = await self._api_wrapper(method="get", url=url, headers=headers, data=data)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/akuvox/api.py", line 549, in _api_wrapper
    raise AkuvoxApiClientCommunicationError(
custom_components.akuvox.api.AkuvoxApiClientCommunicationError: Timeout error fetching information

Thank you for the debug logs.

It looks like the API request for your list of activities gets timed out:

I used my own account to reverse engineer the integration, so I think the issue is likely caused by something different between our accounts. Itā€™s possible that there is a different API endpoint that your account uses.

If you are able to provide me with a copy of the request payload your SmartLife app sends to Akuvox, I should be able to identify the differences and add support for it in an update. You would need to connect your phone to a proxy running on your computer in order to see the request. I am happy to guide you through the process if you like.

followed the guide in the readme and connected my phone to the proxy. but after signing in with mobile im not getting the servers_list request. im getting other requests when changing stuff in the settings but no servers_list

worked with the iphone, DMing you the info

Hi @jmassih, I released a new beta version, v0.0.5-beta3, which hopefully fixes the issue of the missing door opening events.

Im not receiving sms for login. I donā€™t know if the sms verification sever is down or my number got blacklisted.
Will try tomorrow.

Still not receiving sms, is it working for you?

SMS verification is working for me. I was able to log in to the integration and to the SmartLife app using SMS verification.
I donā€™t know why itā€™s not working for you. I donā€™t think your account has been blacklisted as mine has not, but it does seem like an issue with your account. Perhaps get in touch with their technical support?

hello again, i was finally able too login. Tried the integration, still no event is showing :frowning:

Hi @jmassih, Iā€™m sorry to hear itā€™s still not working.
I have released a new beta version, v0.0.6-beta1, with some additional debug logging. When you can, can you please do the following?

  1. Upgrade to the new beta
  2. Restart Home Assistant
  3. Enable debug logging for the Akuvox integration
  4. Trigger the door relay
  5. Send me the debug logs

It might also be useful if you could please connect your phone to the proxy again and send me the request details for the activities list.

2023-10-30 11:31:00.700 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration akuvox which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2023-10-30 11:34:28.237 WARNING (MainThread) [custom_components.akuvox] Timeout occured for 'community' API get request: https://ecloud.akuvox.com/web-server/v3/app/community/log/getDoorLog?row=1 - Retry using 'single'...

File "/config/custom_components/akuvox/api.py", line 498, in async_retrieve_personal_door_log

File "/config/custom_components/akuvox/api.py", line 171, in parse_personal_door_log

2023-10-30 11:34:28.247 WARNING (MainThread) [py.warnings] /usr/src/homeassistant/homeassistant/core.py:699: RuntimeWarning: coroutine 'AkuvoxApiClient._api_wrapper' was never awaited

2023-10-30 13:13:18.386 DEBUG (SyncWorker_14) [custom_components.akuvox] šŸ“” Sending request to open door 'GATE, 0'...

2023-10-30 13:13:18.386 DEBUG (SyncWorker_14) [custom_components.akuvox] Request data = mac=0C11051C3663&relay=0

2023-10-30 13:13:18.820 DEBUG (SyncWorker_14) [custom_components.akuvox] āœ… Door open request sent successfully.

2023-10-30 13:13:26.697 DEBUG (SyncWorker_0) [custom_components.akuvox] šŸ“” Sending request to open door 'GATE, 0'...

2023-10-30 13:13:26.697 DEBUG (SyncWorker_0) [custom_components.akuvox] Request data = mac=0C11051C3663&relay=0

2023-10-30 13:13:27.132 DEBUG (SyncWorker_0) [custom_components.akuvox] āœ… Door open request sent successfully.

2023-10-30 13:13:32.622 DEBUG (SyncWorker_18) [custom_components.akuvox] šŸ“” Sending request to open door 'GATE, 0'...

2023-10-30 13:13:32.622 DEBUG (SyncWorker_18) [custom_components.akuvox] Request data = mac=0C11051C3663&relay=0

2023-10-30 13:13:33.033 DEBUG (SyncWorker_18) [custom_components.akuvox] āœ… Door open request sent successfully.

will try to connect my phone later when im back home and will send you the request details

@jmassih thank you for the logs, I believe I fixed the issue.
Please upgrade to the new beta, v0.0.6-beta2, and let me know if it works for you.

Sorry for the late reply, was extremally busy. i tested the latest beta, still no events.
Found these in Log

2023-11-01 17:18:16.213 WARNING (MainThread) [custom_components.akuvox] Timeout occured for 'app/community' API get request: https://ecloud.akuvox.com/web-server/v3/app/community/log/getDoorLog?row=1 - Retry using 'single'...
2023-11-01 17:20:49.073 ERROR (MainThread) [custom_components.akuvox] Timeout occured for 'app/single' API get request: https://ecloud.akuvox.com/web-server/v3/app/single/log/getDoorLog?row=1
File "/config/custom_components/akuvox/api.py", line 548, in _api_wrapper
File "/config/custom_components/akuvox/api.py", line 546, in _api_wrapper
File "/config/custom_components/akuvox/api.py", line 496, in async_retrieve_personal_door_log
File "/config/custom_components/akuvox/api.py", line 524, in async_get_personal_door_log
File "/config/custom_components/akuvox/api.py", line 563, in _api_wrapper
raise AkuvoxApiClientCommunicationError(
custom_components.akuvox.api.AkuvoxApiClientCommunicationError: Timeout error fetching information:

Let me know if u need anything else

Hi @jmassih, I sent you a DM regarding the missing event.

Blockquote

GA @Nimrod_Dolev - thank you for building this integration!
Iā€™m getting stuck at the SMS login.
I tried with area code first.
Tried with and without dashes.
(I also tried the token method however mitmproxy is not loading properly )

Blockquote

Hi @DangerDave2020, iā€™m sorry youā€™re having issues getting the integration up and running.

I suggest you confirm that the number youā€™re trying to sign in with is the same one registered to your SmartLife account:

  1. Open the Akuvox SmartLife app
  2. Press on the ā€œMeā€ button (on the right of the bottom bar)
  3. Press on your name in the top row.
  4. You should now see your mobile number.

If the number is correct, you should try to get mitmproxy working to get your tokens. If the SMS login fails when using the same phone number as the one registered to your SmartLife account, perhaps thereā€™s an issue with the Akuvox service? I really canā€™t say without more information.

It might be helpful to have debug log messages to better understand what the issue might be. To enable debug logging for the integration, please follow these steps:

  1. Turn on debug logging:

    service: logger.set_level
    data:
      custom_components.akuvox: debug
    
  2. Try to add the integration in via SMS

  3. Check your log messages in Home Assistant:

    https://{YOUR_HOME_ASSISTANT_ADDRESS}:8123/config/logs?filter=akuvox
    

    and then click the LOAD FULL LOGS button.

Hi - so I double checked - the phone number is correct.
Perhaps you can clarify the appropiate method of the 10 digit number input.

mitmproxy immediately crashes when i open itā€¦

2023-12-03 15:42:41.074 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration akuvox which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2023-12-03 16:48:26.711 WARNING (MainThread) [custom_components.akuvox] :face_with_raised_eyebrow: Response: {ā€˜resultā€™: -1, ā€˜messageā€™: ā€œMobile Number doesnā€™t existā€}

2023-12-03 16:58:44.802 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [15 digit number] Error handling message: Service service: logger.set_level data: custom_components.akuvox: debug does not match format . for dictionary value @ data[ā€˜sequenceā€™][0][ā€˜serviceā€™]. Got ā€˜service: logger.set_level data: custom_components.akuvox: debugā€™ (invalid_format) D**** from 192.168.0.**(Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.. Safari/537.36)

2023-12-03 17:11:11.622 DEBUG (MainThread) [custom_components.akuvox] :satellite: Fetching REST server dataā€¦

2023-12-03 17:11:12.526 DEBUG (MainThread) [custom_components.akuvox] :white_check_mark: REST server data received successfully

2023-12-03 17:11:12.526 DEBUG (MainThread) [custom_components.akuvox] :arrows_counterclockwise: Poll userā€™s personal door log every 2 secondsā€¦

2023-12-03 17:11:23.637 DEBUG (MainThread) [custom_components.akuvox] :satellite: Requesting SMS codeā€¦

2023-12-03 17:11:24.145 WARNING (MainThread) [custom_components.akuvox] :face_with_raised_eyebrow: Response: {ā€˜resultā€™: -1, ā€˜messageā€™: ā€œMobile Number doesnā€™t existā€}

2023-12-03 17:11:24.145 DEBUG (MainThread) [custom_components.akuvox] :x: SMS code request unsuccessful

2023-12-03 17:11:39.504 DEBUG (MainThread) [custom_components.akuvox] :satellite: Requesting SMS codeā€¦

2023-12-03 17:11:39.983 WARNING (MainThread) [custom_components.akuvox] :face_with_raised_eyebrow: Response: {ā€˜resultā€™: -1, ā€˜messageā€™: ā€œMobile Number doesnā€™t existā€}

2023-12-03 17:11:39.983 DEBUG (MainThread) [custom_components.akuvox] :x: SMS code request unsuccessful

Thank you for double checking the number and for supplying the debug log messages.

I donā€™t think there is any special phone number format you need to use. Are you sure you are entering your country code (not your area code) and phone number correctly to receive the SMS verification code? Which country are you from?

I donā€™t know what else could be the problem.

Regarding mitmproxy, I donā€™t know why it would crash when you launch it. Do you have access to a second computer?

United States
(+1)