How To: Set Up Magic Mirror on a Raspberry Pi 3

After electron deprecated the Pi Zero 32 bit version, my magic mirror was unusable and hacking it to make it work wasn’t working anymore. I had a raspberry pi 3 laying around and decided to replace the pi zero. Here are the steps I used to get my magic mirror up and running again!

1) Install 64 bit Raspberry Pi OS with Desktop
Latest steps are listed here!
https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit

2) Install Magic Mirror
After you have your raspberry pi OS up and running and you have completed all the prompts, connected to your wifi and updated the OS you can follow the steps on this link to install the magic mirror manually.
https://docs.magicmirror.builders/getting-started/installation.html#manual-installation

3) For the background image slideshow to work
Once you have installed your magic mirror, change directories into the modules directory /home/admin/MagicMirror/modules and clone the latest version of it here there.
* You can use something like FileZilla to SFTP into your raspberry pi and copy your background images into the exampleImages folder, deleting the stock images the module comes with.
* Use images smaller than your screen resolution, I use 1920×1080 because they fill my magic mirror completely.
* Also I would use darker backgrounds to keep the contrast of text to background, I like using images of space.
https://github.com/AdamMoses-GitHub/MMM-ImageSlideshow

4) Google Calendar
Go to settings of your google calendar and scroll down until you see the section below, DO NOT SHARE this link with anybody else or they will have access to your calendar! insert that link in the config.json file

5) Start Magic Mirror Automatically using PM2
Follow the steps here for setting up the mm.sh that running pm2 will launch at boot.
https://docs.magicmirror.builders/configuration/autostart.html#using-pm2

Other Tips
* I have an outlet timer connected to my LED screen and to my raspberry pi, it turns on at 7am and that turns on the screen automatically and the raspberry pi, then pm2 boots up magic mirror
* At 10:50 pm I turn off the raspberry pi by adding the command 50 22 * * * /usr/sbin/shutdown -h now to the roots crontab at sudo crontab -e this prevents the raspberry pi boot drive from being corrupted by the outlet timer suddenly shutting down.
* Lastly here is my config file, css, backgrounds I found and compliments json if anybody wants to check them out!
** the config file goes in /home/admin/MagicMirror/config
** the compliments file goes in /home/admin/MagicMirror/modules/default/compliments
** the CSS file goes in /home/admin/MagicMirror/css
** and the backgrounds go in /home/admin/MagicMirror/modules/MMM-ImageSlideshow/exampleImages

Workflow and Tips: For digitizing a large amount of old photos.

When we moved to the states, my parents brought with them from Mexico a large amount of old photographs, and also when my grandmother passed away, I inherited many more photographs. digitizing them was not easy task but here is my workflow and tips/scripts. Do it right the first time and do it once!

1) Get a good scanner and get good settings

I originally wanted to get the Epson FastFoto FF-680W but after reading about a lot of the problems I decided against it mainly that I doesn’t save as true tiffs and that after a while the rollers produce a vertical line on the scanned photos. After doing some research I settled on the V600, although scanning would have to be manual….
Produce placement links to buy me kombucha:
Epson FastFoto FF-680Whttps://amzn.to/3V4GGCp
Epson Perfection V600 https://amzn.to/3CCxez9

2) V600 Best settings

Manually selecting each photo on their GUI is a pain, and the auto-crop feature crops the border of your photos. So that was also not an option, scanning selected areas in the photos using their software was also MUCH slower than scanning a whole flatbed scan. So I resorted to scanning a 3-4 photos per scan and split them up later (see point #3). I used the professional setting, 800dpi as suggested by a reddit comment on the first link below, and 48-bit depth. his produced flatbed scans of about 300MB each.

  • Workflow
  • https://www.reddit.com/r/DataHoarder/comments/edezqi/need_to_digitize_photos/
  • https://www.reddit.com/r/DataHoarder/comments/p7esqv/scanning_old_photos_dpi_and_tiff_vs_jpeg/
  • https://www.reddit.com/r/DataHoarder/comments/owj6co/i_want_to_digitally_archive_120_years_of_family/
  • https://www.reddit.com/r/DataHoarder/comments/m4natr/need_to_scan_thousands_of_precious_family_photos/

3) Splitting and de-skewing the photos

For my job I do image analysis which involves single cell segmentation. Cropping photos and de-skewing them using python seemed like a no brainer given that image segmentation and modifications is what I do for a living. For this I wrote up a python function that would load all your images from a folder and one by one estimate edge/background of the photos, crop them and automatically de-skew them. This has worked beautifully on ~500gb of scanned whole flatbed scans, only failing around 5% of the time if photos are mostly white.
https://github.com/emmanuel-contreras/photography-tools

