GithubHelp home page GithubHelp logo

ha_tuya_ble's People

Contributors

daveyijzermans avatar drewpo28 avatar forabi avatar plusplus-ua avatar sanmiggel avatar skrashevich avatar yokosa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ha_tuya_ble's Issues

Login error (2401): username or password wrong

Hi. I get the above error despite using my correct Tuya IOT username / password.

I already have all the required fingerbot info (UUID, local key, MAC address, etc).

Is it possible to enter this configuration information manually somewhere?

Thanks!
Andrew

Integration FUJIN Automatic Irrigation Bluetooth Water Timer FJKB005C-3

I have a FUJIN Automatic Irrigation Bluetooth Water Timer FJKB005C-3 (https://www.fujingarden.com/m/Product/plant_self_watering_automation_irrigation_water_timer.html) and it has been discovered by the integration. However, I've just got one (not working) signal strength entity on HA.

Anyone can help integrating this device?

    "category": "sfkzq",
    "product_id": "bh9xhshd",
    "product_name": "Bluetooth single channel controller ",

Datapoints on "Device Debugging" page of your "Tuya Cloud Project":

va_temperature | Integer | {   "unit": "℃",   "min": -200,   "max": 600,   "scale": 1,   "step": 1 }
va_humidity | Integer | {   "unit": "%",   "min": 0,   "max": 100,   "scale": 0,   "step": 1 }
battery_state | Enum | {   "range": [     "low",     "middle",     "high"   ] }
charge_state | Boolean | "{true,false}"
maxtemp_set | Integer | {   "unit": "℃",   "min": -200,   "max": 600,   "scale": 1,   "step": 1 }
minitemp_set | Integer | {   "unit": "℃",   "min": -200,   "max": 600,   "scale": 1,   "step": 1 }
maxhum_set | Integer | {   "unit": "%",   "min": 0,   "max": 100,   "scale": 0,   "step": 1 }
minihum_set | Integer | {   "unit": "%",   "min": 0,   "max": 100,   "scale": 0,   "step": 1 }
temp_alarm | Enum | {   "range": [     "loweralarm",     "upperalarm",     "cancel"   ] }
hum_alarm | Enum | {   "range": [     "loweralarm",     "upperalarm",     "cancel"   ] }
switch | Boolean | "{true,false}"

IDs of the datapoints:

{"1":"Current Temperature","2":"Current Humidity","3":"Battery level state","8":"Charging","10":"Set maxtemp","11":"Set minitemp","12":"Set maxhum","13":"Set minihum","14":"Temp alarm","15":"Hum alarm","101":"Switch","102":"Mode","103":"Fault Alarm","104":"Rain","105":"自动执行状态","106":"Countdown","107":"循环定时","108":"自动模式区分","109":"生效时间段","110":"型号","111":"记录型开关","112":"Irrigation timer"}

In the HA logs I just see:

Config entry 'DC-23-4F-53-63-F8 5363F8' for tuya_ble integration not ready yet: Could not find Tuya BLE device with address DC:23:4F:53:63:F8; Retrying in background

Request for Gimdow A1 Max smart lock

Hi! I want to start by thanking you for the amazing work. I was also born in Ukraine, so I personally feel the terror you're going through. I'm hoping you can help integrate the Gimdow A1 Max smart lock here. I love this lock, and it's my really my only option for my rental apartment because it goes right over the included door lock. Here's a link to the product page https://www.gimdow.com/GIMDOW-A1.html

Product: A1 PRO MAX
Device Information
Product Name
M515EGWT V2
Product Category
cl

Any help would be greatly appreciated!

Device is not registered in Tuya cloud

I get Device is not registered in Tuya cloud when trying to configure devices/integrations. I can see that they show as Tuya BLE. I also see that they show under Devices when I log into the Tuya IoT Platform Cloud.

Fingerbot (ltak7e1p) Not supported

Integration doesn't create any switch or controls for my Fingerbot (ltak7e1p), only the signal strength sensor
Captura

Data points:
Switch:"2"
kanjis I can't copy:"130"
Click:"101"
Mode:"8"
Down movement:"9"
Sustain time:"10"
Invert:"11"
Battery level:"12"
Up movement:"15"
自定时编程:"111"
自定周编程1:"112"
Tap enable:"17"
自定周编程2:"113"
自定周编程3:"114"
自定周编程4:"115"
运动统计:"150"

Is this the info you need?

Still having problems with "500 internal server error"

Thanks a lot for your contribution

Unfortunately I cannot add the integration (release 0.1.2), please have a look on the logs, any hint its welcome!

Logger: aiohttp.server
Source: custom_components/tuya_ble/config_flow.py:114
Integration: Tuya BLE
First occurred: 00:10:17 (5 occurrences)
Last logged: 14:27:19

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 67, 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 234, 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 831, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 859, 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 243, in async_step_user
return await self.async_step_login()
File "/config/custom_components/tuya_ble/config_flow.py", line 277, in async_step_login
return _show_login_form(self, user_input, errors, placeholders)
File "/config/custom_components/tuya_ble/config_flow.py", line 114, in _show_login_form
def_country = pycountry.countries.get(alpha_2=flow.hass.config.country)
File "/usr/local/lib/python3.10/site-packages/pycountry/db.py", line 39, in load_if_needed
return f(self, *args, **kw)
File "/usr/local/lib/python3.10/site-packages/pycountry/db.py", line 111, in get
raise LookupError()
LookupError

No configured devices found

Got this working on a test HA installation. Now moving to my main install....

Followed the same steps as previous, but now get this:

image

Is there something special to 'removed' a configured device from an old installation?

Any thoughts?

Request for BLE TRV support of a specific model

Hello! Great work!

I have a couple BLE TRVs that are not supported properly via the original cloud integration. I have requested support for them on the official HA repo months ago but the issue was closed as "won't fix". Here it is: home-assistant/core#81931

There you can find many details about the DPs and I can provide as much as I can if there's something that's still missing.

It'd be great to have those working properly and locally so I can do some useful automations and control them from one place and offline.

Loading forever CubeTouch II (product_id 'xhf790if')

Hello, first of all, thank you very much for your work.

I'm having a problem setting up my "CubeTouch II (product_id 'xhf790if')."
When I perform the initial configuration, it imports the data from my Smart Life (Tuya) account correctly, detects my "CubeTouch II" device, but when I click on configure, it stays on this screen forever without working.

image

The steps I follow are as follows:

  1. I configure the CubeTouch in the mobile application via Bluetooth, which works fine.
  2. I run the Tuya BLE configuration in my home assistant (ESPHome Bluetooth Proxy).It imports all the data from Tuya.
  3. It finds the CubeTouch, and I press accept. And it stays on the screen loading forever without working.

image

image

Thank you very much and best regards.

Request for another fingerbot model to be added

Looking through the closed issues, I've got the exact same fingerbot as posted in here: #9

It's connected, but is only showing signal sensor.

Model number is rvdceqjh

I'm also running version 0.1.4

Thanks!

Request to support another device: Smart Water Valve

Hello,
So, i have a couple of smart water valve (bluetooth), it has a simple switch so i am hoping that it would be an easy addition.

product category: sfkzq

Please let me know what you need or how i can help. I have access to "Device Debug" from Tuya IoT and can send switch on/off from there.

Currently, after installed the custom component, Tuya BLE detects it but throws this error:
home-assistant | 2023-05-09 19:34:51.035 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] xx:xx:xx:xx:xx:xx: timeout receiving response, RSSI: None
home-assistant | 2023-05-09 19:34:51.041 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] xx:xx:xx:xx:xx:xx: Sending device info request failed

