Skip to content

Commit 93c4c36

Browse files
committed
stable release
1 parent 0d29e3c commit 93c4c36

35 files changed

Lines changed: 1665 additions & 2 deletions

‎.eslintrc.json‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"env": {
3+
"es6": true,
4+
"node": true,
5+
"mocha": true
6+
},
7+
"extends": "eslint:recommended",
8+
"rules": {
9+
"indent": [
10+
"error",
11+
4,
12+
{
13+
"SwitchCase": 1
14+
}
15+
],
16+
"no-console": "off",
17+
"no-var": "error",
18+
"prefer-const": "error",
19+
"quotes": [
20+
"error",
21+
"single",
22+
{
23+
"avoidEscape": true,
24+
"allowTemplateLiterals": true
25+
}
26+
],
27+
"semi": [
28+
"error",
29+
"always"
30+
]
31+
},
32+
"parserOptions": {
33+
"ecmaVersion": 2018
34+
}
35+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Something is not working as it should
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
1. Go to '...'
15+
2. Click on '...'
16+
3. Scroll down to '....'
17+
4. See error
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Screenshots & Logfiles**
23+
If applicable, add screenshots and logfiles to help explain your problem.
24+
25+
**Versions:**
26+
- Adapter version: <adapter-version>
27+
- JS-Controller version: <js-controller-version> <!-- determine this with `iobroker -v` on the console -->
28+
- Node version: <node-version> <!-- determine this with `node -v` on the console -->
29+
- Operating system: <os-name>
30+
31+
**Additional context**
32+
Add any other context about the problem here.

