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

Device is not registered in Tuya cloud? #19

Closed
theskyisthelimit opened this issue May 21, 2023 · 32 comments
Closed

Device is not registered in Tuya cloud? #19

theskyisthelimit opened this issue May 21, 2023 · 32 comments

Comments

@theskyisthelimit
Copy link

that's very cool! This is exactly what I was looking for. I have an Adaprox fingerbot running with the code from redphx with python. it works flawlessly. unfortunately i am not able to get the hacs integration to work. what could be the problem?

Bildschirmfoto 2023-05-21 um 08 51 18

I can see the device in the Tuya Cloud. I've had to do this to get the python code running.

Bildschirmfoto 2023-05-21 um 08 52 03

@MrAlucardDante
Copy link

MrAlucardDante commented May 23, 2023

I am facing the same issue.
Device is in the app and on the Tuya Cloud, but I still get the same error message.

EDIT : I just added it again and it worked

@theskyisthelimit
Copy link
Author

@MrAlucardDante what did you add where?

@MrAlucardDante
Copy link

MrAlucardDante commented May 23, 2023

@MrAlucardDante what did you add where?

The Adaprox fingerbot plus. It appeared in home assistant, but when I tried to configure it, I got the same error message as you. I just click submit again and it worked

@PlusPlus-ua
Copy link
Owner

Hi, do you have some logs for your configuration attempt?

@theskyisthelimit
Copy link
Author

Hello, Unfortunately it's not logging anything. at least I cannot see anything in the home-assistant.log. Should it search somewhere else?

Bildschirmfoto 2023-05-26 um 17 00 42

@PlusPlus-ua
Copy link
Owner

Do you have only one project on Tuya IOT platform?

@theskyisthelimit
Copy link
Author

yes. Only the one in the first screenshot. sorry to ask, but is a connection to the tuya cloud necessary if I have already extracted the login data with the tool from redphx?

@PlusPlus-ua
Copy link
Owner

I've just decided that it's will be the simplest way for UX. Actually I've taken part of the code from extractor Python script which you have used. It's quite strange. May be Tuya IOT server was temporary down that time. Could you please retry.

@theskyisthelimit
Copy link
Author

Sure. it's still the same. I also tried and reinstalled the integration. is it possible to enable a log somehow?

@PlusPlus-ua
Copy link
Owner

Just add to your configuration.yaml next lines:

logger:
  default: info
  logs:
    custom_components.tuya_ble: debug

@theskyisthelimit
Copy link
Author

Well. The login seems to work:

2023-05-26 17:28:30.132 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Successful login for XXXX@gmail.com 2023-05-26 17:28:44.387 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Successful login for XXXX@gmail.com 2023-05-26 17:28:45.354 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Successful login for XXXX@gmail.com 2023-05-26 17:28:46.356 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Successful login for XXXX@gmail.com

@TonsiTT
Copy link

TonsiTT commented May 29, 2023

I'm facing the same issue. Although my device is a CubeTouch II

@TonsiTT
Copy link

TonsiTT commented May 29, 2023

the log
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/tuya_ble/config_flow.py", line 302, in async_step_device credentials = await self._manager.get_device_credentials( File "/config/custom_components/tuya_ble/cloud.py", line 263, in get_device_credentials await self._fill_cache_item(item) File "/config/custom_components/tuya_ble/cloud.py", line 182, in _fill_cache_item factory_info = fi_response[TUYA_RESPONSE_RESULT][0] IndexError: list index out of range

@PlusPlus-ua
Copy link
Owner

Try please new version, I've added some additional checks.

@theskyisthelimit
Copy link
Author

theskyisthelimit commented Jun 1, 2023

I updated and restarted HA. login still seem to work and the error also still is the same:

2023-06-01 08:15:17.222 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Successful login for XXX@gmail.com 2023-06-01 08:15:20.411 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Successful login for XXX@gmail.com 2023-06-01 08:15:21.420 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Successful login for XXX@gmail.com

@PlusPlus-ua
Copy link
Owner

