MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-octomirror-module @shbatm UPDATE Request

    Scheduled Pinned Locked Moved Solved Feature Requests
    2 Posts 1 Posters 332 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      bigzolly
      last edited by

      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

      B 1 Reply Last reply Reply Quote 0
      • B Offline
        bigzolly @bigzolly
        last edited by

        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:

        1. Open MagicMirror config.js and add a new line to the octomirror module config a new parameter called user: “username”, then save it.
        2. 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 = “”;
        3. Save it, and restart the mirror. That should fix the connection issue :)

        Hope it might help someone.
        bigzolly

        1 Reply Last reply Reply Quote 0
        • B bigzolly has marked this topic as solved on
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy