Comments (1)
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octo-client.