Add MMM-SenseHat third-party module for Raspberry Pi Sense HAT#3984
Add MMM-SenseHat third-party module for Raspberry Pi Sense HAT#3984GEmanuel2558 wants to merge 7 commits intoMagicMirrorOrg:developfrom
Conversation
…dule - Move module from modules/default/sensehat to modules/MMM-SenseHat - Rename main script to MMM-SenseHat.js and update Module.register name - Adjust logs, docs and config examples to follow MMM-* third-party conventions - Remove any changes to core files like CHANGELOG.md and config.js.sample
|
You need to put this on your own GitHub repo , and add it to the 3party module list, by editing the wiki here |
Made the module multi-instance safe: the node helper now tracks instances by identifier, keeps one polling loop per instance, and routes data/LED commands back to the correct frontend.
Improved error handling: Python spawn failures, non-zero exits, invalid JSON, and helper-reported errors are now forwarded as { error: ... } to the UI so the module can render a clear error state.
Added support for pythonName as an alias for pythonPath, to align with MMM-PythonPrint and make configuration more familiar.
Updated the README with details on multi-instance usage, Python path options (pythonPath / pythonName), and styling via .MMM-SenseHat .mmm-sensehat.
Thanks for the feedback! I moved this into a standalone third-party module: I’ll add it to the 3rd-party modules wiki as suggested, so this PR can be closed. |
|
Thanks for the review and guidance. Because of that, this PR is no longer needed, so I’m closing it now. |
Summary
This PR adds MMM-SenseHat, a third-party MagicMirror² module that integrates the official Raspberry Pi Sense HAT. It displays sensor readings (temperature, humidity, pressure, optional orientation) and can control the Sense HAT 8×8 LED matrix for status colouring or scrolling text.
The module lives entirely under
modules/MMM-SenseHatand does not modify core functionality.What’s included
modules/MMM-SenseHatMMM-SenseHat.jsidentifierso multiple MMM-SenseHat instances can coexistnode_helper.jsidentifierconfig.pythonPathandconfig.pythonName(alias, for familiarity with MMM-PythonPrint)python/reader.pyfrom sense_hat import SenseHat--readmode: reads temperature, humidity, pressure, orientation, accelerometer, gyroscope, magnetometernullvalues instead of crashingREADME.mdimages/mmm-sensehat-dashboard.pngimages/mmm-sensehat-hardware_1.jpgimages/mmm-sensehat-hardware_2.jpgUsage (short example)
Add to
config/config.js: