Listening on Tuya Doorbell ring into a webhook

Hey everyone, I made a small docker container to listen to Tuya Doorbell ring and have-it integrated into hass as a webhook call. an example automation is included also with many ideas :smiley:

Have a look at nimda95/hass-tuya-doorbell-notification

I’ve based-it only on the doorbell I have, which is the one sold in Action Belgium.

Have a look, and if anybody is interested in turning-it into a pluging in HACS, I’ll be more than happy to chime-in :smiley:

If anybody is interested in having-it integrated over MQTT I can make that happen, this is just quick and dirty PoC.

it would be so awesome if it could be integrated into home asistant fully. and not need a docker container.

and as you state. the whole purpose of a doorbell is to be able to do something when the button is pushed.

i dont know much about coding in python. so i wil not be able to help whatsoever. :frowning:

I took a different route as my pi is already handling a lot of containers and I don’t want to have yet another one for a small use case. So I took a different route:

I bought myself a doorbell receiver that integrates with the existing doorbell. If activated, I want to capture a photo and push it to the companion app if I’m not at home. And I want our Alexa speakers to make a announcement and my pixel clock to display the sth.

There needs to be some kind of “proxy”, receiving the doorbell event and pushing it to HA. I bought a tuya smart socket, an USB one in my case as I want it as small as possible. Next, I configured an automation (I used Alexa as integration was quite good, but SmartLife/Tuya IoT is also possible). Everytime the doorbell is pressed, the socket is switched on and off after 30 sec. In HA, I subscribed to the activation of the socket as it mimics the doorbell and I was able to create the automation for the use case described above.

So instead if running my own container, I use Tuya / Alexa infrastructure and the small socket, which costs me around ~2€.

for now im just using a virtual button/device in the tuya cloud developer dashboard. and made a automation to flip the switch when the doorbell is pushed. but i feel like it is rather slow. it takes some time before HA is notified. and is then able to notify me.

I recently bought one of these tuya doorbells, and was looking for a way to get the ring event and use it in and automation, so while searching for alternatives, got to this post. I got the docker and set it to run but I’m not getting notifications when I press the button, are there any extra steps required in the tuya cloud to get the notifications?

So this is what I done so far to get this to work:
in the Tuya cloud, you may have to change your project, you need to enable the “Message Service”, else you’re not going to get a connection even if you have the API enabled. Once you do that you’ll get a connection and hopefully you’ll get the messages, with my version of the doorbell (standard non video) the Tuya Implementation of the events didn’t included the ring event, so I had to do an extra set of steps: go to devices list select the device (doorbell) then press the “Debug Device” Operation at the end of the list, that will open a new browser tab, then you select the “Device Debugging” section and in there you select a link on the top message that says product details, there you’ll find the " Control Instruction Mode", and you need to select the “DP Instruction”, that way you’ll get all messages not just the ones Tuya Cloud has mapped for that device. (Remember to save that configuration).
There is also a slight change in the app.js code to get the message you need because @nimda95 code is meant for his specific model, so that payload “event_notify” may be different from what you need…

this is the doorbell that I got as a reference: Amazon.com

I hope this helps any of you as a complement for the excellent work of @nimda95.