@wjdw87 At a guess, it looks like the package manager npm is not installed on your Mac.
Read the statement by Michael Teeuw here.
Posts
-
RE: My Build
-
RE: Error on start
@negativeflare There are a couple things to check. For starters, make sure that you copied the
config.js.sampletoconfig.js. All lowercase. And it must be in the~/MagicMirror/configfolder.Assuming those are true, copy & paste your
config.jsin this thread, using the markdown commands. We’ll take a look at it and see if we notice anything. -
RE: Motion Detection with RaspiCam, Non-Module version
Hrm. New problem: After a few hours, the screen goes white. This obviously will not do. Back to the drawing board.
I found this in the motion log:
[1] [NTC] [ALL] [Nov 15 20:25:02] motion_loop: End of event 74 [1] [NTC] [ALL] [Nov 15 20:25:04] motion_loop: fps: 3.999920 idle 26.67% over 0.00% [1] [NTC] [ALL] [Nov 15 20:25:09] motion_loop: fps: 3.998465 idle 24.89% over 0.00% [1] [ERR] [ENC] [Nov 15 20:25:10] ffmpeg_put_frame: Error while writing video frame: [1] [NTC] [ALL] [Nov 15 20:25:10] motion_loop: Thread exiting [1] [INF] [ALL] [Nov 15 20:25:10] motion_cleanup: Calling vid_close() from motion_cleanup [1] [INF] [VID] [Nov 15 20:25:10] vid_close: calling video source cleanup [1] [ALR] [VID] [Nov 15 20:25:10] MMAL Camera cleanup [0] [NTC] [ALL] [Nov 15 20:25:11] main: Threads finished [0] [NTC] [ALL] [Nov 15 20:25:12] main: Motion terminating [0] [NTC] [ALL] [Nov 15 20:25:12] motion_remove_pid: Removed process id file (pid file). [0] [NTC] [ALL] [Nov 15 20:25:12] motion_remove_pid: Closing logfile (/tmp/motion.log). -
RE: Wanna buy Raspberry pi 3 toolkit.
Hey @Neha-Afreen. The Raspberry Pi itself doesn’t require much in order to run. You can buy one at Amazon pretty easily. You’ll need:
- Raspberry Pi 3
- USB cable for power
- HDMI cable for video
- MicroSD card with the operating system
You can get most of that together in a Complete Raspberry Pi Starter Kit
That should get you started with the Raspberry Pi portion of the project. Let us know when you’re ready for the carpentry part!
-
RE: Motion Detection with RaspiCam, Non-Module version
@bibi I haven’t tried it with a USB cam, but it should work. In the config file, there is a switch to throw if you’re using a USB cam (and different switches to throw if you’re using a network cam - which raises interesting possibilities).
My camera is mounted above the monitor & behind the one-way acrylic. My monitor is smaller than my acrylic by about 2" on a side. This is good in that it’s a very clean installation and you don’t see a camera when you look at the mirror. It’s bad in that it cuts down on the light reaching the camera, preventing the facial recognition from working.
-
RE: Calendar showing "in X day" wrongly
@creepwood If you’re not happy with the way the module calculates the dates, you’re welcome to write your own.
See, this way it’s not an argument. It’s a suggestion.
-
RE: raspberry-pi alternatives
@cowboysdude Possibly something like the Zotac Zbox? It’s probably overkill. And at that price… it’s more expensive than the rest of your hardware.
-
RE: Best way to mount frameless mirror to monitor?
@reidbarber If you’re not going to go through the mirror and into the wall, you have a couple options. One is you can have brackets that attach to your monitor and hold the mirror in place, top & bottom. These would tie the glass to your monitor and hold it in place by clips on the edges. Unfortunately, it means you can see the clips on the edge of your frameless mirror.
The other alternative is to mount some sort of bracket on the back of the glass that can be hooked over the top of the monitor. Without the bezel, my monitor is about 3/8" thick at the edge. A bracket that is roughly the width of the top edge of your monitor (in whatever orientation) that is essentially a u-shaped channel might do it. You’d want to attach the channel to your glass with a strong epoxy. At that point, the glass would just hang over the top edge of your monitor.
-
RE: Wall Mounts
@hologramicgirl I bought a relatively cheap aluminum french cleat from a hardware store. It claims it’s rated for 100 lbs and my mirror maybe weighs 30.
-
Motion Detection with RaspiCam, Non-Module version
First, I want thank @alexyak for his
motioncontrolmodule. Unfortunately for me, it doesn’t work on my Mirror due to new security controls put in place by the Node.js team. Apparently it’s not a wise move to let client-side Javascript access the webcam attached to your server. Who knew?In the end, I ended up seeking another solution. The Facial Recognition module didn’t work due to the reduction in light coming through the mirror itself. But I do get an image. I started browsing sites of people who have turned their Raspi into a security system. It turns out, someone ported the Motion framework to Raspberry Pi and called it MMAL-Motion.
After a lot of reading, I found a Wiki for MMAL Motion. Following the steps for Jessie, I did the following:
- Change to your home directory.
cd ~ - Install the library dependencies (just copy & paste into the terminal. I wouldn’t want to do this by hand)
sudo apt-get install -y libjpeg-dev libavformat56 libavformat-dev libavcodec56 libavcodec-dev libavutil54 libavutil-dev libc6-dev zlib1g-dev libmysqlclient18 libmysqlclient-dev libpq5 libpq-dev - Download the precompiled binary archive file:
wget https://www.dropbox.com/s/6ruqgv1h65zufr6/motion-mmal-lowflyerUK-20151114.tar.gz - Uncompress the archive file
tar -zxvf motion-mmal-lowflyerUK-20151114.tar.gz
This will put a configuration file called
motion-mmalcam-both.confand a folder calledmotionin your home folder. At this step you can test it if you like, but for my purposes I needed to make a few changes tot the config file. So, make a copy and edit the copy.
cp motion-mmalcam-both.conf motion.conf
nano motion.conf
I played around with the configuration quite a bit until I found one I liked. But for our purposes (turning the display on when someone comes near) you only have to make a few changes.
framerate 4- run the detection video at 4 frames per second
threshold 2500- increase the # of pixels to trigger the screen. We want them to get close to the mirror
minimum_motion_frames 2- Motion must be detected in 2 consecutive frames (at 4 FPS)
event_gap 60- This is important. This is how long in seconds after no motion the screen will turn off.
output_pictures off- Do not save images
ffmpeg_output_movies off- Do not record video
stream_port 0- Turn off remote viewing
webcontrol_port 0- Turn off HTTP control of camera
on_event_start vcgencmd display_power 1- Important! This is the command to turn on the screen
on_event_end vcgencmd display_power 0- Important! This is the command to turn off the screenSave your
motion.conffile and now you can test it out by entering./motion -c motion.conf. If you stay very still for a minute, the screen should turn off. Move close to the mirror, and everything should come back after a couple seconds. - Change to your home directory.
-
RE: Adding Modules... Please Please advise
Additionally, you are missing a closed square bracket in your configuration for the VoiceControl module. After you define your keywords, you need to close the array. The second to last line of your voicecontrol configuration is where it needs to go. Like so:
{ module: 'voicecontrol', position: 'bottom_left', config: { models: [ { keyword: "Show Camera", description: "Say 'Show Camera' to display camera", file: "showCamera.pmdl", message: "SHOW_CAMERA" }, { keyword: "Hide Camera", description: "Say 'Hide Camera' to hide camera", file: "hideCamera.pmdl", message: "HIDE_CAMERA" }, { keyword: "Selfie", description: "Say 'Selfie' when camera is visible", file: "selfie.pmdl", message: "SELFIE" } ] // **HERE** }, -
RE: Adding Modules... Please Please advise
@wjdw87 Okay, I finally had some time so I looked at the file you linked.
As @strawberry-3-141 said, you have an issue on line 100, part of the configuration of the camera module. You have:
config: selfieInterval: 3, // Time interval in seconds before the photo will be taken.You need to follow the config key with a JSON object, designated by curly braces. So the camera module section should look like so:
{ module: 'camera', position: 'top_center', config: { selfieInterval: 3 emailConfig: { service: 'gmail', auth: { user: '<xxx@xxx.com>', pass: '<xxx>' }, }, } },It doesn’t help that the config section is wrong in the README.MD in the camera module. I’ll see if I can’t get a PR to fix that.
-
RE: raspberry-pi alternatives
@papak69 Follow the link in my last post. It should be what you’re looking for.
-
RE: raspberry-pi alternatives
@papak69 An easy solution to the WiFi signal is to buy a USB extension or flush-mount kit. You can mount the extension to the outside of your frame and plug the WiFi adapter in there, where it will be unencumbered by the aluminum.
-
RE: 404 Error
@kpenrose47 I don’t know if that’s a copy & paste, but you’re missing a
/after thehttps:It should be
https://raw.githubusercontent... -
RE: Wall Mounts
I did the same as @Cato. A french cleat is easy and will hold much more weight than a picture hangar.
-
RE: The US Election
I’d rather not talk about it, honestly. This is one of the few places that is tightly focused on its intended purpose. I really would like to keep it that way.
Although a module to track polls and/or election results would be kind of interesting.
-
RE: Calendar showing "in X day" wrongly
@creepwood It’s possible that the script library counts in a more literal fashion than people do. In your example, your friend’s birthday on the 10th is “in two days” as people describe it. But it’s technically less than 48 hours. That might make the calculations get weird.
[shrug] It’s a theory.
-
RE: Jake's Magic Mirror (Done)
I think the issue with your “black mirror” is more an issue with lighting in front of the mirror. Turn the monitor off and put the mirror in a bright area. Preferably with strong daylight. I predict the “black mirror” issue will resolve itself.
-
RE: Halloween mirror ghouls anyone?
@frog You seem to be missing the
style='position...part.So:
config: { text: “<video src=‘vendor/skelloop.mp4’ autoplay loop style='position:absolute; top:100%;left:50%; height:200%’></video>” }