Many thanks!

Fingerbot plus ndvkgsrm

Hi,
Any chance you can add ndvkgsrm?

Name is listed as BS-FB-V3 (ndvkgsrm).

Much love and thanks.

500 internal server error

Hi,
when I try to add the integration in HA I have this message
image

HA version 2023.4.6

In the logs:

Questo errore ha avuto origine da un'integrazione personalizzata.

Logger: aiohttp.server
Source: custom_components/tuya_ble/cloud.py:171
Integration: Tuya BLE
First occurred: 15:46:40 (3 occurrences)
Last logged: 16:30:16

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 237, 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 300, in update_device_function_cache
    for function in result["functions"]:
KeyError: 'functions'

Diivoo Smart Water Timer For Garden Hose

Hi! I recently purchased one of these. It would be great if you could integrate it.
I have checked, and the device is recognised by your integration:
image

You may need the following info:

    "name": "Valve Controller",
    "model": "WT-03W",
    "category": "sfkzq",
    "product_id": "1fcnd8xk",
    "product_name": "Valve Controller",

Standard Status Set on the "Device Debugging" page of my Tuya Cloud Project:

switch | Boolean | "{true,false}"
battery_percentage | Integer | {   "unit": "%",   "min": 0,   "max": 100,   "scale": 0,   "step": 1 }
time_use | Integer | {   "unit": "s",   "min": 0,   "max": 2592000,   "scale": 0,   "step": 1 }
weather_delay | Enum | {   "range": [     "cancel",     "24h",     "48h",     "72h"   ] }
countdown | Integer | {   "unit": "s",   "min": 0,   "max": 86400,   "scale": 0,   "step": 1 }
work_state | Enum | {   "range": [     "auto",     "manual",     "idle"   ] }
smart_weather | Enum | {   "range": [     "sunny",     "cloudy",     "rainy"   ] }
use_time_one | Integer | {   "unit": "s",   "min": 0,   "max": 86400,   "scale": 0,   "step": 1 }

Standard Instructions Set on the "Device Debugging" page of my Tuya Cloud Project:

switch | Boolean | "{true,false}"
time_use | Integer | {   "unit": "s",   "min": 0,   "max": 2592000,   "scale": 0,   "step": 1 }
weather_delay | Enum | {   "range": [     "cancel",     "24h",     "48h",     "72h"   ] }
countdown | Integer | {   "unit": "s",   "min": 0,   "max": 86400,   "scale": 0,   "step": 1 }
smart_weather | Enum | {   "range": [     "sunny",     "cloudy",     "rainy"   ] }

IDs of all Datapoints

{"1":"Switch","4":"Failure to report","7":"Battery","9":"Time Used","10":"Weather Delay","11":"Countdown","12":"work state","13":"Smart Weather","14":"switch of the weather","15":"Single use time","16":"cycle timing","17":"Timer"}

Please let me know if there's anything else you need.

Thank you very much!!! :-)

Communication Failed

I have a CUBETOUCH II integrated in HA perfectly. However its state is 'unavailable' and I cannot control it.