Are there in log any ERROR lines related to custom_components.tuya_ble.cloud ?

@theskyisthelimit
Copy link
Author

unfortunately not. everytime i press the "send" button to add the device it writes the log that the login was successfull. nothing else.

@PlusPlus-ua
Copy link
Owner

And then shows in configuration form the error "Device is not registered in Tuya cloud", right?

@theskyisthelimit
Copy link
Author

exactly!

@PlusPlus-ua
Copy link
Owner

It must add to log line like this
2023-06-01 08:03:28.852 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Retrieved: uuid: xxxxxxxxxxxxxxxx, local_key: xxxxxxxxxxxxxxxx, device_id: xxxxxxxxxxxxxxxx, category: wsdcg, product_id: ojzlzzsw, device_name: TYOS温湿度传感器, product_model: , product_name: Temperature&humidity sensor
for registered devices.

Ensure please that your device present in your project on Tuya IOT site.

@TonsiTT
Copy link

TonsiTT commented Jun 1, 2023

So my issue got resolved like this.
Instead of going to the integration page and pressing 'Add Integration' and selecting Tuya BLE, I reinstalled the integration and let it stay as is without doing anything. After around 8-10 hours, the Tuya BLE integration found my CubeTouch itself. I then pressed configure on the newly discovered device, and it worked as usual with no error.
Before that, I would always get the "Device is not registered in Tuya cloud" error if I tried to configure manually by going to "Add Integration" and stuff

@PlusPlus-ua
Copy link
Owner

So my issue got resolved like this.

Is it with new or old version?

@TonsiTT
Copy link

TonsiTT commented Jun 1, 2023

So my issue got resolved like this.

Is it with new or old version?

The old version

@TonsiTT
Copy link

TonsiTT commented Jun 1, 2023

I think right now this error is due to the device being found on the cloud but the device not being in the list of devices discovered or connected to home-assistant via bluetooth

@theskyisthelimit
Copy link
Author

theskyisthelimit commented Jun 1, 2023

My device shows up automatically as well:

grafik

when I press "Absenden" then the configuration page for tuya login shows up.

grafik

@theskyisthelimit
Copy link
Author

Yes. Sorry, I uploaded the wrong screenshot. I updated it. When I press "configure" then I have to add all the informations.

@theskyisthelimit
Copy link
Author

Tonight, I will try and remove the fingerbot from the tuya cloud and re-add it. maybe it helps

@TonsiTT
Copy link

TonsiTT commented Jun 1, 2023

My device shows up automatically as well:
grafik

when I press "Absenden" then the configuration page for tuya login shows up.
grafik

The only difference in my case was I had the official Tuya integration installed as well with the credentials added.

An offshoot suggestion, but could you install that, configure it with the credentials, wait for few minutes for it to do its thing and then reboot home-assistant.
Once rebooted, wait for the device to show up again and configure it. It just might work for you
(p.s. I disabled the official integration after that and it kept working as normal. So you don't have to keep the official integration any more than needed)

@theskyisthelimit
Copy link
Author

good suggestion! I added the official tuya and put in all my login informations. after that, this "configuration" page for "Tuya BLE" was not showing up again. So I guess tuya ble takes the login informations from the official tuya intergration. good! But the error stays the same. I will try to re-add the project and device in the tuya cloud. wish me luck.

@Zylazy
Copy link

Zylazy commented Jun 6, 2023

I have the same issue. I am trying to add my temp&humidity sensor (Product Category: wsdcg), but I always get this error: "Device is not registered in Tuya cloud"
I have removed via my mobile app, and added again, but it did not help.

@PlusPlus-ua
Copy link
Owner

I have the same issue. I am trying to add my temp&humidity sensor (Product Category: wsdcg), but I always get this error: "Device is not registered in Tuya cloud" I have removed via my mobile app, and added again, but it did not help.

Do you have any logs?

@theskyisthelimit
Copy link
Author

Sorry for the long delay. I was away from home.
I actually just tried to add the device again and it worked somehow. I didn't change anything in the tuya cloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants