Skip to content

framboise-pi/MMM-MySenseHat

Repository files navigation

MMM-MySenseHat

Magic Mirror Raspberry Pi Sense Hat Module
Please support open source coders ! It's really appreciated in this dark moments :p

Installation

Please check Wiki first for any questions, or error you experience.

I. First Step

Run these commands at your Magic Mirror root directory.

cd ~/MagicMirror/modules

git clone https://github.com/framboise-pi/MMM-MySenseHat.git

This command with MMM-MySenseHat folder (this will install dependencies)

npm install

II. Second Step

edit your config.js file from MagicMirror config folder

  
//////////////////////
// MY SENSE HAT
//////////////////////
modules: [
{
 disabled: false,
 module: "MMM-MySenseHat",
 position: "middle_center",  
  config: {
   read_interval: 2000,
   display_start_LED: true,
   use_SenseHat_LED: true,
   show_all_sensors: false,
   mode_monster: true, 
   mode_clock: true, 
   mode_pixel1: true, 
   mode_pixelv: true, 
   mode_temp: true, 
   cpu_load: true, 
   ram_used: true, 
   fontsize: "normal"//small | normal | large | xlarge 
  }
 }
]
----------------------------------------------------

Update

To update MMM-MySenseHat, go to the MMM-MySenseHat folder:

  • cd ~/MagicMirror/modules/MMM-MySenseHat
  • git pull
  • pm2 restart mm

What ?

I didn't find any sensehat module for the wonderful MagicMirror so I'm trying to make one. Using java librairies. I started a MagicMirror in python in parallel : MPMM (My Pi Magic Mirror), to use only python with sensehat and else, with the aim of making it working on a raspberry zero (Cause it don't work fine PiZero/MagicMirror).

V0.0.3 Modes on 8x8 LED (on interval with true/false options)

At start of MagicMirror a message will display (by default : "MAGIC")

  • check online : github version of this module. Displayed : current version | installed | info "UP TO DATE" or "UPDATE AVAILABLE" or "DEV VERSION"
  • 8x8 pixels little monsters (10 for the moment) -- color is random each time
  • 8x8 clock (hours and minutes colors are random)
  • 8x8 random PixelArt -- every pixel is random
  • 8x8 random PixelArt -- vertical symmetry left/right
  • temperature sensor value with 2 random colors scale
  • cpu average load - refreshed red dot line
  • ram usage - refreshed green dot line

Modes on MagicMirror

Sensors values displayed on a Magic Mirror module

  • humidity, temp, pression
  • or all 6 sensors

NOT IMPLEMENTED YET

  • 8x8 pixels animations
  • all LEDs on a color base on SenseHat temperature sensor
  • Use of joystick and sensors to interact with other modules. Or else.
  • Notifications - icons (gmail etc.)
  • cpu temp compared to 64°C ?
  • cpu speed compared to max ?
Check issues, I write there the ideas I will implement in future.

Started in May 2020.

License

MMM-MySenseHat is published under the GNU Affero 3.0 because I believe in open development. It comes with both rights and obligations. Whether you use this for your open or closed-source product, you must keep it open, and you must provide your compatible source code to end users upon request. The most straightforward way to comply with the license is to make a fork of this project on Github, perform your modifications, and direct users to your modified fork.

While we can't prevent the use of this code in products that are closed source or crippled by a patent, we would prefer that you choose another code or, better yet, make your own.

And ?

My MagicMirror has been made with a display undersized, so it leaves areas to place the SenseHat in a corner, for exemple.

Placed behind the mirror, it could be used to only add a colored light between the mirror and the wall, and with the MagicMirror module to display sensors info.

But I'm makin this module with the idea of a SenseHat in a front corner of the mirror.

Screenshots

VNC screenshot - Magic Mirror Module display

MMM-My-Sense-Hat-01

VNC screenshot - Magic Mirror Module display v0.0.3 and option all sensors off

My-Sense-Hat-module-notallsensors

clock example 1

My-Sense-Hat-clock-01

clock example 2

My-Sense-Hat-clock-02

clock example 3

My-Sense-Hat-clock-03

clock example 4

My-Sense-Hat-clock-04

sensor temp example 1

My-Sense-Hat-sensortemp-01

pixelart mirror mode example 1

My-Sense-Hat-mirror-01

pixelart mirror mode example 2

My-Sense-Hat-mirror-02

pixelart mirror mode example 3

My-Sense-Hat-mirror-03

pixelart mirror mode example 4

My-Sense-Hat-mirror-04

pixelart mirror mode example 5

My-Sense-Hat-mirror-05

pixelart mirror mode example 6

My-Sense-Hat-mirror-06

pixelart mirror mode example 7

My-Sense-Hat-mirror-07

pixelart monster mode example 1

My-Sense-Hat-monster-01

pixelart monster mode example 2

My-Sense-Hat-monster-02

pixelart monster mode example 3

My-Sense-Hat-monster-03

pixelart monster mode example 4

My-Sense-Hat-monster-04

pixelart monster mode example 5

My-Sense-Hat-monster-05

pixelart monster mode example 6

My-Sense-Hat-monster-06

pixelart monster mode example 7

My-Sense-Hat-monster-07

pixelart monster mode example 8

My-Sense-Hat-monster-08

cpu dotline mode example 1

My-Sense-Hat-reddot-01

cpu dotline mode example 2

My-Sense-Hat-reddot-02

pixelart random mode example 1

My-Sense-Hat-rnd-01

pixelart random mode example 2

My-Sense-Hat-rnd-02

pixelart random mode example 3

My-Sense-Hat-rnd-03

pixelart random mode example 4

My-Sense-Hat-rnd-04

pixelart random mode example 5

My-Sense-Hat-rnd-05

pixelart random mode example 6

My-Sense-Hat-rnd-06

pixelart random mode example 7

My-Sense-Hat-rnd-07

pixelart random mode example 8

My-Sense-Hat-rnd-08

Hello World ! - module at 'middle_center' position

MMM-My-Sense-Hat-02

Now

This is maintained (more precisely, its in dev. Some functionnalities are not yet implemented and some will be improved in future)

  • share your monster in pixel art, to add it in next version

Thanks

To all Magic Mirror community and to MichMich. This is how all mirrors should work in 2020.


Give support ! ( a chocolat viennois break | help me get sensors and Raspberry hardware)

paypal