GithubHelp home page GithubHelp logo

Comments (17)

PlusPlus-ua avatar PlusPlus-ua commented on August 28, 2024 1

I've changed and simplifying a way in which integration obtains device credentials from Tuya IOT cloud.

Please try new version.

from ha_tuya_ble.

PlusPlus-ua avatar PlusPlus-ua commented on August 28, 2024 1

My generic Bluetooth adapter (not Tuya gateway) is attached to my Home Assistant server which is in the other room.

BTW, Integration can work via "Bluetooth proxy", I've tested one of my devices with ESP32 based one - https://esphome.github.io/bluetooth-proxies/ However there are hard limitations.

from ha_tuya_ble.

ShayaN-1226 avatar ShayaN-1226 commented on August 28, 2024

Hi, I got the exact same issue, so far tried rebooting and reinstalling but it didn't help.

from ha_tuya_ble.

Cres09 avatar Cres09 commented on August 28, 2024

Hi! Same error here.
This project was exactly what I was looking for. Thank you very much for your effort.

from ha_tuya_ble.

daveyijzermans avatar daveyijzermans commented on August 28, 2024

I also have this problem. This log entry appears in tandem:

Logger: tuya_iot
Source: /usr/local/lib/python3.10/site-packages/tuya_iot/openmq.py:117
First occurred: 23:08:48 (3 occurrences) 
Last logged: 23:08:50

Unexpected disconnection.7

Mysteriously, I've been able to see the configuration wizard once. I tried to go through the steps, but I have Adaprox Fingerbots, so they wouldn't add. Tried to add the product ids following issue 1 but since then I couldn't get into the config flow any more. (I tried reinstalling the custom component undoing my changes as well)

from ha_tuya_ble.

PlusPlus-ua avatar PlusPlus-ua commented on August 28, 2024

Unfortunately, I can't reproduce the error.

During development, I've seen such error one time. I can't recall what was exactly the reason of the error, but it was something wrong in Tuya IOT credentials.

from ha_tuya_ble.

ShayaN-1226 avatar ShayaN-1226 commented on August 28, 2024

I tried updating to latest version today. I've got the same error message but different log.
Screenshot_20230427_001234_Home Assistant

Log:

This error originated from a custom integration.

Logger: aiohttp.server
Source: custom_components/tuya_ble/cloud.py:171
Integration: Tuya BLE
First occurred: 12:12:16 AM (3 occurrences)
Last logged: 12:12:45 AM

Error handling request
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 148, in post
    return await super().post(request)
  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 71, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 840, in async_init
    flow, result = await task
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 868, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data)
  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 242, in async_step_user
    await self._manager.build_cache()
  File "/config/custom_components/tuya_ble/cloud.py", line 215, in build_cache
    await self._fill_cache_item(item)
  File "/config/custom_components/tuya_ble/cloud.py", line 171, in _fill_cache_item
    await self._hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/tuya_iot/device.py", line 252, in update_device_list_in_smart_home
    self.update_device_function_cache()
  File "/usr/local/lib/python3.10/site-packages/tuya_iot/device.py", line 305, in update_device_function_cache
    for status in result["status"]:
KeyError: 'status'

from ha_tuya_ble.

jay-jay-s avatar jay-jay-s commented on August 28, 2024

I've changed and simplifying a way in which integration obtains device credentials from Tuya IOT cloud.

Please try new version.

Installed the new version. First try: "500 Internal Server Error Server got itself in trouble". Second try worked, but "No unconfigured devices found".

I have Fingerbot Plus, which doesn't work with the default integration.

Edit: and now it suddenly just found the device. And it's working!

from ha_tuya_ble.

PlusPlus-ua avatar PlusPlus-ua commented on August 28, 2024

Second try worked, but "No unconfigured devices found".

I have Fingerbot Plus, which doesn't work with the default integration.

Does the device in range of your Bluetooth adapter? The error means that Bluetooth adapter see no advertisements from compatible devices. If the device is bound to your Tuya Bluetooth gateway, it's better to unbind it using a mobile app.

from ha_tuya_ble.

jay-jay-s avatar jay-jay-s commented on August 28, 2024

Second try worked, but "No unconfigured devices found".
I have Fingerbot Plus, which doesn't work with the default integration.

Does the device in range of your Bluetooth adapter? The error means that Bluetooth adapter see no advertisements from compatible devices. If the device is bound to your Tuya Bluetooth gateway, it's better to unbind it using a mobile app.

Yes, that was probably the issue. My generic Bluetooth adapter (not Tuya gateway) is attached to my Home Assistant server which is in the other room. The device is working now.

BTW, thanks for this integration, I got my Fingerbot Plus last week. Great timing.

from ha_tuya_ble.

Cres09 avatar Cres09 commented on August 28, 2024

Unfortunately, I can't reproduce the error.

During development, I've seen such error one time. I can't recall what was exactly the reason of the error, but it was something wrong in Tuya IOT credentials.

I can't set up the Tuya Credentials because I can't start the wizard.

from ha_tuya_ble.

PlusPlus-ua avatar PlusPlus-ua commented on August 28, 2024

I can't set up the Tuya Credentials because I can't start the wizard.

Have you updated the integration to last version and restarted HA? Are there any errors in the log?

from ha_tuya_ble.

daveyijzermans avatar daveyijzermans commented on August 28, 2024

Amazing, it works, via Bluetooth bridge! One more device type freed from cloud control!

Interestingly, in the wizard my API credentials were already filled in (I guess from the official Tuya or LocalTuya integration) Maybe that's what caused the bug in the first place?

from ha_tuya_ble.

PlusPlus-ua avatar PlusPlus-ua commented on August 28, 2024

Thank you!

Interestingly, in the wizard my API credentials were already filled in (I guess from the official Tuya or LocalTuya integration)

Yes, the integration tries to obtain credentials from the official Tuya.

from ha_tuya_ble.

damiano75 avatar damiano75 commented on August 28, 2024

Now the integration works, you can close the issue, unfortunately my cubetouch is not supported.

image

There aren't any switch or controls...

Do you think you should add it in the future?
It is a Cubetouch 1s

image

Anyway thank you for your work

from ha_tuya_ble.

PlusPlus-ua avatar PlusPlus-ua commented on August 28, 2024

I close this issue.

There aren't any switch or controls...

Do you think you should add it in the future? It is a Cubetouch 1s

Of course, it could be added. Could you please open a new issue?

from ha_tuya_ble.

damiano75 avatar damiano75 commented on August 28, 2024

I close this issue.

There aren't any switch or controls...
Do you think you should add it in the future? It is a Cubetouch 1s

Of course, it could be added. Could you please open a new issue?

Ok

from ha_tuya_ble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.