Open dxh000130 opened 10 months ago
Hi @dxh000130.
I have just released a new version, v0.1.1, which hopefully addresses your issue. Can you please upgrade to it and let me know if it now resolved?
Sorry, this issue is quite old however, I'm also getting the same issue @nimroddolev , when I enter my Australian phone number for SMS verification it says the "SMS code request failed. Check your phone number." The app token method displays a similar issue. Both the 0.1.1 and 0.20 beta produce the same issue.
Going back to 0.07 seems to continue to work.
Hi @SirNoble, i'm sorry you've been having issues.
It would be helpful to be able to review the debug log messages for the issue:
Turn on debug logging:
service: logger.set_level
data:
custom_components.akuvox: debug
Request a new sms verification code
Check your log messages in Home Assistant:
https://{YOUR_HOME_ASSISTANT_ADDRESS}:8123/config/logs?filter=akuvox
and click LOAD FULL LOGS
Post here your debug log messages
Thank you for looking into this! See below:
2024-03-18 22:28:53.429 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:28:57.784 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:02.079 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:06.330 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:10.664 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:14.262 DEBUG (MainThread) [custom_components.akuvox] 🌍 User will use the API from subdomain aucloud 2024-03-18 22:29:14.262 DEBUG (MainThread) [custom_components.akuvox] 📡 Fetching REST server data... 2024-03-18 22:29:14.267 WARNING (SyncWorker_9) [py.warnings] /usr/local/lib/python3.12/concurrent/futures/thread.py:94: RuntimeWarning: coroutine 'AkuvoxData.async_set_stored_data_for_key' was never awaited 2024-03-18 22:29:14.949 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:15.679 DEBUG (MainThread) [custom_components.akuvox] ✅ REST server data received successfully 2024-03-18 22:29:15.682 DEBUG (MainThread) [custom_components.akuvox] 📡 Requesting SMS code... 2024-03-18 22:29:16.867 WARNING (MainThread) [custom_components.akuvox] 🤨 Response: {'result': -1, 'message': "Mobile Number doesn't exist"} 2024-03-18 22:29:16.868 DEBUG (MainThread) [custom_components.akuvox] ❌ SMS code request unsuccessful 2024-03-18 22:29:19.336 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:23.644 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:28.058 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:32.401 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:36.715 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:41.029 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:45.582 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:50.041 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:54.335 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:29:58.599 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:30:02.862 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:30:07.142 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:30:11.538 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community"
Via the app token method: 2024-03-18 22:32:57.075 DEBUG (MainThread) [custom_components.akuvox] 📡 Fetching REST server data... 2024-03-18 22:32:57.076 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.12/asyncio/base_events.py:1989: RuntimeWarning: coroutine 'AkuvoxData.async_set_stored_data_for_key' was never awaited 2024-03-18 22:32:58.126 DEBUG (MainThread) [custom_components.akuvox] ✅ REST server data received successfully 2024-03-18 22:32:58.129 DEBUG (MainThread) [custom_components.akuvox] 📡 Requesting server list... 2024-03-18 22:32:58.808 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community" 2024-03-18 22:32:59.179 WARNING (MainThread) [custom_components.akuvox] 🤨 Response: {'message': 'request is invalid', 'result': -1} 2024-03-18 22:32:59.179 ERROR (MainThread) [custom_components.akuvox] ❌ Unable to retrieve server list. 2024-03-18 22:33:03.305 DEBUG (MainThread) [custom_components.akuvox] Changing app type "single" <--> "community"
No problem, I hope I can help. Which version of the integration are you running, and is this the entire log?
Thank you, yes is the entire log. Using V0.1.1
Thank you. Have you tried entering your mobile number both with & without the leading zero at the start? I.e: 0455555555 and 4555555555
I have, has the same issue both methods of signing in.
Very odd... I think perhaps the best way to understand the issue would be to use mitmproxy to get the actual API requests for:
Are you able to connect your phone via mitmproxy and send the request & response data for these 2 requests? I can guide you through the process.
EDIT: my guess is that there might be something specific to the Australian servers.
Sure, happy to provide these if you could please guide me through what you require.
Ok great, thank you.
send_mobile_checkcode
requestThank you See below:
Edit: Phone number is showing, just been removed for obvious reasons.
Thank you for the screenshot, unfortunately everything looks ok from what I can tell - beside the fact that it's not working for you 😀
Could you please confirm for me which was the most recent version that worked for you? I will review the changes since that version to hopefully pinpoint the issue.
The latest version that worked was 0.07. which is when you added support for Australia.
Tried versions v0.1.1, v0.1.0, V,2.0-Beta1 and all have the same issue.
Can also confirm Aussie mobile only works with 0.07 :)
Thanks for the great work @nimroddolev! Unfortunately I'm running into the same issue on US region - v0.0.7 is the last known version to work. Using later versions (commit 7c33d71
) fails at auth token based login (same tokens work on v0.0.7):
HA version - 2024.4.3
2024-04-25 23:39:24.074 WARNING (SyncWorker_2) [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
2024-04-25 23:39:24.075 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration hacs 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
2024-04-25 23:39:25.249 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/hacs/frontend.py, line 68: hass.components.frontend.async_register_built_in_panel(, please create a bug report at https://github.com/hacs/integration/issues
2024-04-25 23:39:50.882 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'akuvox' calls `async_run_job`, which is deprecated and will be removed in Home Assistant 2025.4; Please review https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job for replacement options at custom_components/akuvox/api.py, line 81: hass.async_run_job(self.async_set_stored_data_for_key, "wait_for_image_url", self.wait_for_image_url), please create a bug report at https://github.com/nimroddolev/akuvox/issues
2024-04-25 23:40:09.407 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.12/asyncio/base_events.py:1989: RuntimeWarning: coroutine 'AkuvoxData.async_set_stored_data_for_key' was never awaited
handle = None # Needed to break cycles when an exception occurs.
2024-04-25 23:40:10.972 WARNING (MainThread) [custom_components.akuvox] 🤨 Response: {'message': 'request is invalid', 'result': -1}
2024-04-25 23:40:10.972 ERROR (MainThread) [custom_components.akuvox] ❌ Unable to retrieve server list.
servers_list
callmitmproxy screenshots of servers_list
API call (anonymized):
Response:
{
"datas": {
"access_server": "54.241.249.251:8501",
"access_server_ipv6": "[2600:1f1c:19d:ef11:c9d9:6958:e854:3df6]:8501",
"pbx_server": "pbx1.ucloud.akuvox.com:5070",
"pbx_server_ipv6": "[2600:1f1c:19d:ef00:ad66:e397:7c8c:66ca]:5070",
"platform_ver": "6700",
"rest_server": "ucloud.akuvox.com:8080",
"rest_server_https": "ucloud.akuvox.com:8443",
"rest_server_https_ipv6": "[2600:1f1c:19d:ef00:55a2:5f88:f6ba:1e8]:8443",
"rest_server_ipv6": "[2600:1f1c:19d:ef00:55a2:5f88:f6ba:1e8]:8080",
"smarthome_site": "ucloud.akubela.com",
"vrtsp_server": "rtspsrv1.ucloud.akuvox.com:554",
"vrtsp_server_ipv6": "[2600:1f1c:19d:ef11:ad10:2b7b:8bc5:505b]:554",
"web_server": "ucloud.akuvox.com",
"web_server_ipv6": "[2600:1f1c:19d:ef00:55a2:5f88:f6ba:1e8]"
},
"message": "success",
"result": 0
}
Quick update - I noticed that the requests were being sent to https://gate.subdomain.akuvox.com:8600/servers_list
as defined in const.py:
https://github.com/nimroddolev/akuvox/blob/7c33d71fe86d89e8f60292e6540ed20c00c3799f/custom_components/akuvox/const.py#L20-L21
However, my mitmproxy intercepts showed the queries were being sent to https://gate.ucloud.akuvox.com:8600/servers_list
.
I changed REST_SERVER_ADDR = "gate.ucloud.akuvox.com"
in const.py and login seems to be working now. These URLs are region specific (?) and perhaps not being set correctly for US/AU regions?
Quick update - I noticed that the requests were being sent to
https://gate.subdomain.akuvox.com:8600/servers_list
as defined in const.py:However, my mitmproxy intercepts showed the queries were being sent to
https://gate.ucloud.akuvox.com:8600/servers_list
.I changed
REST_SERVER_ADDR = "gate.ucloud.akuvox.com"
in const.py and login seems to be working now. These URLs are region specific (?) and perhaps not being set correctly for US/AU regions?
Interesting, I'll give a try when I'm home.
EDIT: This worked for me too, so thank you!
I got it working as well by changing the URL. The problem I have now is that the live camera feed shows up on the web version of HA but when I try to livestream the camera from the iOS HA app, I get an error. Anyone else have the same problem? I attached a picture below of what happens on iOS when I try to play the livestream. I’d really appreciate any help on this, thanks!
Hi everyone. I just released a new beta, v0.2.0-beta2, which should address the issue of the missing SMS verification code when adding your SmartPlus account.
I'd like to ask you to please upgrade to the new version and let me know if you are now able to sign in via SMS verification.
To install the new beta version:
⋮
button in the top right↻ Redownload
optionShow beta versions
option (it may take a moment to update the list)v0.2.0-beta2
from the updated version drop-down listThe problem I have now is that the live camera feed shows up on the web version of HA but when I try to livestream the camera from the iOS HA app, I get an error.
Hi @namdgk. This issue is not related to the Akuvox SmartPlus integration but with the Home Assistant companion app for iOS.
There is another custom component, WebRTC Camera, which can fix this issue that you might want to check out.
Hi everyone. I just released a new beta, v0.2.0-beta2, which should address the issue of the missing SMS verification code when adding your SmartPlus account.
I'd like to ask you to please upgrade to the new version and let me know if you are now able to sign in via SMS verification.
To install the new beta version:
- Open the Akuvox SmartPlus repository in HACS
- Click on the
⋮
button in the top right- Select the
↻ Redownload
option- Enable the
Show beta versions
option (it may take a moment to update the list)- Select version
v0.2.0-beta2
from the updated version drop-down list- Restart Home Assistant
Just tried this and unfortunately still having the same issue with using it via the app token method, when entering the tokens and press okay it gives the error "sign in failed please check the values entered and try again". Tested via the SMS method and that seems to be work fine.
Removed the 0 in front of the number Tried a few times to log out and get different tokens, however same issue.
Could you please try deleting the integration and adding it again?
Could you please try deleting the integration and adding it again?
Sorry, same issue
Thanks for trying. I will take another look as to why it’s not working for you.
Just to confirm: you are sure your auth_token
and token
values are correct? They get reset each time you log in via SMS verification.
That's correct, there are new values each time.
The integration sets the regional subdomain used to communicate with Akuvox according to the list from this repo, so it's unclear to me why the SMS request fails.
I released a new beta, v0.2.0-beta3, which allows you to manually override the API regional subdomain used to communicate with Akuvox. You can try to use another subdomain/
hey - i am struggling to get seperate token and auth token using MITM Proxy.
I am unable to login with mobile number which is listed on smart plus account.
I am using MITM Proxy on an Ipad. I can see a token, but it is the same in all. but im not seeing the "token and auth-token" in the "https://gate.aucloud.akuvox.com:8600/servers_list"
I also try to login using SMS method and it says number doesnt exist
Located in Australia
using version Beta V2.03
Thanks for your help on this integration, I will support you if i can get some assistance
hey - i am struggling to get seperate token and auth token using MITM Proxy.
I am unable to login with mobile number which is listed on smart plus account.
I am using MITM Proxy on an Ipad. I can see a token, but it is the same in all. but im not seeing the "token and auth-token" in the "https://gate.aucloud.akuvox.com:8600/servers_list"
I also try to login using SMS method and it says number doesnt exist
Located in Australia
using version Beta V2.03
Thanks for your help on this integration, I will support you if i can get some assistance
I just downgraded to Beta 2.02 and then itallowed me to login via SMS. Just for reference. It also shows login token and auth tokens in the configuration, would I be able to logout and then use those tokens to log back in, or is the token value a one-off use
@robotsmarthomes have you ever figured out the token retrieval issue? I was trying to grab it from mitmproxy but there is no POST request (anymore?) for the /servers_list endpoint. I can only see a GET request with no body in the request:
I am stuck with getting the auth_token, I can just find the token value.
Thanks !
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4972 Installed Version | 1.33.0 Stage | running Available Repositories | 1451 Downloaded Repositories | 10 HACS Data | okHome Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 11.3 -- | -- update_channel | stable supervisor_version | supervisor-2023.12.0 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 115.2 GB disk_used | 8.3 GB healthy | true supported | true board | rpi5-64 supervisor_api | ok version_api | ok installed_addons | VLC (0.3.0), Advanced SSH & Web Terminal (17.0.2), File editor (5.7.0), Music Assistant BETA (2.0.0b82), go2rtc (1.8.5), Nginx Proxy Manager (1.0.1)Dashboards
dashboards | 2 -- | -- resources | 2 views | 6 mode | storageRecorder
oldest_recorder_run | 2024年1月8日 23:15 -- | -- current_recorder_run | 2024年1月16日 15:50 estimated_db_size | 1215.38 MiB database_engine | sqlite database_version | 3.41.2Spotify
api_endpoint_reachable | ok -- | --Checklist
Describe the issue
"stored_data" is none in line 545 at api.py
Reproduction steps
Debug logs
Diagnostics dump
No response