piwebcam / PiWebcam

Turn a Raspberry Pi into a fully-featured and dummy-proof webcam
https://piwebcam.github.io
52 stars 13 forks source link

Google Drive upload capability #44

Closed hungl6844 closed 3 years ago

hungl6844 commented 3 years ago

I don't want to expect too much, but maybe you could use the google drive api to allow uploading to google drive if the user allows it? This is also an option...

user2684 commented 3 years ago

Hi, unfortunately any native integration with Google Drive (or better any google service) would require a OAuth authentication to be performed and a good amount of complexity in getting, storing and managing the authentication token. The approach I was considering instead with related issues #32 and #39 is to leverage services like IFTTT and/or Zapier. This would bring in flexibility and simplicity on our side and can open up to a number of additional integrations provided by those services. What's your view on this approach? Thanks

hungl6844 commented 3 years ago

Well, I definitely understand your point, and I understand why you wouldn't be able to do such a thing. Of course, it would be possible, but not without going through a fair amount of obstacles, and losing quite a bit of money on the way for things like licenses(and because it's an open-source project, you aren't getting any revenue). So while it's not impossible, I agree with you that it would be difficult and pointless. Now, If This Then That and Zapier (assuming Zapier is something similar to IFTTT, I've never heard of it) are rather easy to set up compared to Google's services, so go for it! I'll help if I can figure out how PiWebcam works! For the foreseeable future, this issue will be closed, and will probably remain closed by me.

user2684 commented 3 years ago

Hi, not a matter of time or money actually :-) More an architectural decision since there are two possible approaches to do so: 1) implement integration for a number of different technologies on the PiWebcam side 2) leverage an external broker. Number 2 would decrease complexity, be error-prone and provide lots more of ready-to-use functionalities :-) Thinking about your request, just come to my mind, you can address it without any further modification of the software. If you are familiar with IFTTT (Zapier is somehow similar, a bit more restrictive in terms of what is provided for free but with some additional connectors), just configure your PiWebcam to send an email notification to the trigger email address of IFTTT. Then you can route the attachment (the image with the motion) wherever you want e.g. to Google Drive. I'm doing this with Slack and it is working fine: IFTTT takes in the email, gets the image and do and action (slack message, google drive upload, others.). Let me know if this works for you. Thanks