4 ) Creating thumbnails of the photos to share

After scanning all these photos, they take up about 300GB of data, I wanted to be able to share them with family and friends without each photo being ~70MB, so one of the functions on the python library down samples the photos by a scaling factor (2 times smaller, 10 times smaller) and outputs the smaller versions into a folder. This is also included in the repository above!

5) Store the originals safely!

CONGRATULATIONS! If you’ve made it this far you have digitized your older photos. Be sure to store them in a proper box with anti-humidify pads. if you ever need to re-scan them or scan them bigger you will have them.

Other Thoughts

Organizing all the photos is a major task on its own, I tried sorting them before scanning them and it proved to be too arduous of a task. my eyes would hurt after hours of trying to match photos of the same events. I instead decided to scan them all and worry about this later, so far I have decided to harness the power of macOS Photos application to do facial recognition and group photos by person, through machine learning. This is still a work in progress and will report back on how (un)successful this was!

Technology: Trying to use Elgato Video Capture device in 2022 (spoiler: don’t, video freezes)

I recently bought one of these at a thrift store for $4 to digitize some tapes. I tried using my newest PC (AMD 5600x 32gb ram) and the video would freeze a few seconds into playing it. if I opened OBS at the same time, the audio would cut out but the video would keep playing on the elgato software. I finally gave up, don’t waste your time getting this device working on newer computers.

To get this working, I did have a spare PC and a windows 7 CD so I installed it on that computer, and after a little playing around with it it worked as intended not surprisingly, although a bit buggy, sometimes video would freeze unless you wen’t back to the video screen. also rewinding causes the video to freeze. I get the feeling if the signal on the software drops even a little bit, it will freeze the display on the elgato software. What I ended up doing was pressing play and right away quickly pressing next through the various screens and quickly started the recording.

If you do want to use this device I would suggest getting a cheap pc with windows 7 but don’t waste your time on newer

Manual: Cyberpower K2 Skorpion keyboard

https://www.cyberpowerpc.com/page/Skorpion-K2/

RGB settings

fn + <key> | each one is a different setting

  • PB = sinusoid
  • SL = rainbow circle expanding outward (fn+left/right inverses direction)
  • PS = rainbow snake around keyboard
  • Ins = whole color rainbow
  • HM = exploding from key presses
  • PU = rainbow sinusoid across keyboard
  • Del = rainbow lines across keyboard (fn + left/right reverses direction)
  • End = preset color colors (fn+end to start edit mode, cycle through key colors, fn +end to exit edit mode)
  • PD = single color fading keys

speed up effects
Fn + plus/minus key

brightness
Fn + up/down

How To: Fix Asus router disconnecting Spectrum/Charter

Frequently my Asus router disconnects and loses signal and it takes a while to actually regain signal and sometimes I have to power cycle the modem. I had no idea why until recently I accessed the router admin page and saw that the internet section said: Your ISP’s DHCP does not function properly so I google around and realized that Asus routers have a DHCP Query Frequency setting and the default is “Aggressive“. Spectrum being the POS that it is sounds like it blocks the device from getting an IP address from too frequent polling. So I switched that setting to “Normal” as the suggestion on the links below and it appears to have fixed the problem!

Sources:
https://www.snbforums.com/threads/so-what-is-the-point-of-aggressive-dhcp-query-frequency.11738/
https://www.geekyramblings.net/2019/01/21/your-isps-dhcp-does-not-function-properly/

How to: Select a replacement power adapter for your electronics (e.g. for an Asus router)

Every once in a while I find a nice cheap ASUS router without a power adapter, hunting for the specific adapter that came with the router can be a pain and often times power supply prices are unreasonable. But it’s not necessary to buy the exact same one so you can find a much cheaper power supply. Here I will describe how to find a matching power supply for your router

Take a look below for a list of power supplies for ASUS routers, and if there is one missing send a comment and I’ll update it!

Read more

How to: Fix Microsoft Sculpt Mouse left button

I was sold a faulty mouse where the left button registers some of the clicks but not all. The seller refunded me my money but didn’t want me to return the keyboard to save on expenses. I disassembled the mouse and two screws were loose, so I suspect that the seller knew the mouse was faulty and tried disassembling it and sold it instead hoping the buyer wouldn’t catch it… tsk tsk…..

Upon disassembling the house further I saw that the type of switch that it needed. I was able to find it only on aliexpress. I measured it to be roughly 6x6x2.5mm so that is the part I ordered. It is advertised for a different microsoft mouse but probably was also used on the sculpt.

I’ll to put together a video of this repair when it arrives.


https://www.aliexpress.com/item/1005001949056219.html?spm=a2g0s.9042311.0.0.729e4c4dyx3i16

How To: Host Virtually Jackbox Games using Google Meet (with audio!)

Since the pandemic started, I’ve hosted virtual board games like jackbox game nights every Tuesday through google meet. After the first night hosting, I realized that google meet does NOT share pc audio for others to hear. People missed out on the goofiness of the jackbox games. By the next night, I was able to figure out a way to share the audio, which although a bit clunky it’s worked well.

You will need:

  • A laptop/desktop with the game
  • A phone

Setup overview

  • Laptop/Desktop
    • Jackbox Game Instance
    • Google Meet –> Video feed
  • Phone
    • Jackbox Game Controller
    • Google Meet –> Microphone feed

PC Setup

Step 1) Setup PC to share audio (using Stereo Mix) and Jackbox game

  • At the bottom right of your taskbar, right click on the speaker icon and select sounds

  • Click on the Recordings tab
  • Right click a blank area and press Show Disabled Devices

  • Look for the one that says Stereo Mix and enable it

  • Now Right click on Stereo Mix and make sure Listen to this device is checked off (not sure what this does exactly but that’s how I have it)

Step 2) Change Google Meet Call inputs to use Stereo Mix

  • Launch a new google meet call by going to https://meet.google.com/
  • Click on the three dots at the bottom right and select Settings

  • Now under AUDIO you should see Stereo Mix as an option, select it.
  • Whenever you want to share your pc audio change the Audio setting to Stereo mix and when you want to use your mic change it to your microphone.
  • Note: You can’t share both at the same time, and people won’t be able to hear you when sharing audio through Stereo Mix

You can now Share Window and select the window with the jackbox game.

You should now be:

  • 1) Sharing the audio from your computer
  • 2) The jackbox game window
  • 3) Your webcam from your pc if you chose to

Phone Setup

  1. Join the Google meet call on your phone
    1. Turn your video off
    2. Turn your mic on
    3. Keep the call in the background. In Android: press the back button or fling your finger upwards from the bottom
  2. Join the jackbox game
    1. Open a browser and go to jackbox.tv and join the game by inputting the code

Note: Having the call and the game going will drain your phone battery rapidly so make sure you keep your phone powered!

You should now:

  • 1) Be sharing your voice to the google meet call through your phone
  • 2) Able to play the game through your phone

If you’ve made it this far you are ready to have an awesome time with friends! I hope you found this helpful and stay safe!!

How To: Share PC Using Google Meet (Win 10)

I regularly host jackbox game nights using google meet and after the first night trying it out I realized that there was no easy way to share pc audio with others. Doing some research led me to the steps below which although a little clunky worked well. Some people have had luck using “Share window” and it also shares the window audio but that was not my case. I’ve listed below links to sources where people discuss this same issue. Some people have had luck using VB-Cable but this guide doesn’t show you how to use that.

Step 1) Enable “stereo mix” on your windows pc

  • At the bottom right of your taskbar, right click on the speaker icon and select sounds

  • Click on the Recordings tab
  • Right click a blank area and press Show Disabled Devices

  • Look for the one that says Stereo Mix and enable it

  • Now Right click on Stereo Mix and make sure Listen to this device is checked off (not sure what this does exactly but that’s how I have it)

Step 2) Change mic input on Google Meet Call

  • Launch a new google meet call by going to https://meet.google.com/
  • Click on the three dots at the bottom right and select Settings
  • Now under AUDIO you should see Stereo Mix as an option.
  • Whenever you want to share your pc audio change the Audio to Stereo mix and when you want to use your mic change it to your mic.
  • Note: You can’t share both at the same time, and people won’t be able to hear you when sharing audio through Stereo Mix

Sources:

  • https://www.reddit.com/r/jackboxgames/comments/flutlz/google_hangouts_plus_quiplash_quarantined_fun/?utm_medium=android_app&utm_source=share
  • https://support.google.com/meet/thread/23407453
  • https://support.google.com/meet/thread/36010293?hl=en
  • https://www.reddit.com/r/jackboxgames/comments/fl6tsn/screen_sharing_with_audio_via_google_hangouts_or/?utm_medium=android_app&utm_source=share