can anyone guide me how to make an automation in which when i press the doorbell button then my door camera captures picture and gives a notification in my android mobile with that image and a sound .?
is that possible how ?
like in this example a notification in media player but i want in android.
# This automation triggers when the doorbell button is pushed
# and out the front door camera stream to the tv.
#
automation:
- alias: "Doorbell Camera"
trigger:
platform: state
entity_id: binary_sensor.doorbell_button
to: 'on'
action:
- service: camera.play_stream
data:
entity_id: camera.front_door
media_player: media_player.living_room_tv
I actually just implemented something like this (although mine is triggered by a motion sensor), but in kind of a “brute force” way. But it works.
It’s actually a bit more involved, but the basic steps are:
Use the camera.snapshot service to write a snapshot to a file.
Use an SMTP notify service to send an e-maill containing the image to my phone number’s e-mail address. Most cell services have such an e-mail address (e.g., AT&T in the US uses <cell_number>@mms.att.net) that turns the e-mail into an MMS message.
Ok. Well, I just took a deeper look at the mjpegcamera platform code, and sure enough, it doesn’t support playing a stream. Hence the error you saw.
Is there any way to get your cameras to work with a different camera platform? There are several other somewhat generic types you might try that do support playing a stream.