After enabling debug logging I could get this:

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py", line 373, in _async_get_best_available_backend_and_device
raise BleakError(
bleak.exc.BleakError: No backend with an available connection slot that can reach address XX:XX:XX:XX:XX:XX was found
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 574, in _ensure_connected
client = await establish_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/bleak_retry_connector/__init__.py", line 438, in establish_connection
_raise_if_needed(name, device.address, exc)
File "/usr/local/lib/python3.11/site-packages/bleak_retry_connector/__init__.py", line 319, in _raise_if_needed
raise BleakOutOfConnectionSlotsError(
bleak_retry_connector.BleakOutOfConnectionSlotsError: XX:XX:XX:XX:XX:XX - XX:XX:XX:XX:XX:XX: Failed to connect after 9 attempt(s): No backend with an available connection slot that can reach address XX:XX:XX:XX:XX:XX was found: The proxy/adapter is out of connection slots or the device is no longer reachable; Add additional proxies (https://esphome.github.io/bluetooth-proxies/) near this device
2023-08-05 23:26:01.089 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Connecting; RSSI: -74

Which..... makes sense? I mean it says that my Bluetooth USB dongle on my server cannot reach CUBETOUCH and that´s true because only my smartphone is paired with CUBETOUCH. What can I do now?

Can't detect cubetouch II

Hey
I'm afraid it's not the right place to ask but can't find a better one.
I'm trying to integrate the cubetouch II in homeassistant OS through the BT from my RPI 4.
Is it possible ?
it tells me : No unconfigured devices found.
The device is always offline on the IoT platform even though i'm using it on smartlife APP on my phone.
Thanks for your help !

Climate BLE not working ? + Possibility to integrate radiator thermostat with ID "081bzoun"

Hi,

I have set up the bluetooth proxi with a ESP32 and now i'm detecting with the TUYA BLE some radiator thermostat devices.
When i want to integrate them, i must fill in my credentials from tuya, but i can't see the indentities for it.
Is it possible that the climate is not working at this moment ?

Also, if a look int the code, my devices are not supported at this moment. They have a "product_id": "081bzoun".

From de tuya cloud i get this info:

Query Device Details Output
{
"result": {
"active_time": 1691526941,
"category": "wk",
"create_time": 1691004665,
"custom_name": "Radiator Chillruimte",
"icon": "smart/icon/ay1554288005676QBjh1/0a15ceb659facabcdea8b6fbcc4a78c7.png",
"id": "bfff21aac3ea498c7alkxj",
"ip": "",
"is_online": true,
"lat": "50.8522",
"local_key": "^?%'^f=dvMl%)N=`",
"lon": "2.8099",
"model": "HBRT-100",
"name": "Hombli Smart Radiator Thermostat 4",
"product_id": "081bzoun",
"product_name": "Hombli Smart Radiator Thermostat",
"sub": true,
"time_zone": "+02:00",
"update_time": 1691526968,
"uuid": "df77893be7074e3b"
},
"success": true,
"t": 1691566789519,
"tid": "eb7f66ea368711ee980f468506b8b79e"
}

Device Control > Query Properties
{
"result": {
"properties": [
{
"code": "window_check",
"custom_name": "",
"dp_id": 8,
"time": 1691526942812,
"value": true
},
{
"code": "frost",
"custom_name": "",
"dp_id": 10,
"time": 1691526942821,
"value": true
},
{
"code": "temp_unit_convert",
"custom_name": "",
"dp_id": 23,
"time": 1691526941148,
"value": "c"
},
{
"code": "temp_correction",
"custom_name": "",
"dp_id": 27,
"time": 1691526942898,
"value": 0
},
{
"code": "child_lock",
"custom_name": "",
"dp_id": 40,
"time": 1691526942808,
"value": true
},
{
"code": "switch",
"custom_name": "",
"dp_id": 101,
"time": 1691526976579,
"value": true
},
{
"code": "current_temp",
"custom_name": "",
"dp_id": 102,
"time": 1691540864103,
"value": 209
},
{
"code": "set_temp",
"custom_name": "",
"dp_id": 103,
"time": 1691526945178,
"value": 160
},
{
"code": "motor_opening",
"custom_name": "",
"dp_id": 104,
"time": 1691526941148,
"value": 0
},
{
"code": "battery_power",
"custom_name": "",
"dp_id": 105,
"time": 1691526942182,
"value": 0
},
{
"code": "a_key_home",
"custom_name": "",
"dp_id": 106,
"time": 1691526942187,
"value": false
},
{
"code": "prog_mode",
"custom_name": "",
"dp_id": 107,
"time": 1691526941148
},
{
"code": "prog_switch",
"custom_name": "",
"dp_id": 108,
"time": 1691526942189,
"value": true
},
{
"code": "prog_data",
"custom_name": "",
"dp_id": 109,
"time": 1691526941148
},
{
"code": "historical_day_set",
"custom_name": "",
"dp_id": 110,
"time": 1691541058230,
"value": "EBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
{
"code": "system_time",
"custom_name": "",
"dp_id": 111,
"time": 1691526941148
},
{
"code": "historical_week_set",
"custom_name": "",
"dp_id": 112,
"time": 1691541058635,
"value": "AAEAAAAAAA=="
},
{
"code": "historical_month_set",
"custom_name": "",
"dp_id": 113,
"time": 1691541059050,
"value": "AAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
},
{
"code": "historical_year_set",
"custom_name": "",
"dp_id": 114,
"time": 1691541059354,
"value": "AAAAAAAAAAAAAAAA"
},
{
"code": "historical_day_now",
"custom_name": "",
"dp_id": 115,
"time": 1691541058124,
"value": "FRQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
{
"code": "historical_week_now",
"custom_name": "",
"dp_id": 116,
"time": 1691541058446,
"value": "AAEAAAAAAA=="
},
{
"code": "historical_month_now",
"custom_name": "",
"dp_id": 117,
"time": 1691541058845,
"value": "AAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
},
{
"code": "historical_year_now",
"custom_name": "",
"dp_id": 118,
"time": 1691541059250,
"value": "AAAAAAAAAAAAAAAA"
},
{
"code": "historical_day_pow",
"custom_name": "",
"dp_id": 119,
"time": 1691541058355,
"value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
{
"code": "historical_week_pow",
"custom_name": "",
"dp_id": 120,
"time": 1691541058743,
"value": "AAAAAAAAAA=="
},
{
"code": "historical_month_pow",
"custom_name": "",
"dp_id": 121,
"time": 1691541059147,
"value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
},
{
"code": "historical_year_pow",
"custom_name": "",
"dp_id": 122,
"time": 1691541059454,
"value": "AAAAAAAAAAAAAAAA"
},
{
"code": "prog_data_1",
"custom_name": "",
"dp_id": 123,
"time": 1691541057210,
"value": "BAFoAMgB4ACgBDgAyAUoAKA="
},
{
"code": "prog_data_2",
"custom_name": "",
"dp_id": 124,
"time": 1691541057306,
"value": "BAFoAMgB4ACgBDgAyAUoAKA="
},
{
"code": "prog_data_3",
"custom_name": "",
"dp_id": 125,
"time": 1691541057417,
"value": "BAFoAMgB4ACgBDgAyAUoAKA="
},
{
"code": "prog_data_4",
"custom_name": "",
"dp_id": 126,
"time": 1691541057633,
"value": "BAFoAMgB4ACgBDgAyAUoAKA="
},
{
"code": "prog_data_5",
"custom_name": "",
"dp_id": 127,
"time": 1691541057742,
"value": "BAFoAMgB4ACgBDgAyAUoAKA="
},
{
"code": "prog_data_6",
"custom_name": "",
"dp_id": 128,
"time": 1691541057834,
"value": "BAFoAMgB4ACgBDgAyAUoAKA="
},
{
"code": "prog_data_7",
"custom_name": "",
"dp_id": 129,
"time": 1691541057953,
"value": "BAFoAMgB4ACgBDgAyAUoAKA="
},
{
"code": "water_sca",
"custom_name": "",
"dp_id": 130,
"time": 1691526942891,
"value": true
},
{
"code": "mode_1",
"custom_name": "",
"dp_id": 131,
"time": 1691526941148,
"value": "heat"
}
]
},
"success": true,
"t": 1691566921060,
"tid": "39e8b81e368811ee9a70760d0d3c40d3"
}

In home assistant i get this:
image

And signal strengt not available ?
image

What is wrong ?
How can i get it working please ?
Is this possible with the already addes "climats" or not ?

Kind regards !

How to integrate using ESPHome Bluetooth Proxy

Hi, is there any way how to integrate fingerbot using ESPHome Bluetooth Proxy? I successfully integrated esphome device to HA, installed Tuya BLE integration, but i am still getting error: Error Unable to load integration: Failed dependencies bluetooth_adapters. Thanks for any help.

Device is not registered in Tuya cloud?

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

yiihr7zh: No unconfigured devices found.

Hi.

I have a Fingerbot Plus (yiihr7zh) and it show in Tuya integration but offline.

When I setup Tuya BLE, show me "No unconfigured devices found. "

Do I need remove from Tuya integration before?
Will Tuya BLE create a new device or override Tuya device?

How can I add multiple devices with the same product id / category id?

Hi,

I added a product id of my own into devices.py and also switches.py and it works fine for one of the devices i have. the 2nd one, however, wont get detected. i even tried to remove it from smartlife and re-added, but it still wouldnt show up in Tuya BLE.

nothing in the logs in regard to this 2nd device either, unfortunately.

thanks!

N1 Smart Lock Support

Please add support for the following:
https://www.amazon.com/gp/product/B09ZTZJ571

N1 12BAE7
BS_OEL01 (boamwzo9)

64: Set T0 time of offline code
1: Add unlock method
33: Automatic lock switch
65: Clear one offline code
2: Delete unlock method
66: Clear all offline code
3: Modify unlock method
67: Offline code unlock
6: BLE unlock
8: Remaining battery
12: Fingerprint unlock
13: Password unlock
14: Dynamic unlock
19: BLE unlock record
51: Add temporary password
52: Delete temporary password
21: Lock alarm
53: Modify temporary password
54: Synchronized unlock method
55: Temporary password unlock
60: Set code-free remote unlock
61: Code-free remote unlock
62: Remote unlock

Login error (2401): username or password wrong

Hello,

I get the following error when configuring the application:
Login error (2401): username or password wrong

I am using the "Smart Life" credentials with the same country as the app.

I tried changing the password and it doesn't work either.

I have other tuya devices integrated from the official integration.

No Unconfigured devices found

Hi, I added the integration at first, worked first time, but the fingerbot showed offline.

Decided to remove the integration and reinstall. Now getting stuck with this error.

Device unexpectedly disconnected

Good afternoon. I am using the above integration. Overall, the Cubetouch works well. But constantly in the system log such errors fall out. And occasionally (already 2 times) the device itself was turned off and even rebooting the integration did not help (initialization error) and only restarting the system resumed work. Tell me what could be the problem.

Logger: custom_components.tuya_ble.tuya_ble.tuya_ble
Source: custom_components/tuya_ble/tuya_ble/tuya_ble.py:533
Integration: Tuya BLE
First occurred: 08:20:28 (490 occurrences)
Last logged: 14:25:47

  • DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
  • DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
  • DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -68

2023-06-13 08:18:33.515 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration ble_monitor 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-06-13 08:18:33.517 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration xiaomi_gateway3 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-06-13 08:18:33.519 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration yandex_weather 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-06-13 08:18:33.521 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration yandex_station 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-06-13 08:18:33.523 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration roborock 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-06-13 08:18:33.524 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration sonoff 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-06-13 08:18:33.526 WARNING (SyncWorker_0) [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
2023-06-13 08:18:33.526 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration xiaomi_cloud_map_extractor 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-06-13 08:18:33.529 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration tuya_ble 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-06-13 08:18:33.849 WARNING (MainThread) [homeassistant.components.lovelace] Lovelace is running in storage mode. Define resources via user interface
2023-06-13 08:20:28.222 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:21:13.942 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:22:01.713 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:22:48.509 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:22:53.209 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: communication failed
Traceback (most recent call last):
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 925, in _int_send_packet_while_connected
await self._send_packets_locked(packets)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 949, in _send_packets_locked
await self._int_send_packets_locked(packets)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 986, in _int_send_packets_locked
await self._client.write_gatt_char(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write_gatt_char'
2023-06-13 08:22:53.214 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 862, in _send_response
await self._send_packet_while_connected(code, data, response_to, False)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 898, in _send_packet_while_connected
await self._int_send_packet_while_connected(packets)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 925, in _int_send_packet_while_connected
await self._send_packets_locked(packets)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 949, in _send_packets_locked
await self._int_send_packets_locked(packets)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 986, in _int_send_packets_locked
await self._client.write_gatt_char(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write_gatt_char'
2023-06-13 08:24:22.465 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:25:07.942 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:25:52.222 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:26:37.834 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:26:42.588 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:27:25.823 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:28:12.504 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:28:19.285 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:29:06.623 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:29:53.184 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:30:39.743 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:31:25.464 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:32:08.984 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.plug_158d0003a519ce is taking over 10 seconds
2023-06-13 08:32:08.992 ERROR (SyncWorker_2) [xiaomi_gateway] Cannot connect to gateway 04cf8cb0b13c
2023-06-13 08:32:08.998 ERROR (SyncWorker_2) [xiaomi_gateway] No data in response from hub None
2023-06-13 08:32:10.152 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:32:56.544 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:33:42.265 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:34:28.105 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:35:15.866 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:36:12.634 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:36:59.186 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:37:45.027 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:38:29.686 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:39:15.147 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:40:04.946 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:40:50.427 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:41:35.907 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:42:21.508 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:43:06.640 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:43:55.349 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:44:41.429 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:45:27.392 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:46:14.189 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:46:29.039 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:47:13.228 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:47:59.201 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:48:49.109 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:49:35.070 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 08:50:43.110 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:51:31.230 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:52:19.950 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:53:05.791 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:53:50.433 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:54:36.151 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:55:21.152 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:56:05.911 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:56:54.392 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:57:40.472 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:58:26.192 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:59:12.153 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 08:59:58.113 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:00:47.194 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:01:33.532 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:02:18.995 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:03:04.968 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:03:55.474 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:04:41.435 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:05:28.115 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:06:12.755 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:06:58.475 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:07:43.235 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:08:30.052 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:09:19.597 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:10:05.077 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:10:50.677 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:11:36.277 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:12:21.876 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:13:07.597 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:13:10.104 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.konditsioner is taking over 10 seconds
2023-06-13 09:13:53.077 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:14:38.917 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:15:24.878 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:16:11.078 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:16:57.278 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:17:43.118 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:17:47.887 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 09:18:32.080 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:09:13.540 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:09:56.975 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:10:41.019 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:10:47.497 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:11:32.496 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:12:17.377 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:13:01.657 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:13:45.218 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:14:28.897 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:15:12.697 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:15:56.506 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:16:47.859 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:17:32.738 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:18:16.298 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:19:00.099 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:19:44.139 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:20:27.822 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:21:12.821 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:21:57.699 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:22:45.701 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:23:30.340 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:24:14.859 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:24:16.620 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:25:02.984 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:25:47.984 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:26:32.261 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:27:57.341 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:28:42.102 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:29:26.742 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:30:15.462 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:30:58.902 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:31:42.462 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:32:26.142 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:33:09.348 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.plug_158d00039bb6b3 is taking over 10 seconds
2023-06-13 10:33:09.361 ERROR (SyncWorker_3) [xiaomi_gateway] Cannot connect to gateway 04cf8cb0b13c
2023-06-13 10:33:09.362 ERROR (SyncWorker_3) [xiaomi_gateway] No data in response from hub None
2023-06-13 10:33:10.303 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:33:55.083 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:33:57.842 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:34:41.985 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:35:26.023 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:36:09.706 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:36:53.506 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:37:37.063 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:38:20.743 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:39:04.664 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:39:48.223 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:40:35.995 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:41:20.983 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:42:05.983 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:42:49.663 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:43:34.303 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:44:19.303 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:44:22.068 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:44:39.381 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.plug_158d00039bb6b3 is taking over 10 seconds
2023-06-13 10:44:39.391 ERROR (SyncWorker_1) [xiaomi_gateway] Cannot connect to gateway 04cf8cb0b13c
2023-06-13 10:44:39.391 ERROR (SyncWorker_1) [xiaomi_gateway] No data in response from hub None
2023-06-13 10:45:07.188 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:45:54.830 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:46:39.464 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:46:44.064 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: communication failed
Traceback (most recent call last):
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 925, in _int_send_packet_while_connected
await self._send_packets_locked(packets)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 949, in _send_packets_locked
await self._int_send_packets_locked(packets)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 986, in _int_send_packets_locked
await self._client.write_gatt_char(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write_gatt_char'
2023-06-13 10:46:44.070 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 862, in _send_response
await self._send_packet_while_connected(code, data, response_to, False)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 898, in _send_packet_while_connected
await self._int_send_packet_while_connected(packets)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 925, in _int_send_packet_while_connected
await self._send_packets_locked(packets)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 949, in _send_packets_locked
await self._int_send_packets_locked(packets)
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 986, in _int_send_packets_locked
await self._client.write_gatt_char(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write_gatt_char'
2023-06-13 10:47:31.192 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:47:33.964 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:48:18.104 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:49:02.868 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:49:47.024 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:50:31.905 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:51:16.665 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -67
2023-06-13 10:52:23.625 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 10:53:31.668 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 10:54:15.469 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 10:55:00.106 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 10:55:45.113 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 10:56:30.229 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 10:57:13.907 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 10:57:57.587 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 10:58:48.947 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 10:59:36.587 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 11:00:20.508 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 11:01:05.391 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66
2023-06-13 11:01:08.146 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:01:56:29: Device unexpectedly disconnected; RSSI: -66

Issue with Smart Lock

Hi i just tried the latest version [v0.1.4] today with my smart lock, it actually discovered and added the lock pretty fast (like less than 10sec) but im getting new error messages :
`
This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/tuya_ble/tuya_ble/tuya_ble.py:652
Integration: Tuya BLE
First occurred: 7:54:06 PM (1 occurrences)
Last logged: 7:54:06 PM

Error setting up entry Smart Lock F2F0F6 for tuya_ble
Traceback (most recent call last):
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 640, in _ensure_connected
if not await self._send_packet_while_connected(
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 893, in _send_packet_while_connected
await asyncio.wait_for(future, RESPONSE_WAIT_TIMEOUT)
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 432, in wait_for
await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/tuya_ble/init.py", line 44, in async_setup_entry
await device.initialize()
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 272, in initialize
await self.update()
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 312, in update
await self._send_packet(TuyaBLECode.FUN_SENDER_DEVICE_STATUS, bytes())
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 843, in _send_packet
await self._ensure_connected()
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 652, in _ensure_connected
except [BLEAK_EXCEPTIONS, BleakNotFoundError]:
TypeError: catching classes that do not inherit from BaseException is not allowed

This error originated from a custom integration.

Logger: custom_components.tuya_ble.tuya_ble.tuya_ble
Source: custom_components/tuya_ble/tuya_ble/tuya_ble.py:525
Integration: Tuya BLE
First occurred: 7:54:02 PM (1 occurrences)
Last logged: 7:54:02 PM

DC:23:4E:F2:F0:F6: Device unexpectedly disconnected; RSSI: None`

This error originated from a custom integration.

Logger: custom_components.tuya_ble.tuya_ble.tuya_ble
Source: custom_components/tuya_ble/tuya_ble/tuya_ble.py:593
Integration: Tuya BLE
First occurred: 7:50:08 PM (2 occurrences)
Last logged: 7:53:22 PM

DC:23:4E:F2:F0:F6: device not found, not in range, or poor RSSI: None
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 233, in connect
await local_disconnect_monitor_event.wait()
File "/usr/local/lib/python3.10/asyncio/locks.py", line 214, in wait
await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/init.py", line 344, in establish_connection
await client.connect(
File "/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py", line 269, in connect
connected = await super().connect(**kwargs)
File "/usr/local/lib/python3.10/site-packages/bleak/init.py", line 531, in connect
return await self._backend.connect(**kwargs)
File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 141, in connect
async with async_timeout(timeout):
File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 129, in aexit
self._do_exit(exc_type)
File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 212, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

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

Traceback (most recent call last):
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 593, in _ensure_connected
client = await establish_connection(
File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/init.py", line 361, in establish_connection
_raise_if_needed(name, device.address, exc)
File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/init.py", line 310, in _raise_if_needed
raise BleakNotFoundError(msg) from exc
bleak_retry_connector.BleakNotFoundError: DC:23:4E:F2:F0:F6 - DC:23:4E:F2:F0:F6: Failed to connect:

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/tuya_ble/cloud.py:182
Integration: Tuya BLE
First occurred: 7:43:21 PM (1 occurrences)
Last logged: 7:43:21 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 95, in async_start
await gather_with_concurrency(
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 178, in gather_with_concurrency
return await gather(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 176, in sem_task
return await task
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 233, in async_step_bluetooth
await self._manager.build_cache()
File "/config/custom_components/tuya_ble/cloud.py", line 214, in build_cache
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
`

(Btw, i removed the integration, restarted ha , installed it again, restarted ha again and than tried adding the lock again just in case...)

let me know if you want me to get more details from the device in Tuya IoT, Thanks!

New device request

I've tried to update the
devices.py
image
sensor.py
image
but it always shows
image

so if it's possible could you please look at the way to add a new temperature & humidity sensor with category_id = wsdcg & product_id = vyfoip9h
Device Info

{
  "result": {
    "active_time": 1685961099,
    "category": "wsdcg",
    "category_name": "Temperature and Humidity Sensor",
    "create_time": 1685957264,
    "gateway_id": "",
    "icon": "smart/icon/ay1525749833414yotNt/bfd21e12a1179860998fb0bdec6a048d.png",
    "id": "bf3b71ndptddin7d",
    "ip": "",
    "lat": "50.4200",
    "local_key": "E>863tEc5YVE=y/G",
    "lon": "30.6300",
    "model": "TH05",
    "name": "THS",
    "online": false,
    "owner_id": "152042351",
    "product_id": "vyfoip9h",
    "product_name": "Temp & Humidity Sensor",
    "sub": false,
    "time_zone": "+03:00",
    "update_time": 1685961100,
    "uuid": "814a0709f7a21624"
  },
  "success": true,
  "t": 1685965401918,
  "tid": "2c51f2bc039611eebfbfa24bf1d21c99"
}

Device Specification

{
  "result": {
    "category": "wsdcg",
    "functions": [
      {
        "code": "temp_unit_convert",
        "lang_config": {
          "c": "℃",
          "f": "℉"
        },
        "name": "Unit convert",
        "type": "Enum",
        "values": "{\"range\":[\"c\",\"f\"]}"
      }
    ],
    "status": [
      {
        "code": "va_temperature",
        "lang_config": {
          "unit": "℃"
        },
        "name": "Temperature",
        "type": "Integer",
        "values": "{\"unit\":\"℃\",\"min\":-100,\"max\":600,\"scale\":1,\"step\":1}"
      },
      {
        "code": "va_humidity",
        "lang_config": {
          "unit": "%"
        },
        "name": "Humidity",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "battery_percentage",
        "lang_config": {
          "unit": "%"
        },
        "name": "Battery level",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "temp_unit_convert",
        "lang_config": {
          "c": "℃",
          "f": "℉"
        },
        "name": "Unit convert",
        "type": "Enum",
        "values": "{\"range\":[\"c\",\"f\"]}"
      }
    ]
  },
  "success": true,
  "t": 1685965314247,
  "tid": "f80ddb5e039511eea4908a3120fb3e2a"
}

Table of Instructions
image

Details about Fingerbot's "Programming" feature

I had this documented awhile ago, but forgot to implement to the PoC.

I think this feature is still useful because it's faster than having to wait for HA.

mode: program
8 (enum): prog

prog
121 (raw): FFFF3202370001000001
repeat: forever (0xFFFF). Maybe 0x0002 = 2 times?
default action: 50 (0x32)
actions (0x02 = number of actions):
    move to 55 (0x37), delay 1s (0x0001)
    move to 0 (0x00), delay 1s (0x0001)

Hope you'll find this useful.

Device is not registered in Tuya Cloud

BLE Irrigation Valve is identified, registered with Tuya IoT, but prompts this error message in the end:
image

Device is in the list but shows offline:

image

Any thoughts? Thank you.

Saw #19 but couldn't resolve the issue for me.

Timeout waiting for shutdown

I have been using this integration with CubeTouch fingerbot for some time. It works perfectly, however whenever I restart Home Assistant Core, Tuya BLE is causing timeout during shutdown process.

See the logs below:

2023-07-24 16:26:24.191 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:82:E4: Device unexpectedly disconnected; RSSI: -44
2023-07-24 16:28:04.190 WARNING (MainThread) [homeassistant.core] Timed out waiting for shutdown stage 1 to complete, the shutdown will continue
2023-07-24 16:28:04.192 WARNING (MainThread) [homeassistant.core] Shutdown stage 1: still running: <Task pending name='Task-7062' coro=<async_setup_entry.<locals>._async_stop() running at /config/custom_components/tuya_ble/__init__.py:94> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[set.remove()]>
2023-07-24 16:29:04.195 WARNING (MainThread) [homeassistant.core] Timed out waiting for shutdown stage 2 to complete, the shutdown will continue
2023-07-24 16:29:04.197 WARNING (MainThread) [homeassistant.core] Shutdown stage 2: still running: <Task pending name='Task-7062' coro=<async_setup_entry.<locals>._async_stop() running at /config/custom_components/tuya_ble/__init__.py:94> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[set.remove()]>
2023-07-24 16:29:34.203 WARNING (MainThread) [homeassistant.core] Timed out waiting for shutdown stage 3 to complete, the shutdown will continue
2023-07-24 16:29:34.203 WARNING (MainThread) [homeassistant.core] Shutdown stage 3: still running: <Task pending name='Task-7062' coro=<async_setup_entry.<locals>._async_stop() running at /config/custom_components/tuya_ble/__init__.py:94> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[set.remove()]>
2023-07-24 16:29:39.206 WARNING (MainThread) [homeassistant.runner] Task could not be canceled and was still running after shutdown: <Task cancelling name='Task-7048' coro=<TuyaBLEDevice._reconnect() running at /config/custom_components/tuya_ble/tuya_ble/tuya_ble.py:685> wait_for=<Future pending cb=[Task.task_wakeup()]>>

16:26:24.191 is the time I initiated restart. Can you look into this? Thank you.

Cannot add basic BTH1 temperature sensor

I recently ordered one of these: https://www.aliexpress.us/item/3256803275249509.html

I thought it should be supported by this integration, and indeed the device pops up ready to add - recognises it's not on my Tuya cloud account, I add it there with my phone, but then no matter what I try I can't get it to successfully add the device in HA.

I managed to capture some HA errors from the console

2023-07-03T17:24:57+01:00  homeassistant  2023-07-03 16:24:57.047 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Temperature Humidity Sensor 7F49F7 for tuya_ble
2023-07-03T17:24:57+01:00  homeassistant  Traceback (most recent call last):
2023-07-03T17:24:57+01:00  homeassistant    File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 640, in _ensure_connected
2023-07-03T17:24:57+01:00  homeassistant      if not await self._send_packet_while_connected(
2023-07-03T17:24:57+01:00  homeassistant             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-07-03T17:24:57+01:00  homeassistant    File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 893, in _send_packet_while_connected
2023-07-03T17:24:57+01:00  homeassistant      await asyncio.wait_for(future, RESPONSE_WAIT_TIMEOUT)
2023-07-03T17:24:57+01:00  homeassistant    File "/usr/local/lib/python3.11/asyncio/tasks.py", line 466, in wait_for
2023-07-03T17:24:57+01:00  homeassistant      await waiter
2023-07-03T17:24:57+01:00  homeassistant  asyncio.exceptions.CancelledError
2023-07-03T17:24:57+01:00  homeassistant  
2023-07-03T17:24:57+01:00  homeassistant  During handling of the above exception, another exception occurred:
2023-07-03T17:24:57+01:00  homeassistant  
2023-07-03T17:24:57+01:00  homeassistant  Traceback (most recent call last):
2023-07-03T17:24:57+01:00  homeassistant    File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
2023-07-03T17:24:57+01:00  homeassistant      result = await component.async_setup_entry(hass, self)
2023-07-03T17:24:57+01:00  homeassistant               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-07-03T17:24:57+01:00  homeassistant    File "/config/custom_components/tuya_ble/__init__.py", line 44, in async_setup_entry
2023-07-03T17:24:57+01:00  homeassistant      await device.initialize()
2023-07-03T17:24:57+01:00  homeassistant    File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 272, in initialize
2023-07-03T17:24:57+01:00  homeassistant      await self.update()
2023-07-03T17:24:57+01:00  homeassistant    File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 312, in update
2023-07-03T17:24:57+01:00  homeassistant      await self._send_packet(TuyaBLECode.FUN_SENDER_DEVICE_STATUS, bytes())
2023-07-03T17:24:57+01:00  homeassistant    File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 843, in _send_packet
2023-07-03T17:24:57+01:00  homeassistant      await self._ensure_connected()
2023-07-03T17:24:57+01:00  homeassistant    File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 652, in _ensure_connected
2023-07-03T17:24:57+01:00  homeassistant      except [BLEAK_EXCEPTIONS, BleakNotFoundError]:
2023-07-03T17:24:57+01:00  homeassistant  TypeError: catching classes that do not inherit from BaseException is not allowed

The sensor works fine with the app on my phone and I have other Tuya devices working OK in HA using the cloud integration (Vacuum and Sous Vide cooker). The temperature sensor does actually show up in the cloud integration but obviously it's dependent on my phone to connect to BLE when I need the bluetooth in my Home Assistant box to connect to it.

Any ideas?

Screenshot 2023-07-03 at 17 29 41 Screenshot 2023-07-03 at 17 29 54

I'm running Home Assistant 2023.6.3

Cloud vs. Local Keys

Hey there, I'm happily using this addon with two Fingerbot Plus's.

Just recently I got a message from Tuys that my API subscription runs out - apparently one can request an extension for 6 months. I'd rather not have to do that regularly, though.

Looking at the code it seems like the Local Keys get stored from the Tuya API response.

  1. Does this integration still work when the cloud credentials expire?
  2. Is it possible to store/look at the Local Keys somewhere?
  3. Can this integration work with Local Keys only? Maybe in the future?

Thank you!

"Invalid flow specified" for CubeTouch II

image

Please, I need help to integrate my cubetouch II to my home assistant. I have other tuya devices already integrated with no problem but I am getting this error message for this new device.

Any advice? Any clue what might be going wrong?

Thank you so much.

ha_tuya_ble prevents HA from fully booting if a configured tuya device is missing/cannot be connected

The specific device for which I've seen this behavior is Fingerbot.
I've already had the device successfully configured and running before that.
Then, for unrelated reasons, I've decided to restart HA, however the device was not in range, and HA is now stuck "Waiting on integrations to complete setup: tuya_ble" and "tuya_ble" itself seem to be running an endless connection retry loop.
'Restart HA' (from the restart menu) also doesn't help.

(btw, much thanks for the great integration; having to use "the cloud" to manage a BLE device has always felt really strange to me; thanks to your efforts, now we can avoid this madness)

Versions:
HA Core: 2023.5.3
HA OS: 10.1 (running on rpi3-64)
tuya_ble: 0.1.7 (commit c11a1c5), installed by direct git clone.

Error callstack:

2023-06-29 20:23:23.062 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: tuya_ble
2023-06-29 20:23:41.410 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: device not found, not in range, or poor RSSI: None
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 204, in connect
    reply = await self._bus.call(
  File "/usr/local/lib/python3.10/site-packages/dbus_fast/aio/message_bus.py", line 371, in call
    await future
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/__init__.py", line 344, in establish_connection
    await client.connect(
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py", line 272, in connect
    connected = await super().connect(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/bleak/__init__.py", line 531, in connect
    return await self._backend.connect(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 141, in connect
    async with async_timeout(timeout):
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 129, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

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

Traceback (most recent call last):
  File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 586, in _ensure_connected
    client = await establish_connection(
  File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/__init__.py", line 361, in establish_connection
    _raise_if_needed(name, device.address, exc)
  File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/__init__.py", line 310, in _raise_if_needed
    raise BleakNotFoundError(msg) from exc
bleak_retry_connector.BleakNotFoundError: XX:XX:XX:XX:XX:XX - XX:XX:XX:XX:XX:XX: Failed to connect:

[Request] Support for "1nmdfdzp" Tuya Door Lock

Good time of the day.

Just wondering, would it be possible to add support for the Keyless Smart Lock Cylinder (Amazon Link).

Here is the response obtained from the Device Management > Query Device Details tab in the API Explorer:

{
  "result": [
    {
      "active_time": 1688888630,
      "category": "ms",
      "create_time": 1688888630,
      "custom_name": "Front Door",
      "icon": "smart/icon/ay15724370520156puq6/974064bec8b026e7147350eee514dabb.jpg",
      "id": "xxxxxxxxxxxxxxxxxxxxxxxx",
      "ip": "",
      "is_online": true,
      "lat": "xx.1258",
      "local_key": "xxxxxxxxxxxxxxxxxxxx",
      "lon": "xx.1536",
      "model": "CYZ_S1",
      "name": "Smart lock cylinder",
      "product_id": "1nmdfdzp",
      "product_name": "智能锁芯",
      "sub": true,
      "time_zone": "+04:00",
      "update_time": 1688888645,
      "uuid": "xxxxxxxxxxxxxxxxxxx"
    }
  ],
  "success": true,
}

And this is the response from the Device Control > Query Properties:

{
  "result": {
    "properties": [
      {
        "code": "unlock_method_create",
        "custom_name": "",
        "dp_id": 1,
        "time": 1688889127375,
        "value": "base64_data_here"
      },
      {
        "code": "unlock_method_delete",
        "custom_name": "",
        "dp_id": 2,
        "time": 1688889113756,
        "value": "base64_data_here"
      },
      {
        "code": "unlock_method_modify",
        "custom_name": "",
        "dp_id": 3,
        "time": 1688888630458
      },
      {
        "code": "bluetooth_unlock",
        "custom_name": "",
        "dp_id": 6,
        "time": 1688888630458
      },
      {
        "code": "residual_electricity",
        "custom_name": "",
        "dp_id": 8,
        "time": 1689068981107,
        "value": 75
      },
      {
        "code": "unlock_fingerprint",
        "custom_name": "",
        "dp_id": 12,
        "time": 1688989070000,
        "value": 101
      },
      {
        "code": "unlock_card",
        "custom_name": "",
        "dp_id": 15,
        "time": 1688889139000,
        "value": 0
      },
      {
        "code": "unlock_ble",
        "custom_name": "",
        "dp_id": 19,
        "time": 1688888630458,
        "value": 0
      },
      {
        "code": "alarm_lock",
        "custom_name": "",
        "dp_id": 21,
        "time": 1688888630458,
        "value": "wrong_finger"
      },
      {
        "code": "automatic_lock",
        "custom_name": "",
        "dp_id": 33,
        "time": 1689068975358,
        "value": true
      },
      {
        "code": "lock_motor_state",
        "custom_name": "",
        "dp_id": 47,
        "time": 1689068986529,
        "value": false
      },
      {
        "code": "synch_method",
        "custom_name": "",
        "dp_id": 54,
        "time": 1688888630458
      },
      {
        "code": "remote_no_pd_setkey",
        "custom_name": "",
        "dp_id": 60,
        "time": 1688888635028,
        "value": "AAAB"
      },
      {
        "code": "remote_no_dp_key",
        "custom_name": "",
        "dp_id": 61,
        "time": 1689068980786,
        "value": "AAAB"
      },
      {
        "code": "unlock_phone_remote",
        "custom_name": "",
        "dp_id": 62,
        "time": 1689068978000,
        "value": 256
      }
    ]
  },
  "success": true,
}

When i access Device Debugging, i can only see those fields:
image

No matter what i do, i get the following when trying to configure the integration:
image

If you can take a look into the addition of this lock to the supported rooster of BLE devices or at least point me in a way i can dig stuff up myself, that would be really nice!

Have a great day!

Unable to set up dependencies of tuya_ble

I have installed a Bluetooth device today (latest BlueZ version and DBus Broker)
image

After that I installed the Tuya_BLE custom component

image

At selecting the component an error is returned

image

And if I go to the logs:

image
(same errors could be duplicated as I tried several times)

Alternative Product ID for Fingerbot Plus

Hi @PlusPlus-ua, many thanks for the integration.

Have been trying it out and I've had to add a new product id (blliqpsj) for the 'Adaprox' branded Fingerbot Plus that I have. I did this by duplicating the yiihr7zh device.

Here is more info from the regular Tuya integration:
"name": "Fingerbot Plus", "model": "ADFB0301", "category": "szjqr", "product_id": "blliqpsj", "product_name": "Fingerbot Plus",

Let me know if you need more info.

Edit: I should add that it seems to be working fine with the duplicated details, just changing the product id.

Light bulbs Beacon RGBCW

Good afternoon! Can you tell me if your integration of the BLE light bulb will support it, I would really like to control the light bulb in HA

Request for added support for "okkyfgfs" Tuya Door Lock

Hi,

I was wondering if it would be possible to please add support for a Tuya BLE Door Lock with the Product ID: okkyfgfs Model: P196_V ? Many thanks.

https://www.amazon.com.au/TEKXDD-Fingerprint-Deadbolt-Biometric-Electronic/dp/B0B93LGT5Y?pd_rd_w=K6CNa&content-id=amzn1.sym.41f9ce4c-3adc-43da-b4e0-59d56ab54b4b&pf_rd_p=41f9ce4c-3adc-43da-b4e0-59d56ab54b4b&pf_rd_r=ZJQCYDS4R61HAYCQQVVM&pd_rd_wg=EK9x2&pd_rd_r=7e99ca39-37b4-4ab7-b801-0867c3258d70&pd_rd_i=B0B93LGT5Y&psc=1&ref_=pd_bap_d_grid_rp_0_1_ec_i

{
"result": {
"properties": [
{
"code": "unlock_method_create",
"custom_name": "",
"dp_id": 1,
"time": 1690178103652
},
{
"code": "unlock_method_delete",
"custom_name": "",
"dp_id": 2,
"time": 1690178103652
},
{
"code": "unlock_method_modify",
"custom_name": "",
"dp_id": 3,
"time": 1690178103652
},
{
"code": "bluetooth_unlock",
"custom_name": "",
"dp_id": 6,
"time": 1690178103652
},
{
"code": "residual_electricity",
"custom_name": "",
"dp_id": 8,
"time": 1690255732530,
"value": 88
},
{
"code": "unlock_fingerprint",
"custom_name": "",
"dp_id": 12,
"time": 1690239837000,
"value": 100
},
{
"code": "unlock_password",
"custom_name": "",
"dp_id": 13,
"time": 1690178103652,
"value": 0
},
{
"code": "unlock_dynamic",
"custom_name": "",
"dp_id": 14,
"time": 1690178103652,
"value": 0
},
{
"code": "unlock_ble",
"custom_name": "",
"dp_id": 19,
"time": 1690178103652,
"value": 0
},
{
"code": "alarm_lock",
"custom_name": "",
"dp_id": 21,
"time": 1690243840000,
"value": "wrong_finger"
},
{
"code": "beep_volume",
"custom_name": "",
"dp_id": 31,
"time": 1690255732766,
"value": "high"
},
{
"code": "lock_motor_state",
"custom_name": "",
"dp_id": 47,
"time": 1690178103652,
"value": false
},
{
"code": "temporary_password_creat",
"custom_name": "",
"dp_id": 51,
"time": 1690178103652
},
{
"code": "temporary_password_delete",
"custom_name": "",
"dp_id": 52,
"time": 1690178103652
},
{
"code": "temporary_password_modify",
"custom_name": "",
"dp_id": 53,
"time": 1690178103652
},
{
"code": "synch_method",
"custom_name": "",
"dp_id": 54,
"time": 1690178103652
},
{
"code": "unlock_temporary",
"custom_name": "",
"dp_id": 55,
"time": 1690178103652,
"value": 0
},
{
"code": "remote_no_pd_setkey",
"custom_name": "",
"dp_id": 60,
"time": 1690178103652
},
{
"code": "remote_no_dp_key",
"custom_name": "",
"dp_id": 61,
"time": 1690178103652
},
{
"code": "unlock_phone_remote",
"custom_name": "",
"dp_id": 62,
"time": 1690178103652,
"value": 0
},
{
"code": "unlock_voice_remote",
"custom_name": "",
"dp_id": 63,
"time": 1690178103652,
"value": 0
},
{
"code": "password_offline_time",
"custom_name": "",
"dp_id": 64,
"time": 1690178137232,
"value": "1690178103"
},
{
"code": "unlock_offline_clear_single",
"custom_name": "",
"dp_id": 65,
"time": 1690178103652
},
{
"code": "unlock_offline_clear",
"custom_name": "",
"dp_id": 66,
"time": 1690178103652
},
{
"code": "unlock_offline_pd",
"custom_name": "",
"dp_id": 67,
"time": 1690178103652
}
]
},

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.