If you don’t see bounding boxes around objects with “person”, “car”, labels in your notifications, you may want to read this.
The original how-to sends the image before rekognition to Pushover (for iOS notifications, read on). It doesn’t send the image with object bounding boxes that were returned by Amazon Rekognition. The bounding boxes are written to a new image by the HASS-amazon-rekognition component.
The HASS-amazon-rekognition component creates .jpg files with this filename format:
rekognition_<entity_name>_latest.jpg
eg. rekognition_cam_abc_latest.jpg
For the original post in this thread, this maps to:
"rekognition_" + msg.data.base_id + "_latest.jpg"
So the pushover preparation (function node) would look something like:
msg.payload = "Sensor: " + msg.data.new_state.attributes.friendly_name + "\n" + "Person Confidence: " + msg.person_confidence + "%";
msg.topic = "Person Detected";
msg.device = "YourPushoverDeviceName";
msg.priority = 1;
msg.image = "/config/www/camera_snapshot/rekognition_" + msg.data.base_id + "_latest.jpg"
return msg;
Assuming you configured amazon_rekogntion to write files to the same directory:
save_file_folder: /config/www/camera_snapshot/
For iOS notifications, the call_service node (domain=notify
, service=mobile_app_myphone
) has Data
field:
{
"message": "Person {{ payload.person_confidences }}%: {{ payload.friendly_name }}",
"data": {
"attachment": {
"url": "https://yourdomain.duckdns.org:12345/local/camera_snapshot/rekognition_{{ payload.friendly_name }}_latest.jpg"
}
}
}
Where a previous node copied msg.data.base_id
to msg.payload.friendly_name
Now my notifications show the ROI (green box) and red/yellow boxes of all detected objects.