‎.gitignore‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.git
2+
.idea
3+
*.code-workspace
4+
node_modules
5+
nbproject
6+
7+
# npm package files
8+
iobroker.*.tgz
9+
10+
Thumbs.db
11+
12+
# i18n intermediate files
13+
admin/i18n/flat.txt
14+
admin/i18n/*/flat.txt

‎.npmignore‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.git
2+
.idea
3+
node_modules/
4+
nbproject/
5+
.vs*/
6+
*.code-workspace
7+
Thumbs.db
8+
gulpfile.js
9+
10+
test/
11+
travis/
12+
.travis.yml
13+
appveyor.yml
14+
.travis.yaml
15+
appveyor.yaml
16+
17+
.eslintrc.json
18+
.eslintrc.js
19+
20+
# npm package files
21+
iobroker.*.tgz
22+
package-lock.json
23+
24+
# i18n intermediate files
25+
admin/i18n
26+
27+
# maintenance scripts
28+
maintenance/**

‎.travis.yml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
os:
2+
- linux
3+
- osx
4+
- windows
5+
6+
language: node_js
7+
node_js:
8+
- '8'
9+
- '10'
10+
11+
env:
12+
- CXX=g++-4.8
13+
addons:
14+
apt:
15+
sources:
16+
- ubuntu-toolchain-r-test
17+
packages:
18+
- g++-4.9
19+
20+
before_install:
21+
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then CC=gcc-4.9; fi'
22+
- 'if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then CC=g++-4.9; fi'
23+
before_script:
24+
- export NPMVERSION=$(echo "$($(which npm) -v)"|cut -c1)
25+
- 'if [[ $NPMVERSION == 5 ]]; then npm install -g npm; fi'
26+
- npm -v
27+
script:
28+
- npm run test:package
29+
- npm run test:unit
30+
- export DEBUG=testing:*
31+
- npm run test:integration

‎LICENSE‎

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 bowao
3+
Copyright (c) 2019 bowao
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎README.md‎

100644100755
Lines changed: 127 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,128 @@
1+
![Logo](admin/epson_xp860.png)
12
# ioBroker.epson_xp860
2-
Reads the ink level from the epson xp860 printer website
3+
(German version see below)
4+
5+
## Description
6+
This is more an adapter-like helper script than a real adapter. Because the printer does not support the snmp-standard-printer-MIB, the ink status of the Epson XP860 is read from the printer's Web site. (Only if the printer is set to German)
7+
8+
It is an adaptation of the iobroker.epson_stylus_px830 adapter developed by Pix--.
9+
-> https://github.com/Pix---/ioBroker.epson_stylus_px830
10+
11+
Now it reads the ink levels of an **Epson Expression Photo XP-860** and in addition, it was converted into a **scheduled adapter**
12+
13+
![alt text](img/printer_website_1.png "Website of EPSON Expression Photo XP-860")
14+
15+
![alt text](img/printer_website_2.png "Website of EPSON Expression Photo XP-860")
16+
17+
## Configuration
18+
### IP / Port
19+
IP adress of Epson Printer within local network. The adapter will stop if no IP is entered. The port number is optional and will only be considered if an ip adress is entered.
20+
21+
![Screenshot Settings](img/epson_xp860SettingScreenshot.jpg "Screenshot Settings")
22+
23+
## Schedule
24+
The reading interval of the ink level can be set via the scheduling on the 'Instances' page. Default is every full hour.
25+
26+
![Screenshot Schedule](img/epson_xp860ScheduleScreenshot.jpg "Screenshot Schedule")
27+
28+
## Datapoints
29+
30+
ink_black
31+
ink_cyan
32+
ink_cyanlight
33+
ink_magenta
34+
ink_magentalight
35+
ink_yellow
36+
printerInfo.connection (type of connection, WLAN,LAN)
37+
printerInfo.ip
38+
printerInfo.mac
39+
printerInfo.model
40+
printerInfo.name
41+
printerInfo.requestResponded (True if printer responded on last request)
42+
printerInfo.responseTime (Response time of last request)
43+
44+
## VIS
45+
### Widget
46+
Example set of widgets for VIS (developed by Pix--)
47+
https://raw.githubusercontent.com/bowao/ioBroker.epson_xp860/master/widgets/ink_widget
48+
49+
![alt text](img/VISScreenshot.png "Example VIS Widgets")
50+
51+
## Beschreibung
52+
Dies ist eher ein Adapter-ähnliches Hilfsskript als ein echter Adapter. Da der Drucker die snmp-standard-printer-MIB nicht unterstützt, wird der Tintenstatus des Epson XP860 von der Website des Druckers gelesen. (Nur wenn der Drucker auf Deutsch eingestellt ist)
53+
54+
Dies ist eine Adaption des Adapters iobroker.epson_stylus_px830 entwickelt von Pix--
55+
-> https://github.com/Pix---/ioBroker.epson_stylus_px830
56+
57+
Nun liest der Adapter den Füllstand der Tintenpatronen eines **Epson Expression Photo XP-860** und zusätzlich wurde er zu einem **Zeitgesteuerten-Adapter** umgebaut.
58+
59+
![alt text](img/printer_website_1.png "Website of EPSON Expression Photo XP-860")
60+
61+
![alt text](img/printer_website_2.png "Website of EPSON Expression Photo XP-860")
62+
63+
## Einstellungen
64+
### IP / Port
65+
Die IP Adresse des Druckers im lokalen Netzwerk. Ohne Eingabe gibt es keine Abfrage. Die Portnummer ist optional und wird nur bei Eingabe einer IP-Adresse berücksichtigt.
66+
67+
### Schedule
68+
Der Abfrageintervall kann auf der Seite 'Instanzen' über die Spalte 'Zeitplanung' angepasst werden. Standardeinstellung: zu jeder vollen Stunde.
69+
70+
## Konfiguration
71+
![alt text](img/epson_xp860SettingScreenshot.jpg "Screenshot Einstellungen")
72+
73+
## Datenpunkte
74+
75+
ink_black
76+
ink_cyan
77+
ink_cyanlight
78+
ink_magenta
79+
ink_magentalight
80+
ink_yellow
81+
printerInfo.connection (Verbindungsart WLAN,LAN)
82+
printerInfo.ip
83+
printerInfo.mac
84+
printerInfo.model
85+
printerInfo.name
86+
printerInfo.requestResponded (Wahr, wenn der Drucker auf die letzte Anfrage geantwortet hat)
87+
printerInfo.responseTime (Antwortzeit der letzten Anfrage)
88+
89+
90+
## VIS
91+
### Widget
92+
Beispiel widgets für VIS (entwickelt von Pix--)
93+
https://raw.githubusercontent.com/bowao/ioBroker.epson_xp860/master/widgets/ink_widget
94+
95+
![alt text](img/VISScreenshot.png "Example VIS Widgets")
96+
97+
98+
## Changelog
99+
100+
### 1.0.0
101+
* stable release
102+
103+
## License
104+
105+
The MIT License (MIT)
106+
107+
Copyright (c) 2019 bowao
108+
109+
Permission is hereby granted, free of charge, to any person obtaining a copy
110+
of this software and associated documentation files (the "Software"), to deal
111+
in the Software without restriction, including without limitation the rights
112+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
113+
copies of the Software, and to permit persons to whom the Software is
114+
furnished to do so, subject to the following conditions:
115+
116+
The above copyright notice and this permission notice shall be included in all
117+
copies or substantial portions of the Software.
118+
119+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
120+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
121+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
122+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
123+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
124+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
125+
SOFTWARE.
126+
127+
---
128+

‎admin/admin.d.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare let systemDictionary: Record<string, Record<string, string>>;

‎admin/custom_m.html‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<script type="text/x-iobroker" data-template-name="template">
2+
<div class="row">
3+
<div class="col s2">
4+
<input type="checkbox" data-field="enabled" data-default="false"/>
5+
<!-- this field is mandatory, just to find out if to include this settings or not</span-->
6+
<span class="translate">enabled</span>
7+
</div>
8+
<div class="col s4">
9+
<input type="text" data-field="interval" size="30">
10+
<span class="translate">period of time</span>
11+
</div>
12+
<div class="col s4">
13+
<input type="text" data-field="state" size="30">
14+
<span class="translate">new state</span>
15+
</div>
16+
<div class="col s2">
17+
<input type="checkbox" data-field="setAck" data-default="false">
18+
<span class="translate">ack</span>
19+
</div>
20+
</div>
21+
</script>
22+
23+
<script type="text/javascript">
24+
$.get("adapter/template/words.js", function(script) {
25+
let translation = script.substring(script.indexOf('{'), script.length);
26+
translation = translation.substring(0, translation.lastIndexOf(';'));
27+
$.extend(systemDictionary, JSON.parse(translation));
28+
});
29+
30+
// There are two ways how to predefine default settings:
31+
// - with attribute "data-default" (content independent)
32+
// - with function in global variable "defaults". Function name is equal with adapter name.
33+
// as input function receives object with all information concerning it
34+
if (typeof defaults !== 'undefined') {
35+
defaults["template"] = function (obj, instanceObj) {
36+
return {
37+
enabled: false,
38+
interval: '5m',
39+
state: false,
40+
setAck: false
41+
};
42+
}
43+
}
44+
</script>

‎admin/epson_xp860.png‎

158 KB
Loading

0 commit comments

Comments
 (0)