Upload and view photos on Google Drive/Google Photos taken by camera



  • Hi guys!

    I am currently trying to make a module where I can take a picture, navigate to the destination folder using my remote control and keyboard and save it there. To view it again on the MagicMirror, I would like to navigate to the particular file using the remote control and keyboard again.

    I tried to find an existing module for this but it seems that it does not exist yet. The different parts however have been implemented in some modules, so it seems that it is possible. (Using Google Drive: MMM-RemoteCompliments, Using Google Photos: MMM-GooglePhotos, Taking pictures using the camera: camera)

    The goal is to save pictures of persons, for example each day. My main purpose is to view the pictures again on a later moment (when you want to redo your makeup/hair just the way you did before, for example). Another great feature of this could be to make a timelapse of yourself.

    I think the easiest way to implement this is to use a folder designated to each person and save the images there. When the user wants to view a photo of himself, the particular folder and file are selected again. I don’t know if this is easier to implement in Google Drive or Google Photos.

    An addition for the future might be Facial Recognition so the user does not need to navigate to the folder anymore, but I think starting with the core is the easiest way.

    My knowledge of the Google Drive/Photos API’s or JavaScript are very limited but I’m eager to learn, so I was wondering if any of you guys think this idea is nice and is willing to attempt this.



  • I’m not sure quite what you are trying to do. Perhaps you could explain it in a more step-by-step way? E.g. are you taking photos from a camera on the MM, or you’re uploading photos from your phone?

    If the latter the most sensible way of doing it would be to just dig into MMM-GooglePhotos - there is a lot of functionality from the API there that isn’t used and you could expand on.

    The time lapse I don’t really understand but then I don’t wear makeup. I don’t want to see me getting more knackered over time 🙂 but there you are.

    WIth facial recognition I think the question would be… how many people in each household will be using this feature? I would imagine in many it would be one. So whether it would be worth going to the considerable bother of setting up even basic AI to do facial recognition… I don’t know. But then, as I said, I’m not the target for this module.



  • Hi TipsyNurse, thanks for the in-depth response.

    Preferably, a camera on the MM would take the picture (a simple USB camera connected to the Raspberry Pi that I’ll be using).

    A more step-by-step explanation:
    The module will be configured in a way that it is connected to a Google Drive or Google Photos account so it can save and view pictures. (I don’t know if Drive or Photos is the better option)

    • Start the module and choose “Take picture”, it takes a picture and asks where you want to save it on Google Drive/Google Photos

    • A textbox appears, you enter the folder name (for example “John Smith”). If it already exists, the picture is saved in the folder. If it does not exist yet, a new folder named “John Smith” is created and the picture is saved inside.

    • To view a previous picture, you start the module and choose “View picture”. Then, a textbox appears again where you enter the folder name again. If it exists, the most recent picture is shown. Other pictures can be viewed by navigating left or right. If the folder does not exist, the textbox appears again, stating that the folder name is incorrect or non-existent.


    Later on, it could be a nice feature to implement Facial Recognition so the textbox is not necessary anymore.

    My main purpose is to add this in my own hair salon, but it can be a very fun feature for home purposes too.



  • @tuxx1112 interesting, but you don’t “start the module” just anytime you want… modules only start when MagicMirror starts… and they never stop…



  • @sdetweil I expressed myself a bit faulty. I meant that there are two buttons ‘take picture’ and ‘view picture’ that can be clicked/selected.



  • My personal view - without wishing to dent your enthusiasm - is that a MagicMirror module probably isn’t the way to go.

    When you are starting out writing a module/add on for software you always have to ask “what is this software intended for”? With MM it is to display jnformation. You can get some interactivity, but as @tuxx1112 it isn’t really setup that way. Add to that you are combining it with an API to Google, so an added layer of complication beyond just storing the images locally.

    You also need to ask what you want the software to do for your business. Do you just want the images, or do you want the promotion as well? If so, do you not want the images to be on Facebook/Twitter/Instagram rather than Google.

    Personally, my first choice would be to separate out taking the photo, and the display. 99.9% of your customers will have a smart phone and already take a photo of their new hair cut themselves. So, you could ask them to tweet them to you or similar and scrape the details from there onto MagicMirror, where you could categorise them by Twitter handle.

    If you are wedded to the idea of having this as an “all in one” type thing I would use an Android tablet and run MM in server mode. Display the MM on the tablet but set it up so if you press a button it takes the photo, then pops up for a name and you can use the touch screen keyboard to type it in. Android tablets are already plugged into Google and it eliminates the need for a physical keyboard which IMO are never desirable for a MM installation. That way you are separating out the display - MM - and the photo taking/uploading - Android.

    I think what you want is possible as a MM module just as it is possible to wash your dishes in your washing machine. It’s just that it’s much better to use two machines that are designed for the purpose than one trying to do two jobs.

    Hope that helps.



  • Oh, also, forget facial recognition for the moment. FR works if you have a small number of faces, or a large number of faces and a sodding huge computer to do the maths. If you can make FR with hair salon customers on a rPi… dude, pick up the phone to the FBi/MI5, they have a huge salary for you 😉



  • Hi @TipsyNurse!

    Thanks so much for the feedback on this idea. I have had doubts about the interface too.
    I did consider the smartphone, but I wanted the Magicmirror to be a replacement for a smartphone in the salon instead of an addition, preferably. Also, this might make it more complicating sometimes because the customer would have to do it himself and the pictures would not be as consistent as they would be using a fixed camera.

    The tablet is kind of the same ‘problem’. Since the Magicmirror would be used for playing very basic games using a controller like this one, a keyboard isn’t an issue.

    I know I might sound stubborn on this one, but would love to try it on the Magicmirror itself at first and was wondering if anyone was interested in helping on this module. Maybe there could be some computer that runs a website doing the difficult Google Photos-tasks, to relieve the Pi from his duty a bit? It would be run in different salons so the cost of this computer will be less than having to buy tablets for each mirror, too.

    The Facial Recognition might indeed be too demanding, especially since it isn’t that much of an improvement. This will be moved to the long-term idea section 😉

    Anyway, thanks so much for the critical feedback. I didn’t even think about the workload for the Pi.