This is a module for MagicMirror that will interact with an Octoprint Instance.
The module will allow you to:
If you have any suggest, please let me know by an issue.
cd ~/MagicMirror/modules
git clone https://github.com/shbatm/octomirror-module.git
cd octomirror-module
npm install
# A version of OctoPrint's JS Client Library is included by default, but it's
# recommended to replace it with your server's version.
# Replace 'http://octopi.local' with your OctoPrint's URL/IP
wget http://octopi.local/static/webassets/packed_client.js -O packed_client.js
To use this module, add it to the modules array in the config/config.js
file:
{
module: "octomirror-module",
position: "middle_center",
config: {
url: "http://octopi.local",
api_key: "[Octoprint API Key]"
}
},
Option | Description |
---|---|
url |
Required - The url or IP address for the OctoPrint Instance. |
api_key |
Required Your API Key from the OctoPrint service to be used. You can find this in Octoprint's Options>Features>API, while you're there also enable Cross-Origin-Resorce-Sharing. |
printerName |
Optional Add a name to show on top of the module; |
showStream |
Optional Whether or not to show the camera stream. By default a camera stream is shown, to disable, set to false ; |
maxStreamWidth |
Optional Maximum width for stream display in pixels. If set to 0, the stream's actual width is used Default: 0 (stream's width) |
maxStreamHeight |
Optional Maximum height for stream display in pixels. If set to 0, the stream's actual height is used Default: 0 (stream's height) |
streamUrl |
Optional Set a custom url for accessing the MJPEG camera stream. By default it uses: url:8080/?action=stream . |
showTemps |
Optional Whether or not so show temperature info Default: true |
showDetailsWhenOffline |
Optional Whether or not to hide the printer details when the printer is offline (file name, time, temps) |
interactive |
Optional Allow interactive control of the printer: choose files to print and upload new files. Default: true . Set to false to hide the drop downs, if you don't use the Mirror to control anything. |
debugMode |
Optional Prints all messages received from the printer socket to the console log, for debugging only and developing more features. |