I have added a camera to Home Assistant Core via MQTT integration (Home Assistant 2023.5.4 Frontend 20230503.3 - latest Core version running Raspberry Pi 3B). It has created two sensors:
- binary_sensor.thecamera_motion_sensor // ON or OFF payload in topic home/device/motion
- camera.thecamera_motion_snapshot // when motion is detected with the binary sensor the camera sensor takes a snapshot
When motion is detected, the camera publishes an MQTT message with the motion notification and another one with the motion snapshot
Message 70 received on home/thecamera/motion at 09:34:
ON
QoS: 0 - Retain: false
Message 71 received on home/thecamera/motion/snapshot/image at 09:34:
b'\xff\xd8\xff\xe0\x00 ... \xff\xd9'
QoS: 0 - Retain: false
Message 72 received on home/thecamera/motion at 09:35:
OFF
QoS: 0 - Retain: false
I need an automation that notifies motion and shows the snapshot as well in my Home Assistant Android mobile app.
My current automation notifies motion in my Android app but do not know how to get the motion snapshot received via MQTT displayed in the notification. My current automation:
alias: there is motion
description: ""
trigger:
- platform: mqtt
topic: home/thecamera/motion
payload: "ON"
condition: []
action:
- service: notify.notify
data:
message: there is real motion!
mode: single
Adding a card the Home Assistant Core dashboard to show the MQTT snapshot is ok:
show_state: true
show_name: true
camera_view: auto
type: picture-entity
entity: camera.thecamera_motion_snapshot
name: there is motion card
If sending the MQTT image to the Home Assistant Android app is not possible, it would ok for me to receive via any notification platform/integration such as Pushbullet etc.
Thank you in advance!