Read the statement by Michael Teeuw here.
MMM-octomirror-module @shbatm UPDATE Request
-
Hi hello guys!
I would like to drop in some information that might help others and also throw in a request that might be able to be solved via a skilled one :)
I happened to use the octomirror-module by @shbatm for a pretty long time, but after a failure of my pi I was not able to make it work again until now. It’s a pretty lame error I did, but actually managed to solve that.
So basically if you see that you cannot get information by the printer, the reason could be that you have given the octomirror-module an application key but not a global key as it seems the module itself connect to the api without username and that is available only with using the global key. If the global key is used then everything still functioning properly.
However the global key will be deprecated in octoprint2.0. (notice at the API page).
Here comes the request part:
As I am not that competent in modifying this code, is it possible for someone to actually make it to use a username - application combination (pulled from config.js) to connect to the api, to make it future-proof?Thanks for reading. Have a great time :) And hope someone will find a solution :)
bigzolly -
Hi again!
Sorry for replying on my own post, but here is the solution I was able to make with a little modification, so I though I would gather these into a new message.
To make it work with username / api key combo:
- Open MagicMirror config.js and add a new line to the octomirror module config a new parameter called user: “username”, then save it.
- Open octomirror-module.js in the modules/octomirror-module directory, and modify this:
let user = “_api”, session = “”;
to this:
let user = this.config.user, session = “”; - Save it, and restart the mirror. That should fix the connection issue :)
Hope it might help someone.
bigzolly -