šŸ“ø Send camera snapshot notification on motion

Im seeing the same thingā€¦ The first few months I ran this it was instant, however now I am seeing delays of minutes some time, which makes the feature pointlessā€¦

That along with the fact that old snapshot were sent through in the notification now means I have removed it.

Thank you!
Maybe this should be mentioned in the documentation (first message). It also took a while for me to find out about the subtle difference between ā€œnotificationā€ and ā€œpersistent notificationā€.
We could assume that people are aware of the difference or add 1 line explaining the different behavior.

Great automation. How could I use it with a magnetic contact instead of the motion sensor?

I copied the blueprint and replaced the motion detector by an (esphome) doorbell buttonā€¦
see Send camera snapshot notification with Frenckā€™s doorbell
Or gist ā†’ https://gist.github.com/aceindy/d43b3a3237194e9846b18e0132de303b

variables:
  binary_sensor: !input 'binary_sensor'
  binary_sensor_name: '{{ states[binary_sensor].name }}'

First of all, congratulate the creator of the blueprint, Iā€™ve been using it on several of my cameras for a few days and it works wonderfully.

I would like to add clickable actions to the notification with photos, is it possible? I have looked for information but I have not found it ā€¦

Thank you!

I have not used it myself, but check this out:

1 Like

Would be great if this supported recording and sending video clips.

1 Like

Hey, did you ever get yours to work? Iā€™m quite new to this HA and MQTT stuff and Iā€™m not sure what Iā€™m suppose to do with your config and command.

EDIT: I figured it out. I had dig through your profile to find your post. Hereā€™s my setup if anyoneā€™s curiousā€¦

For configuration.yaml, I have something like:

binary_sensor:
  - platform: mqtt
    name: "Front Porch Cam" # i.e. Name of camera
    state_topic: "motion/FrontPorch" # i.e. Name of topic
    payload_on: "ON"
    payload_off: "OFF"
    device_class: "motion"

In my motionEye camera settings, I have a Run a Command like:

mosquitto_pub -h *MQTT HOST* -p *MQTT PORT* -u *MQTT USERNAME* -P *MQTT PASSWORD* -t *state_topic* -m ON

and a Run An End Command like (this is optional, but I put this in because the ON topic will continue running for a couple of minutes):

mosquitto_pub -h *MQTT HOST* -p *MQTT PORT* -u *MQTT USERNAME* -P *MQTT PASSWORD* -t *state_topic* -m OFF

So each command should basically look like:

mosquitto_pub -h 192.168.1.202 -p 1883 -u mqtt-user -P password -t motion/FrontPorch -m ON
mosquitto_pub -h 192.168.1.202 -p 1883 -u mqtt-user -P password -t motion/FrontPorch -m OFF

Then, I checked my config in Server Controls and did a server restart just for kicks. Afterward, I went back to this blueprint and created an automation like so:


And it seems like everythingā€™s functioning as expected. So nice work, fschade!

1 Like

Can we have something similar setup for Android phone too? The current blueprints does send the notification with snapshot for Android phone but it was silent and in the background. I know we can send HA notifications to Android with ttl:0 and priority: high settings to trigger the sound, but Iā€™m not sure how to do it in this blueprint.

This really applies to any Home Assistant notification, but when I click on the notification, it will open Home Assistant and delete the notification (iOS).

Is there anyway to change this behavior so that I donā€™t loose the notification?

Do you have any other app notifications that behave like this? AFAIK, the actual behaviour you describe is controlled by iOS. What would be the point of a notification that doesnā€™t clear when reacted to (honestly curious)?

True, but what is the purpose of a notification which disappears before seeing the content. Curious whether there any notification type which requires you to explicitly remove the notification.

Maybe we are talking about slightly different things. Are you talking about notification banners? Those can be set as temporary or persistent (but still clears when tapped). Otherwise, it ends up in your notification centre. Regardless, one can tap and hold a notification to see it in full before just tapping it. Still, this has to do with iOS and Iā€™m pretty sure thereā€™s nothing HA can do about it. The only alternatives I can think of is to adjust this blueprint to also set an HA internal persistent notification, send an IM or email.

Yes, you are correct, I am talking about the notification banners and even though they can be set as temporary or persitant, as you rightfully notice, they clear when tapped.

I do understand this has to do with iOS and I assume that iOS makes the assumption, that the notification is available in Home Assistant. When you tap the notification, it opens Home Assistant, but Home Assistant just opens its current page. It might be nice if Home Assistant would open the Notification page (you could send a persitent notification at the same time), or if the notification passes anything to Home Assistant, for Home Assistant to take an action based that information.

1 Like

Since moving my nodered to a container I cannot seem to pick up the jpg snapshots from /config/www/ā€¦

I added it to allowlist_external_dirs also but still nothing.
The telegram sendPhoto just does not work unless I use the nodered addon within HA.

{"photo": "/config/www/camshots/rear.jpg"}

Do you have any other tips please? Thanks

image

Use the full url?
{ā€œphoto": http://my.some.ip.address/config/www/camshots/rear.jpg"}

Unfortunately, that does not work even with the ingress token with filename=/config/www/camshots/rear.jpg

In the meantime Iā€™ve added pushbullet which sends the snapshots to my phone without issues.

At first I wasnā€™t seeing the image in the notification on my iPhone. After I upgraded to IOS 15, all is well. Thanks for the blueprint!

It would be nice if a condition was added (optional of course) that if someone is home or not :slight_smile:

1 Like