Open Zylazy opened 2 years ago
I ordered one Tuya smoke detector last month to see if I can get it integrated with HA. All worked fine including all entities recognized by HA. Last week I ordered 6 more and despite the fact that they look exactly the same, they didn't get integrated fully in HA and I am getting the battery state only so I am having the exact same issue described above.
Working version: Device info Smoke detector (vsmzasbmbp1wtadv) by Tuya
Non working version: Device info (ratstesiekxoea7a) by Tuya
Thank for the update. I can confirm that my devices are ratstesiekxoea7a also.
I have the same problem, did any of you found some workaround ?
Unfortunately, no solution yet.
same problem here
Hi, i created a virtual device switch on https://iot.tuya.com/cloud/, then in the app i created a scene that when smoke alert trigger, switch on de virtual device. In home assistant i add the virtual device and montoring it.
It was a brilliant idea! Thanks a lot! This way I can solve alsi other problems I had.
nikodobla @.***> ezt írta (időpont: 2022. aug. 4., Cs 15:29):
Hi, i create a virtual device switch on https://iot.tuya.com/cloud/, then in the app i create a scene that when smoke alert trigger, switch on de virtual device. In home assistant i add de virtual device and montoring it.
— Reply to this email directly, view it on GitHub https://github.com/tuya/tuya-home-assistant/issues/771#issuecomment-1205259044, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7RYDBOIO4BJNNZXRLUCZLVXPASBANCNFSM5MSFMX6A . You are receiving this because you authored the thread.Message ID: @.***>
same problemm here, device: xxf2ihg4yseqofkp
Same problem here.
espite the fact that they look exactly the same, they didn't get integrated fully in HA and I am getting the battery state only so
very interesting idea, which virtual device did you choose exactly?
My product ID is "xwwcvhmbotekh5ye" which does not work
is seems the the standard instruction set only gives battery state . on the tuya IoT platform change the contol instruction mode to DP instruction . then push the test button homeassistan now gets the binary_sensor.rauchwarnmelder hope this helps anyone . gr.
is seems the the standard instruction set only gives battery state . on the tuya IoT platform change the contol instruction mode to DP instruction . then push the test button homeassistan now gets the binary_sensor.rauchwarnmelder hope this helps anyone . gr.
Thanks. I followed your instructions, but unfortunately, I don't see any additional sensors in Home Assistant.
When I change the instruction mode, then it popup a message like this: "Are you sure to change the control instruction mode to the raw DP mode? After you save the configuration, the devices under this project might not be able to be controlled by the original standard instructions. Refer to the DP instructions for re-adaptation." Does it mean, that I need to delete the device and reconnect in the Tuya app?
on the tuya IoT platform change the contol instruction mode to DP instruction . then push the test button homeassistan now gets the binary_sensor.rauchwarnmelder
This worked for me. Make sure that in Tuya IoT after applying the change, go into viewing mode and click the refresh configuration button. I reloaded the Tuya device in Home Assistant and it added the status entity.
Same problem here !
It worked for me with changing the mode to DP instruction. This only needs to be done once for the device type and then it will affect all devices of this type.
To change the mode: Open Tuya IOT Platform website and login. Select Cloud > Development. Select/Click on your project. Select the "Devices" tab. In the "View Devices by Product" section, select the respective product. In my case it was "ZX-3150" for my smoke detectors. Press the pencil on the top right to edit this product settings. Click on "DP Instruction", confirm and "Save Configuration".
After that, reload the tuya integration in Home Assistant. For me, it took about half an hour and I reloaded a couple of times, before the smoke detection state got visible.
i also did that and it got me the smoke detection state but it wont trigger. if i hit the test button on the smoke detector in tuya i get a trigger but it wont trigger in home assistant.
is seems the the standard instruction set only gives battery state . on the tuya IoT platform change the contol instruction mode to DP instruction . then push the test button homeassistan now gets the binary_sensor.rauchwarnmelder hope this helps anyone . gr.
this is the solution to the problem, just dont forget to refresh the configuration after the change, in the view instruction details, then go to Home assistant and reload the integration.
I have a smoke detector which is called Smoke Alarm (cjlutkuuvxnie17o). I also applied the DP Instruction option and the three options became available, but whatever i do the smoke sensor state is "Not detected". Is there any solution for this?
Hi! Same issue here, not detected in HA, the smoke trigger is always in "not detected" statut. any idéa?
well ive had success with adding my tuya smoke alarm into HA, do as @lauff explained changing the DP settings then do as @abeditani suggested, to 'refresh the config' and then restart HA and i now have battery and smoke! HOWEVER every time i trigger the smoke alarm its not changing in HA same as @xDannyzee
i think i found the issue!
my smoke alarm sensor is setting SMOKE_SENSOR_STATE
to alarm
but if you check the specs for tuya stuff - https://developer.tuya.com/en/docs/iot/s?id=K9gf48r5i2iiy
it shows state
must be 0 or 1 and status
must be normal
or alarm
,
so my device is setting them the wrong way around !?
ive checked HA code and its checking it correctly but needs fixing for weird devices like mine that are getting them to wrong way around
I had the same problem but with the DP instruction it finally works. Pay special attention to restart the options in IOT to make it work as earlier mentioned.
I found I way to add all the 3 sensors.
1-At tuya Cloud , open your project, devices, click at the pen to edit the device and change it to DP instruction
2-Open at custon_components/tuya/const.py and change
TEMPER_ALARM = "temper_alarm" # Tamper alarm
to
TEMPER_ALARM = "tamper_alarm" # Tamper alarm
3-Open at custon_components/tuya/binary_sensor.py and change look for "ywbj" and change all items to
# Smoke Detector
# https://developer.tuya.com/en/docs/iot/categoryywbj?id=Kaiuz3f6sf952
"ywbj": (
TuyaBinarySensorEntityDescription(
key=DPCode.SMOKE_SENSOR_STATE,
device_class=BinarySensorDeviceClass.SMOKE,
on_value="alarm",
),
TEMPER_BINARY_SENSOR,
),
4-Restart HA
5-After load all, reload tuya
6-And voyla!
@cyberrep
I found I way to add all the 3 sensors.
1-At tuya Cloud , open your project, devices, click at the pen to edit the device and change it to DP instruction
2-Open at custon_components/tuya/const.py and change TEMPER_ALARM = "temper_alarm" # Tamper alarm to TEMPER_ALARM = "tamper_alarm" # Tamper alarm
3-Open at custon_components/tuya/binary_sensor.py and change look for "ywbj" and change all items to
# Smoke Detector # https://developer.tuya.com/en/docs/iot/categoryywbj?id=Kaiuz3f6sf952 "ywbj": ( TuyaBinarySensorEntityDescription( key=DPCode.SMOKE_SENSOR_STATE, device_class=BinarySensorDeviceClass.SMOKE, on_value="alarm", ), TEMPER_BINARY_SENSOR, ),
4-Restart HA 5-After load all, reload tuya 6-And voyla!
Made the same changes but nothing changed. I use https://github.com/tuya/tuya-smart-life integration. Any thought on that, please?
@teamfighter this was working for me UNTIL home-assistant/tuya changed the API last month i think, now suddenly, one of my smoke alarms has its smoke_sensor value vanished and no longer exists, yet it exists in the tuya cloud api
@teamfighter this was working for me UNTIL home-assistant/tuya changed the API last month i think, now suddenly, one of my smoke alarms has its smoke_sensor value vanished and no longer exists, yet it exists in the tuya cloud api
Any chances to get this sensor work in home assistant?
@si458 I wrote to tuya support, they fixed the issue. Now smoke sensor detects correctly in HA with core tuya integration. Please check it too.
@teamfighter this isnt fixed in my case, it WAS working, UNTIL tuya updated home assistant last month and we have to link via the APP now rather than the IOT (i think it might of been janurary 24), then suddenly one of my smoke alarms, the value has VANISHED, yet its listed in the IOT platform
HALLWAY WORKING
LANDING NOT WORKING
@teamfighter this isnt fixed in my case, it WAS working, UNTIL tuya updated home assistant last month and we have to link via the APP now rather than the IOT (i think it might of been janurary 24), then suddenly one of my smoke alarms, the value has VANISHED, yet its listed in the IOT platform
Same, it was working until the tuya update.
I can confirm, that is fixed in my case.
I can confirm, that is fixed in my case.
@Zylazy, What did you change to make it work again ?
@Zylazy I'm interested in your solution also
Hi All, Sorry for tha late answer. So what I did:
I did exactly the same but not the same result
Same as @ArnolddeBolster. I did the same, but in HA no smoke sensor is shown. NOTE: This worked for me in the past until Tuya changed the integration to authenticate via QR.
@Robbe-B its the same for me, was working fine when i switched the DP, then after the new QR code auth update, im missing the sensor completely! but i can see from the web ui and the MQTT that the sensor is there!?
@si458, I guess the root cause will be that in essention, we've changed from a DEV account to a regular account where the DP no longer applies ? Something like that probably.
@Robbe-B well im not sure because if i enable the debug option for tuya, then watch my home assistant logs. and i just trigger my smoke alarm, i can see the MQTT event come into HA !? so it indeed works, its just missing the sensor? so it might be something with the setup of the devices. im going to have a look when i get chance as it has been driving in insane (misses complains about it screatching very loudly so have to do it when shes not in haha 😆)
@si458 , Nice investigation work there ! I'll probably end up flashing ESPHome on the Tuya chips in order to get rid of this issue for once and always 😄 Keep me posted ! Kind regards, Robbe
@Robbe-B im not that brave, give me code, ill find n fix it, give me hardware, it will end up more broken 😆
@Robbe-B the issue is the DPs and the is nothing we can do - https://github.com/home-assistant/core/issues/109923
@si458, It's a pity. I'll look into flashing these devices with custom firmware 😄
@Robbe-B any luck with anything do share! as i would like to give it a try. its annoying cuz 1 smoke alarm shows 'smart' and works, but my other one which doesnt show as 'smart' doesnt. i do wish HA would of made the new integrate 'Smart-Life' rather than 'Tuya', and left 'Tuya' using the IOT platform!
@Robbe-B the issue is the DPs and the is nothing we can do - home-assistant/core#109923
I wonder why it worked before anyway.
I still wonder why this intgration was changed that way making thousands of devices unusable. I could live with having an option to stick with the developer account if I could still use my devices. For sure it's not just smoke detectors that stopped working.
Hello! So, for now there is no way to leave the detector local? I'm trying with the HACS plugins, but it's not able to connect. I have seen in another forum that they are changing the firm, but I still don't think they have it very tuned
I have added to my account two wifi smoke sensors. It became also available as a new device in my Tuya integration, but it has only one entity: binary_sensor.xxx_battery.
Now i can see what is the battery state, but not the state of the sensor it self. I can not make any automation if it detects smoke.
Home Assistant Version
Device info: 2022-01-22 17:16:40 DEBUG (SyncWorker_6) [tuya_iot] Response: { { "active_time": 1642692518, "biz_type": 18, "category": "ywbj", "create_time": 1642692518, "icon": "smart/icon/ay1537847617560vAgbw/7e92e4faee02fae4a4d6defe063cf628.jpg", "id": "{ device id }", "ip": "", "lat": "", "local_key": "", "lon": "", "model": "YG400A-加电量", "name": "Kitchen smoke sensor", "online": true, "owner_id": "1993740", "product_id": "ratstesiekxoea7a", "product_name": "", "status": [ { "code": "battery_state", "value": "high" } ], "sub": false, "time_zone": "+01:00", "uid": "***", "update_time": 1642692580, "uuid": "683556c9b4338ecc" }
Debug log:
Disassambled alert started: 2022-01-22 17:27:37 DEBUG (Thread-6) [tuya_iot] _on_log: Sending PINGREQ 2022-01-22 17:27:37 DEBUG (Thread-6) [tuya_iot] _on_log: Received PINGRESP 2022-01-22 17:27:41 DEBUG (Thread-6) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/{ token }', ... (265 bytes) 2022-01-22 17:27:41 DEBUG (Thread-6) [tuya_iot] payload-> b'{"data":"aUssT1s6jrrBxSoPevNvE3NrS1PmFLUxPWirCVIrI3Mr2UhuO5yBYCrOgMdyO6V2j/aQq4OGZl1IG2nHXADbguxJtC/w5Mw0MVQDZUM4YCgAbDsWjPt/Ryilr3OS72qVhtVimXgxLvXIzPzytEhbSFnXGIrePCA6Ln0Dikk1pBU=","protocol":20,"pv":"2.0","sign":"8a0f4540b3bf1d9a31d11fafb579bb64","t":1642868861}' 2022-01-22 17:27:41 DEBUG (Thread-6) [tuya_iot] on_message: {'data': {'bizCode': 'online', 'bizData': {'time': 1642868861}, 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'ts': 0}, 'protocol': 20, 'pv': '2.0', 'sign': '8a0f4540b3bf1d9a31d11fafb579bb64', 't': 1642868861} 2022-01-22 17:27:41 DEBUG (Thread-6) [tuya_iot] mq receive-> {'data': {'bizCode': 'online', 'bizData': {'time': 1642868861}, 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'ts': 0}, 'protocol': 20, 'pv': '2.0', 'sign': '8a0f4540b3bf1d9a31d11fafb579bb64', 't': 1642868861} 2022-01-22 17:27:41 DEBUG (Thread-6) [tuya_iot] mq _on_device_other-> { device id } -- online 2022-01-22 17:27:42 DEBUG (Thread-6) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/{ token }', ... (275 bytes) 2022-01-22 17:27:42 DEBUG (Thread-6) [tuya_iot] payload-> b'{"data":"tSxsqMnNeEzNrVGpjvmk9ZA4J+DMOF3lYh4spl0RBoj8yvEOaqfJRKa2TvC5mXwNI0ujV0LdMEZvGoh3L4B8abE/K+wuS6i0U47ZutuEM0CXKA+FsEoWsHVXw19x1duYAnp5ZXRVH2p3IMquM+A8ZehZAaCwSzQCN+yyPtl+ljNxj2IrifPAYuCvgMz8pSXx","protocol":4,"pv":"2.0","sign":"8b082f233b36d1f1218bc3752f642f70","t":6}' 2022-01-22 17:27:42 DEBUG (Thread-6) [tuya_iot] on_message: {'data': {'dataId': '2e03a940-3065-4686-8954-483cb68be9d7', 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'status': [{'4': True}]}, 'protocol': 4, 'pv': '2.0', 'sign': '8b082f233b36d1f1218bc3752f642f70', 't': 6} 2022-01-22 17:27:42 DEBUG (Thread-6) [tuya_iot] mq receive-> {'data': {'dataId': '2e03a940-3065-4686-8954-483cb68be9d7', 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'status': [{'4': True}]}, 'protocol': 4, 'pv': '2.0', 'sign': '8b082f233b36d1f1218bc3752f642f70', 't': 6} 2022-01-22 17:27:42 DEBUG (Thread-6) [tuya_iot] mq _on_device_report-> [{'4': True}] 2022-01-22 17:27:42 DEBUG (Thread-6) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/{ token }', ... (339 bytes) 2022-01-22 17:27:42 DEBUG (Thread-6) [tuya_iot] payload-> b'{"data":"Wjm5OePaYtY/ZvVuV88aczbZ7BeSoMT5uR947Dhtrnucd2cH5W55fsF6uGgxZpSTI0ujV0LdMEZvGoh3L4B8abE/K+wuS6i0U47ZutuEM0CXKA+FsEoWsHVXw19x1duYAnp5ZXRVH2p3IMquM+A8ZQetFiDcJZGh0frbtQqQrjLdz53gJ4o66TRwWbAlk0j4aZ2f26kmU1Qo7nMuduQfbHUa60aYoAdT01iAQmAn1/Z8iDCafo/edXbgBz/pY09r","protocol":4,"pv":"2.0","sign":"7be957a22a2bfecb2fabea6d4eb6b0c5","t":6}' 2022-01-22 17:27:42 DEBUG (Thread-6) [tuya_iot] on_message: {'data': {'dataId': '2dbd7284-ae35-4bbc-b44f-f5e63d8972ad', 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'status': [{'14': 'high', 'code': 'battery_state', 't': '6', 'value': 'high'}]}, 'protocol': 4, 'pv': '2.0', 'sign': '7be957a22a2bfecb2fabea6d4eb6b0c5', 't': 6} 2022-01-22 17:27:42 DEBUG (Thread-6) [tuya_iot] mq receive-> {'data': {'dataId': '2dbd7284-ae35-4bbc-b44f-f5e63d8972ad', 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'status': [{'14': 'high', 'code': 'battery_state', 't': '6', 'value': 'high'}]}, 'protocol': 4, 'pv': '2.0', 'sign': '7be957a22a2bfecb2fabea6d4eb6b0c5', 't': 6} 2022-01-22 17:27:42 DEBUG (Thread-6) [tuya_iot] mq _on_device_report-> [{'14': 'high', 'code': 'battery_state', 't': '6', 'value': 'high'}]
alert was cleared: 2022-01-22 17:31:48 DEBUG (Thread-6) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/{ token }', ... (265 bytes) 2022-01-22 17:31:48 DEBUG (Thread-6) [tuya_iot] payload-> b'{"data":"aUssT1s6jrrBxSoPevNvE3NrS1PmFLUxPWirCVIrI3OmaRRuo5jSKF6ZEB1Jmd2Qj/aQq4OGZl1IG2nHXADbguxJtC/w5Mw0MVQDZUM4YCgAbDsWjPt/Ryilr3OS72qVhtVimXgxLvXIzPzytEhbSFnXGIrePCA6Ln0Dikk1pBU=","protocol":20,"pv":"2.0","sign":"dc36061f80b832c17b52fe06cbee041b","t":1642869108}' 2022-01-22 17:31:48 DEBUG (Thread-6) [tuya_iot] on_message: {'data': {'bizCode': 'online', 'bizData': {'time': 1642869108}, 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'ts': 0}, 'protocol': 20, 'pv': '2.0', 'sign': 'dc36061f80b832c17b52fe06cbee041b', 't': 1642869108} 2022-01-22 17:31:48 DEBUG (Thread-6) [tuya_iot] mq receive-> {'data': {'bizCode': 'online', 'bizData': {'time': 1642869108}, 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'ts': 0}, 'protocol': 20, 'pv': '2.0', 'sign': 'dc36061f80b832c17b52fe06cbee041b', 't': 1642869108} 2022-01-22 17:31:48 DEBUG (Thread-6) [tuya_iot] mq _on_device_other-> { device id }-- online 2022-01-22 17:31:49 DEBUG (Thread-6) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/{ token }', ... (275 bytes) 2022-01-22 17:31:49 DEBUG (Thread-6) [tuya_iot] payload-> b'{"data":"25UK62K+82GMQ/tlNtRSJNI6QofJ7HGcGkQBmlaARxF8/PDoo7jDuNGeyL4GzFLiI0ujV0LdMEZvGoh3L4B8abE/K+wuS6i0U47ZutuEM0CXKA+FsEoWsHVXw19x1duYAnp5ZXRVH2p3IMquM+A8ZehZAaCwSzQCN+yyPtl+ljPMqcC67EReDImXjoRKksDi","protocol":4,"pv":"2.0","sign":"eaca595415955f9bbb21f675dc17d5f0","t":5}' 2022-01-22 17:31:49 DEBUG (Thread-6) [tuya_iot] on_message: {'data': {'dataId': 'ddd29f1d-ac2f-43cf-b701-63b89a3bd203', 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'status': [{'4': False}]}, 'protocol': 4, 'pv': '2.0', 'sign': 'eaca595415955f9bbb21f675dc17d5f0', 't': 5} 2022-01-22 17:31:49 DEBUG (Thread-6) [tuya_iot] mq receive-> {'data': {'dataId': 'ddd29f1d-ac2f-43cf-b701-63b89a3bd203', 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'status': [{'4': False}]}, 'protocol': 4, 'pv': '2.0', 'sign': 'eaca595415955f9bbb21f675dc17d5f0', 't': 5} 2022-01-22 17:31:49 DEBUG (Thread-6) [tuya_iot] mq _on_device_report-> [{'4': False}] 2022-01-22 17:31:49 DEBUG (Thread-6) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/{ token }', ... (339 bytes) 2022-01-22 17:31:49 DEBUG (Thread-6) [tuya_iot] payload-> b'{"data":"xMkZIGusVlLJbM+eRnRXPBxg+4mCfmeSGFt2tuxx20gWXW4qALZ2SC/5yl50VUIsI0ujV0LdMEZvGoh3L4B8abE/K+wuS6i0U47ZutuEM0CXKA+FsEoWsHVXw19x1duYAnp5ZXRVH2p3IMquM+A8ZQetFiDcJZGh0frbtQqQrjLdz53gJ4o66TRwWbAlk0j4aZ2f26kmU1Qo7nMuduQfbER8uuX41U9G6uRQYP360bJ8iDCafo/edXbgBz/pY09r","protocol":4,"pv":"2.0","sign":"4634c625b53890bad34e3677336de029","t":5}' 2022-01-22 17:31:49 DEBUG (Thread-6) [tuya_iot] on_message: {'data': {'dataId': '2e77447d-44a9-4139-a763-d37005f667bd', 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'status': [{'14': 'high', 'code': 'battery_state', 't': '5', 'value': 'high'}]}, 'protocol': 4, 'pv': '2.0', 'sign': '4634c625b53890bad34e3677336de029', 't': 5} 2022-01-22 17:31:49 DEBUG (Thread-6) [tuya_iot] mq receive-> {'data': {'dataId': '2e77447d-44a9-4139-a763-d37005f667bd', 'devId': '{ device id }', 'productKey': 'ratstesiekxoea7a', 'status': [{'14': 'high', 'code': 'battery_state', 't': '5', 'value': 'high'}]}, 'protocol': 4, 'pv': '2.0', 'sign': '4634c625b53890bad34e3677336de029', 't': 5} 2022-01-22 17:31:49 DEBUG (Thread-6) [tuya_iot] mq _on_device_report-> [{'14': 'high', 'code': 'battery_state', 't': '5', 'value': 'high'}]