Skip to content

Commit

Permalink
Readme, npmworkflow
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias@klein0r.de authored and matthias@klein0r.de committed Feb 25, 2020
1 parent 7ad456d commit ae8a768
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Adapter to connect OctoPrint to ioBroker

### 0.0.2

* (klein0r) fixed several issues
* (klein0r) fixed several issues, new class based structure

### 0.0.1

Expand Down
4 changes: 2 additions & 2 deletions io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "0.0.2",
"news": {
"0.0.2": {
"en": "fixed several issues",
"de": "Viele kleine Bugs behoben"
"en": "fixed several issues, new class based structure",
"de": "Viele kleine Bugs behoben, neue Struktur des Adapters"
},
"0.0.1": {
"en": "initial adapter",
Expand Down
14 changes: 7 additions & 7 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class OctoPrint extends utils.Adapter {
if (this.connected) {
if (id.match(new RegExp(this.namespace + '.temperature.tool[0-9]{1}.target'))) {
this.log.debug('changing target tool temperature to ' + state.val);

// TODO: Check which tool has been changed
this.buildRequest(
'printer/tool',
Expand All @@ -95,7 +95,7 @@ class OctoPrint extends utils.Adapter {
);
} else if (id == this.namespace + '.temperature.bed.target') {
this.log.debug('changing target bed temperature to ' + state.val);

this.buildRequest(
'printer/bed',
null,
Expand All @@ -105,13 +105,13 @@ class OctoPrint extends utils.Adapter {
}
);
} else if (id == this.namespace + '.command.printer') {

const allowedCommandsConnection = ['connect', 'disconnect', 'fake_ack'];
const allowedCommandsPrinter = ['home'];

if (allowedCommandsConnection.indexOf(state.val) > -1) {
this.log.debug('sending printer connection command: ' + state.val);

this.buildRequest(
'connection',
null,
Expand All @@ -121,7 +121,7 @@ class OctoPrint extends utils.Adapter {
);
} else if (allowedCommandsPrinter.indexOf(state.val) > -1) {
this.log.debug('sending printer command: ' + state.val);

this.buildRequest(
'printer/printhead',
null,
Expand Down Expand Up @@ -150,7 +150,7 @@ class OctoPrint extends utils.Adapter {
} else {
this.log.error('print job command not allowed: ' + state.val);
}

}
} else {
this.log.error('OctoPrint API not connected');
Expand Down

0 comments on commit ae8a768

Please sign in to comment.