Giter Club home page Giter Club logo

Comments (1)

OutsourcedGuru avatar OutsourcedGuru commented on July 21, 2024

I've just walked through the installation instructions and I have a test rig here with octo-client v1.1.1.

index.js (marked executable with chmod a+x index.js):

#!/usr/bin/env node

var OctoPrint = require('octo-client');

OctoPrint.printerState(function(response){
  console.log(response);
});

The Raspberry Pi 3B has OctoPrint v1.3.9 on it and a serial cable over to a Mega2560 board which I have removed. The board is powered on but within the OctoPrint interface, it is not connected yet. I have modified the API key as suggested in the instructions and the hostname is still octopi.local so I have left this alone in the config file.

./index.js
{ status: 'Printer is not operational' }

I now connect the cable and I press the Connect button in OctoPrint. The printer is now in the connected status.

./index.js
{ state: 
   { flags: 
      { cancelling: false,
        closedOrError: false,
        error: false,
        finishing: false,
        operational: true,
        paused: false,
        pausing: false,
        printing: false,
        ready: true,
        resuming: false,
        sdReady: false },
     text: 'Operational' },
  temperature: { tool0: { actual: 23.12, offset: 0, target: 0 } } }

So my rig looks like it is working.

from octo-client.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.