Hi,
I currently setup “Immich”, a selfhosted alternative to Google Photos.
Immich includes face recognition and automatically adds known persons to the info of an image.
Now I would like to use this feature to know who is at the door.
My idea is to add the following steps to the doorbell automation:
- Upload the (already stored) camera snapshot to Immich. This returns the image ID.
- Use the returned image ID to query the persons of the given image
- If no person is included in the image, wait for some time and retry the query. This is needed as the image processing might take some time. After a few retries without result the automation should stop.
- As soon as persons are included announce the persons.
As Immich has an API, I thought it shouldn’t be too hard to implementi but unfortunately I couldn’t find a way to upload the given image yet.
The API for uploading an asset includes examples using cURL but I don’t know how to implement this in HA.
So any help would be highly appreciated.
Thanks in advance 
Have a look here… you can add values in the curl statement via templating
Command line - Home Assistant
Thank you.
I’ve already seen the command line integration but was not sure if it is the correct way to do this.
I’ll try that out, thank you 
Thank you again for your comment.
I got it working using Shell Command instead of Command Line.
I only need it in an automation and no entity so it seems like Shell Command is the way to go.
That would indeed work too but I like to receive a bit more detailed feedback as proof that it is working correctly as quite a few of these endpoints often crash/no-available/etc. …hence using commandline to add that to a sensor
The command line sensor has a refresh interval, while I would like to only execute the command manually, when someone rings the doorbell.
My preferred solution would be to just define the command in the automation as it is not needed elsewhere but that does not seem to be possible. So the shell command seems to be the right choice for my case.
different use-cases… different methods 