Open nickthewebguy opened 4 years ago
Nice suggestion! We definitely need to expand the integration for the notifications. However, even if not completely related to #32 the complexity in interacting with third party services is similar: both google and dropbox requires authentication mechanisms that cannot easily implemented in bash. I probably need to find some sort of universal wrapper or IFTTT-like integration which is taking care of it to expand the notifications channels easily and in a reliable way. I'll keep you posted on the progress!
Probably one step ahead, I wonder if I could use IFTTT itself as a broker. Advantage is that it will unlock many many more integrations and workflows, downside is the image/video video must reside somewhere on the Internet since IFTTT cannot move binaries around (e.g. services like Slack, Google Drive, etc. accept only text or URLs to files). An option would be to use https://file.io to upload those files and then trigger IFTTT integrations via webhooks.
If have been looking into how I could achieve saving images to the cloud. The one solution I came up with was using Zapier (https://zapier.com/). You can setup a 'Zap' that uses a custom Zapier email address (unique to you), once that email address receives an email with an attachment you can then configure it to upload to google, dropbox etc. You can setup a free account but theres a limit of 10 emails per hour. Its an easy solution that doesn't require any additional code on the Pi. You can read about this at https://zapier.com/apps/email/integrations/google-drive/1689/send-new-inbound-email-attachments-to-google-drive
Interesting approach! In this way there is no need to change much on our side. Have you already tried it? Just to confirm attachment extraction is working correctly with emails PiWebcam is sending out.
Regardless I still wanted to use Zapier/IFTTT for providing a wider range of integrations. PiWebcam in this scenario is going to use the webhook for feeding this platform and then the user can do whatever he wants with it. Also a good replacement for the no-more-working Slack (#32). The challenge I see with Zapier as well is that despite I can send the picture/video with the webhook, the Slack integrations does not allow me to send the picture but only a link to the picture like IFTTT which requires an other external service like file.io mentioned before which I would like to avoid to make it simple. Do you have an idea if with Zapier this Slack image post is something feasible? I couldn't find detailed documentation around it. Thanks!
Actually the "Send Channel Message" option allows posting binary files as well but looks like pictures/vides are posted as plain text files. Will investigate further
BUT the Zapier webhook app is premium so not suitable for this. Looks like the email integration you recommended is not only the simplest one but also the only one working and for free :-)
Just to confirm email attachment parsing works also with Slack, I think we have a winner. I'll try to find out the best way to document it but this approach looks to me the best for integrating with any third party service. Thanks for the hit!
Excellent, glad I helped in a small way. As there is a 10 email per hour limit on a Zapier free account, it might be a good idea to have an option of zipping a collection of images and sending the zip file. Maybe allow options for every x amount or after a motion event has ended.
Just noticed IFTTT has a similar email trigger which works more or less the same. Attachments are extracted, stored on IFTT side and the public url is passed to the action app. So I assume you can achieve the google integration with it as well. The Slack one works too even if the look and feel is worse than Zapier (a thumbnail is posted instead of the picture itself) but better than using an intermediate service to do the job. And IFTTT should have higher limits than Zapier afaik
From https://ifttt.com/email:
The "send me an email" action has a daily limit of 750 messages per day, at which point Applets will be paused until the limit resets at 12:00 AM GMT.
Would love to see an option for transferring the photos/videos to online services such as dropbox or google docs.