Skip to content

Instantly share code, notes, and snippets.

@morozgrafix
Created January 28, 2017 08:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save morozgrafix/db069203ac4d8635a0f27e3dfa52f532 to your computer and use it in GitHub Desktop.
Save morozgrafix/db069203ac4d8635a0f27e3dfa52f532 to your computer and use it in GitHub Desktop.
MagicMirror on $9 C.H.I.P. Installation Instructions

MagicMirror² on C.H.I.P

Prerequisites:

Issues/TODO:

  • I wasn't able to get display resolution to be set at full 1080p, I think it is possible to run 1920x1080 at 30Hz. Some additional info.
  • I wasn't able to rotate display 90 degrees into portrait mode
  • Display seems to go into standby mode after about 10 minutes even if Display Power Management is disabled.
  • npm install didn't install electron correctly and I had to remove and reinstall it manually.

Step by Step instructions:

  1. Go to flash.getchip.com and follow instructions to flash your CHIP. When prompted select GUI 4.4 No Limit image.

  2. After successful flashing power down your CHIP. Remove the jumper wire or paperclip if you used one from FEL to GND pins.

  3. Install HDMI shield and plug in HDMI Cable to CHIP and your monitor.

  4. Plug in USB Hub and connect USB Keyboard and Mouse.

  5. Plug in Power Adapter.

  6. After a few minutes your CHIP will boot into GUI interface.

  7. At this point we would need to connect to Wi-Fi. Follow this official guide to get connected. docs.getchip.com/chip.html#connect-to-wifi

  8. Once we are connected to the internet. It would be a good idea to update installed packages. Open the terminal: Computer Things -> Terminal Emulator and type the following command to retrieve list of packages (default username is chip and password is chip ):

    sudo apt-get update
    
  9. After it is done let's perform an upgrade. Run following command and answer Y at the prompt. This may take a little while.

    sudo apt-get upgrade
    
  10. After upgrades are done reboot CHIP Computer Things -> Log Out -> Reboot

  11. Disable Display sleep after 10 minutes. Computer Things -> Settings -> Power Manager -> Display and uncheck Handle display power management

    Issue That didn't seem to help and screen still goes into standby.

  12. Configure Timezone and Locale (more details on Language & Locales docs.getchip.com/chip.html#settings-and-configuration):

    sudo dpkg-reconfigure tzdata
    sudo apt-get install locales && sudo dpkg-reconfigure locales && sudo locale-gen
    
    
  13. Open terminal again and type following command to install git:

    sudo apt-get install git
    
  14. Clone MagicMirror git repo:

    cd ~
    git clone https://github.com/MichMich/MagicMirror.git
    
  15. Install node and npm (at the time of writing following versions were installed: node v6.9.4 npm v4.1.2):

    sudo curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    sudo apt-get install nodejs
    node --version
    curl -sL https://www.npmjs.com/install.sh | sudo -E bash -
    npm --version
    
  16. Copy config.js.sample to config.js:

    cp ~/MagicMirror/config/config.js.sample ~/MagicMirror/config/config.js
    

    Optional step: add your OpenWeatherMap location and API key to currentweather and weatherforecast module configurations.

  17. Install npm modules:

    cd ~/MagicMirror
    npm --install
    
  18. After installation is complete, let's try to run it:

    npm start
    

    Issue: At this point MagicMirror didn't start and I got an error that electron wasn't installed correctly and I was prompted to remove it and reinstall. YMMV ¯\_(ツ)_/¯ :

    rm -rf ~/MagicMirror/node_modules/electron
    npm install electron
    npm start
    

    After this I got a warning about unmet peer dependency related to grunt@1.0.1 and grunt-yamllint@0.2.0. I ended up reinstalling grunt as well:

    npm install grunt
    
  19. Enjoy your Mirror on C.H.I.P.

@jboudi
Copy link

jboudi commented Feb 14, 2017

Thanks for setting up this how-to. I've tried this on my CHIP with no luck.

I get the following error:
npm ERR! Linux 4.4.13-ntc-mlc
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v6.9.5
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! magicmirror@2.1.0 start: electron js/electron.js
npm ERR! Exit status 1

any suggestions on what I can do to fix it?

Thanks
Jason

@rnieto18
Copy link

Jason,

Are you attempting to run this via SSH?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment