Hello, I’m able to send a snapshot to Telegram by taking a snapshot with camera.snapshot service. and a function node like:
var snapshot = "/config/www/snapshots/snapshot_camera.jpg";
msg.payload = {};
msg.payload.chatId = [xxxxxxxxxxx];
msg.payload.type = "photo";
msg.payload.content = snapshot;
return msg;
Now I do try the same to notify for the HA app.
I’m not able to do so.
I try to use the “call service node”, but I’m not able to get the data part right. I’m able to send tekst as notify message. But how to send a snapshot?
this works for tekst:
{
"title": "TEST bericht:",
"message": "kijken of dit werkt: {{payload}}"
}
I tried this data for a snapshot giving an API error:
{
"title": "TEST bericht:",
"message": "kijken of dit werkt: ",
"data": {
"photo": "/config/www/snapshots/snapshot_camera.jpg",
"capture": "Snapshot"
}
}
Any help would be nice.
EDIT:
I found the solution at this link: https://companion.home-assistant.io/docs/notifications/notification-attachments
{
"title": "TEST bericht:",
"message": "Kijken of het werkt",
"data": {
"attachment": {
"url": "https://myadres.duckdns.org/local/snapshots/snapshot_camera.jpg",
"content-type": "png",
"hide-thumbnail": false
}
}
}
This
is only giving a small thumbnail. Next step will be to find out the full image