SecKatie / ha-wyzeapi

Home Assistant Integration for Wyze devices.
745 stars 114 forks source link

[Feature Request] Door Bell #113

Closed whycali closed 3 years ago

whycali commented 3 years ago

Is your feature request related to a problem? Please describe.

No issue other than would like to view on HA Describe the solution you'd like

When door bell is pushed it will show up on HA Describe alternatives you've considered

Additional context

SecKatie commented 3 years ago

As far as I know, there is no way to tie into the notification system. This will require additional examination, however, so I will leave this issue open.

shauntarves commented 3 years ago

@whycali

I have been working with @JoshuaMulliken to reverse-engineer a generic wyze API. I've finally cracked what they're doing in their newer requests and how they hit their own API. We now have full support for the bulbs, plugs/switches, and the new vacuum. I would love to add support for more devices, but I need someone who has these devices to be willing to work with me directly and share some access/data to I can make the code work. If you're interested in helping out, please email shaun <at> tarves <dot> net

uzegonemad commented 3 years ago

I'll be receiving a doorbell in a few days. I'm curious if it publishes button presses to the get_event_list endpoint, and if that's the case maybe we can implement something similar to #138

SecKatie commented 3 years ago

I have a doorbell. I can see if it does anything special.

aeckard87 commented 3 years ago

just received a doorbell recently - happy to assist here

SecKatie commented 3 years ago

Don't think this is possible.

dnestico commented 2 years ago

I know this is closed but any updates? I have a doorbell and would love this feature as it can be used for automations..

tggman commented 2 years ago

I send doorbell notifications to my HA instance via Amazon Alexa using an exposed/shared input_number control. I basically set the input_number control to a unique number via an Alexa Routine. I then use that same input_control value as a trigger in a Home Assistant automation. In fact, one can use that same input_number control as a trigger for any number of tasks in HA depending on its value. The prerequisite for this approach is a connection between your Home Assistant instance and Amazon Alexa. My connection is a perk that comes with my Home Assistant support via Nuba Casa but it can be setup independently and without Nuba Casa.

dnestico commented 2 years ago

@tggman Hi sorry if this sounds dumb but can you maybe show me what this looks like? I have a nabu casa subscription and alexa is connected, so would be nice to see exactly what the automation looks like so I can try it out, thanks.

tggman commented 2 years ago

@tggman Hi sorry if this sounds dumb but can you maybe show me what this looks like? I have a nabu casa subscription and alexa is connected, so would be nice to see exactly what the automation looks like so I can try it out, thanks.

Sure. No problem.

Let's call the connection between Home Assistant and Alexa the command pipe. The command pipe is typically a single, exposed input_number control (although multiple input_boolean controls could also be used) Because commands can flow both in and out of the pipe, I use the following conventions:

Example:

  1. Someone rings my Doorbell.
  2. An Alexa routine triggers on the button press and sets the value of the Home Assistant input_number.doit_alex control (named Alexa Routine Execute in the Alexa app) to -11.
  3. The Home Assistant automation Alexa HACP Received: Doorbell triggers when it sees input_number.doit_alex change to -11, turns on the front lights, and closes the communication loop by resetting the command pipe input_number.doit_alex back to zero

Alexa App Side:

Here the Home Assistant control input_number.doit_alex is given the name Alexa Routine Execute in the Alexa App

and here is the Alexa Routine that's triggered when the doorbell rings which sets Alexa Routine Execute to -11

Home Assistant Side:

Here's one of the automations that monitors the Alexa input_number.doit_alexa command pipe and in this case, triggers when it's value is -11 (doorbell ring):

- alias: "Alexa HACP Received: Doorbell"
  id: hacp_in_0011a
  initial_state: true
  trigger:
    platform: template
    value_template: "{{ states('input_number.doit_alexa')|int(0) == -11 }}"
  action:
    - service: automation.trigger
      entity_id: automation.motion_detect_on_off_front_porch_light
      data:
        skip_condition: false
    - service: input_number.set_value       #-: reset Alexa's command pipe
      data:
        entity_id: input_number.doit_alexa
        value: 0.0

The applicable logbook entries:

SecKatie commented 2 years ago

@tggman super smart!!! Great tip!!

dnestico commented 2 years ago

@tggman Someone finally rang my doorbell and...

This works great! Thank you.

rileytb commented 1 year ago

Don't think this is possible.

Does this mean no integrations at all with the doorbell? Asking less about video feed/binary sensor for button press, and more about the chime settings (their scheduling and volume) as something available in HA. For example, after sundown set the ringer volume to 20%.