I'm looking for a way to configure a rule that will retrieve an image from a security camera, and then attach that image to a Pushover message when motion is detected.
I'm in the process of migrating from a Veralite to Hubitat. I have just about all the custom automations I had in Vera migrated now. I was able to migrate most of the automations using rule engine, but I can't seem to find a way to use RE to accomplish this.
In my Vera LUUP code, I used the following commands to retrieve the image, save it to a temporary location and send the Pushover message with the image attached:
os.execute('curl http://<camera_IP>/Streaming/channels/1/picture?snapShotImageType=JPEG > /tmp/camera2.jpg')
os.execute('curl -F "token=" -F "user=" -F "message=DRIVEWAY : "' .. mydate .. '" : Batt ["' .. battery .. '"]" -F "sound=pushover" -F "priority=1" -F "attachment=@/tmp/camera2.jpg" http://api.pushover.net/1/messages.json')
How would I do the same in Hubitat? I was able to send a Pushover message (without an attachment) using the 'Send HTTP Post' Action in the Rule Engine, but how would I send an HTTP command to retrieve the image and save it in a temporary location?
Thanks for the help!