Skip to content

Commit

Permalink
Merge pull request #1 from shbatm/master
Browse files Browse the repository at this point in the history
Module cleanup and new live update features
  • Loading branch information
DongerZonie authored Jan 11, 2019
2 parents 32c1b73 + b3e6ba5 commit 5a7bb9d
Show file tree
Hide file tree
Showing 14 changed files with 2,596 additions and 193 deletions.
5 changes: 0 additions & 5 deletions .stylelintrc

This file was deleted.

11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# MagicMirror² octomirror-module Change Log

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

---

## [1.0.6] - Updates for OctoPrint v1.3.10

### Added

### Updated
- Updated Octoprint `packed_client.js` to current version.
- Updated module to obtain session id upon connection per changes made in OctoPrint
+ "auth (since 1.3.10): With the auth message, clients may associate an existing user session with the socket. That is of special importance to receive any kind of messages if the bundled Forcelogin Plugin is enabled (as it is by default), since it will prevent any kind of status messages to be sent to connected unauthenticated clients."
+ *[Source](http://docs.octoprint.org/en/master/api/push.html#sec-api-push)*

## [1.0.5] - Corrected exception state text for disconnected printer #3

### Added
- N/A

### Updated
- N/A

### Fixed
- The OctoPrint offline state text changed with foosel/OctoPrint@55d5df7.

Now the module detects the offline state correct again and does not display the long exception message.

## [1.0.4] - Updates from original module

### Added
- Added Temp Readouts, Auto-hide Option & Translations
- Added ability to disable camera stream
- Added live printer status updates
- Added push messages, console logs
- Added interactive option to disable file menus

### Updated
- Migrated to use OctoPrint Client JS Library

### Fixed
- N/A

63 changes: 61 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,69 @@
# Octomirror Module
This is a module for a Magic Mirror device that will interact with an Octoprint Instance.
# Module: Display & Control OctoPrint Instance (Octomirror-module)

This is a module for <a href="https://github.com/MichMich/MagicMirror">MagicMirror</a> that will interact with an Octoprint Instance.

The module will allow you to:
- View a live feed of the raspicam stream
- Start and stop prints
- View G-Code viewer
- Manually control the printer
- Recieve live updates on printer status

If you have any suggest, please let me know [by an issue](https://github.com/DongerZonie/octomirror-module/issues/new).

## Screenshot

![](https://raw.githubusercontent.com/shbatm/octomirror-module/master/img/capture.png)

## Requirements

* Raspberry Pi running an instance of Magic Mirror
* Another Raspberry Pi running an instance of OctoPi (or other OctoPrint instance)
* IP addresses for both (static IP preferred)

## Installation

````shell
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
````

## Using the Module

To use this module, add it to the modules array in the `config/config.js` file:

```js
{
module: "octomirror-module",
position: "middle_center",
config: {
url: "http://octopi.local",
api_key: "[Octoprint API Key]"
}
},
```

### Configuration Options:

| 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.
| `showStream` | *Optional* Whether or not to show the camera stream. By default a camera stream is shown, to disable, set to `false`;
| `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<br>*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. <br> *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.

## Development and Feature Requests

* If you have any feature requests or find any bugs, please post about it on the [MagicMirror Forum](https://forum.magicmirror.builders) or open an Issue on this repo.
* This module exposes the full client API for an OctoPrint instance and only displays the info that is useful to me at the moment, if there is something else you would like added, please let me know. The API is here:
- http://docs.octoprint.org/en/master/api/push.html
Binary file added img/capture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions jquery.min.js
1 change: 1 addition & 0 deletions lodash.min.js
47 changes: 0 additions & 47 deletions node_helper.js

This file was deleted.

Loading

0 comments on commit 5a7bb9d

Please sign in to comment.