brianhepler / mmm-selfieshot Goto Github PK
View Code? Open in Web Editor NEWTaking a Selfie with USB cam on MagicMirror.
License: MIT License
Taking a Selfie with USB cam on MagicMirror.
License: MIT License
Hi Brian,
I managed to get selifes with a usb webcam, however I get error with raspberry camera module 3.
I searched and reviewed the logs, and found that fswebcam does not work with this pi module 3 camera.
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Error starting stream.
VIDIOC_STREAMON: Invalid argument
Unable to use mmap. Using read instead.
--- Capturing frame...
VIDIOC_DQBUF: Invalid argument
I tried fswebcam command seperately and couldn't be successsfull.
Are you sure that pi camera modules works with fswebcam and also with sefieshot ?
Best regards, and thanks for this great job.
Ozgur
Is there a possibility to add DSLR integration by using gPhoto2?
Would it be possible to run a costum command at the end of the count down to take a picture e.g. 'gphoto2 --capture-image-and-download'? So instead of directly taking a selfie the programm would run a command to take a picture.
hi... when use "raspistill -o image.jpg" i see this "the system should be configured for the legacy camera stack"
but when i try .. "libcamera-still -o image.jpg " my picamera Noir take me a photo.
in 2023 I had to download the "libcamera-apps" to have the function of cameras.
I tried the normal configuration -- but nothing happens.
I also tried the configuration where it says to mash but nothing happens (I was not mashing the button as touchscreen but via mouse)
Originally posted by @mirrormonark in #4 (comment)
Module works fine otherwise, but I get a dark image when I trigger. I think the issue is more the webcam. Read elsewhere that the problem is the webcam being triggered before it initialized. skipping the first few frames with fswebcam would solve, but I'm not sure how to add that here or where the fswebcam function is called since my javascript is very limited. Any ideas?
Hi,
I’m trying to use a USB Logitech webcam on my raspberry pi 4 running a magic mirror. I tested the webcam via a webcam test website(https://www.onlinemictest.com/webcam-test/) in my raspberry pi 4 and the image quality is very good; however, the image quality is too dark when used with the module inside a magic mirror. I tried with two different webcams and experience the same issue. I also updated the following:
updated my raspberry pi
updated magic mirror
Any help or advice is greatly appreciated. Thank you in advance.
Dear Brian,
a big "Thank you!" from my side for this amazing module!
Unfortunately, I cannot use the full resolution of my raspi camera module (v2.1) which would have a native resolution of 3280 × 2464 pixels. If I set the values of "width" and "height" to 3280x2464, the module always takes pictures at 1280x720.
I first thought that the module won't go beyond 1080p resolution of my display (1920x1080) but this resolution is also not possible and remains at 1280x720.
Can you clarify, whether 1280x720 is the maximum allowed resolution or if there is a way to use the full camera resolution (while still being able to have the "result picture" shown)?
Best from Switzerland,
Hendrik
is there any guide how can i trigger capturing by using voice command?
Hello everybody,
I have set up Alexa Control, which sends the notification "SELFIE_SHOOT" and "SELFIE_LAST". When I give the command, the timer is also activated, it counts down from 5, my USB camera activates and takes a picture.
However, after the picture is taken, it is not displayed on the screen, it just goes dark for a moment.
In the folder "photos" I find the pictures and can also view them.
The same problem exists with "SELFIE_LAST".
Does anyone have an idea why the pictures are taken but not displayed?
My config.js is not edited in this module.
{
disabled: false,
module: "MMM-Selfieshot",
config: {
}
},
just fade out and no image display after count down using commands /selfie or /lastselfie
also folder photos empty
My preview needs to be rotated by 90 degrees because I have my monitor in portrait mode.
Is this possible?
Thanks
Will it be possible to add a plain white to mimic a flash once the count down time reaches 0 ?
Hello, thank you for this wonderful work. I'm not a coder but I would liked to use your work, and will code be added? I would liked to add something like "postlastphoto" function: open win popup, with 2 possibilities: to take a selfie, or send by mail, printer...do hoy think hoy can do somethings for me?
Hey Brian! :) everything worked fine with my Pi Cam.. but suddenly it doesn't make a image now. The Countdown works, the image preview starts but there is no photo taken. raspistill -o test.jpg works.
I get an Mail with the taken photo, but its not a jpg or png its just an file I can't open.
Thx for help! I need the module, its the best module for the MM! _
Hey Brian again,
We would really like to have the PiCam support. You said u can not implement this right now, cause you dont have a Pi Cam.
Would it help to ship mine to you?
Greetings, Toby
I have tried two different email addresses, but cannot get it to send the email. Not sure which logs to provide? Nothing came up in the console of the chromium browser
Hello, i've only been messing around with Magic Mirror for about a week so i'm pretty new,
i made a module to send a notification ("SELFIE_SHOOT") at the start, but there's no feed.
checking the console i found the following error :
at Class.shoot (MMM-Selfieshot.js:193)
at Class.notificationReceived (MMM-Selfieshot.js:177)
at sendNotification (main.js:96)
at Object.sendNotification (main.js:526)
at Class.sendNotification (module.js:367)
at Class.getDom (note.js:7)
at main.js:111
at new Promise (<anonymous>)
at updateDom (main.js:110)
at main.js:52
(i have tested the USB camera on the raspberry and it works fine outside magic mirror)
EDIT : I have tested the CURL method, and was able to take a selfie that's stored in the photos folder and the timer appears on screen, but i still want to use the notification method to make the display appear
Hi, thank you for this module. This is great!
I am trying to get the auto upload using MMM-GooglePhotos for MMM-Selfieshot. I have followed the steps and have set up a album in GooglePhotos called MyMagicMirrorAlbum. I have also ran the below notification. However I still cannot see the photos uploaded.
PLease can you let me know if my config is correct. Also do i have to run this notification once or after each restart of MM or after each restart of my Pi, or after each photos.?
` {
module: 'MMM-Selfieshot',
debug: true,
}, `
{ module: "MMM-GooglePhotos", position: "top_right", config: { albums: [], // Set your album name. like ["My wedding", "family share", "Travle to Paris"] updateInterval: 1000 * 60, // minimum 10 seconds. sort: "new", // "old", "random" uploadAlbum: "MyMagicMirrorAlbum", // Only album created by
create_uploadable_album.js. //condition: { //fromDate: null, // Or "2018-03", RFC ... format available //toDate: null, // Or "2019-12-25", //minWidth: null, // Or 400 //maxWidth: null, // Or 8000 //minHeight: null, // Or 400 //maxHeight: null, // Or 8000 //minWHRatio: null, //maxWHRatio: null, //// WHRatio = Width/Height ratio ( ==1 : Squared Photo, < 1 : Portraited Photo, > 1 : Landscaped Photo) //}, showWidth: 1080, // These values will be used for quality of downloaded photos to show. real size to show in your MagicMirror region is recommended. showHeight: 1920, timeFormat: "YYYY/MM/DD HH:mm", // Or
relative can be used. } },
Are there any methods to flip the image so it will not be a mirrored image?
Hey dude! Very very nice! I love it so much <3 but is it possible to have a button with „take a selfie“ or something else for my touch screen MM? Maybe with an other module to send this notification to activate the countdown? I did not find anything. :/
In love Toby
Hi,
Is it possible to show the webcam feed while the countdown is running so that you can see what's in frame when taking a photo?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.