Read ink fill level from Epson Printer

I've got a new Epson printer ET-2750.
Obviously this needs to be integrated into my node-red based home monitoring setup. I'm basically interested to collect a few parameters from the printer: ink level for the 4 colours, paper tray, these are the more important ones, but the appetite will grow once I get it working.

The printer supports a number of networking protocols which I might be able to use:
IPP: I have not figured out, if ink level monitoring is supported. I did not find it in the RFCs.
SNMPv3: same as above. And in addition I do not have a clue on how to use it, what to send and how to interpret the response.
HTTP: there is a Web interface, where ink levels are shown. From what I saw it displays an image and scales it according the fill level. I could probably work with this, but it will be a painful reengineering job.

Do you have comments about the protocols to investigate?
Do you have recommendations about which path I should explore?
Are there nodes to look at which might help?

Kind regards,

Urs.

Most likely Epson does not want us to read the ink level otherwise they would make an API available. Even in the configuration page in the HTTP server this information is not explicit (as it is an image, so quite hard to get level information). A possible, but painful, solution is using an http request node along with an html parser to scrap the interesting information. I did a testing in my L3150 and managed to get information on number of pages printed. It is very time consuming to find all the required selectors, at least for me that almost never did web page scraping.

Thanks Andrei
web page scraping: this is what I was afraid of. I will avoid that path as long as possible.

Just to report a small success here:
I went down the SNMP path.
Found the snmpwalk tool and let it hit the printer. et voila.
The EPSON printer seems to support the printer MIB.
Then checked the appropriate RFC3805, I'm getting closer.

The trick is to figure out the relevant OIDs for the ink level.
Found this one for the four tanks: 1.3.6.1.2.1.43.11.1.1.9.1
The values are 81, 88,88,88 which seems to be the level in % with black being at 81%, matches the web page of the printer.

Installed node-red-node-snmp
used the above OID and an inject node. et voila:

[{"oid":"1.3.6.1.2.1.43.11.1.1.9.1.1","value":81},{"oid":"1.3.6.1.2.1.43.11.1.1.9.1.2","value":88},{"oid":"1.3.6.1.2.1.43.11.1.1.9.1.3","value":88},{"oid":"1.3.6.1.2.1.43.11.1.1.9.1.4","value":88}]

Next steps is to send it to influxdb/graphana and make a nice dashboard, or use the built-in dashboard of node-red.

3 Likes

Just a status update:
I sent the data to MQTT, and from there to influxdb/grafana.
Within grafana I managed to visualise the data (I have absolutely no clue about SQL etc, but the interface is pointy/clicky, and this I can.)
The bars are correct. I am not able to figure out how to colour the bars in the ink colours yet, need to read up on this.


The journey continues...

I stopped going down the influxdb/grafana road. In the end I used the node-red dashboard. Here is the final result. Just to close off this thread.

3 Likes

And here is the flow for completeness, for those interested.

[{"id":"b39626da.ac06d","type":"change","z":"4b3124db.8bc61c","name":"black","rules":[{"t":"set","p":"topic","pt":"msg","to":"sensor/printer1/black","tot":"str"},{"t":"set","p":"oid","pt":"msg","to":"1.3.6.1.2.1.43.11.1.1.9.1.1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":1300,"wires":[["fcb23ac5.09fb1"]]},{"id":"fcb23ac5.09fb1","type":"snmp","z":"4b3124db.8bc61c","host":"192.168.11.144","community":"public","version":"2c","oids":"","timeout":5,"name":"printer","x":510,"y":1360,"wires":[["c5687504.381ed"]]},{"id":"d7363799.6899d8","type":"inject","z":"4b3124db.8bc61c","name":"get data 1/h","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"3600","crontab":"","once":false,"onceDelay":0.1,"topic":"sensor/printer1","payload":"","payloadType":"date","x":110,"y":1360,"wires":[["b39626da.ac06d","724a2b91.029824","7cb5225e.f58d84","534ffa97.983b34"]]},{"id":"724a2b91.029824","type":"change","z":"4b3124db.8bc61c","name":"cyan","rules":[{"t":"set","p":"topic","pt":"msg","to":"sensor/printer1/cyan","tot":"str"},{"t":"set","p":"oid","pt":"msg","to":"1.3.6.1.2.1.43.11.1.1.9.1.2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":1340,"wires":[["fcb23ac5.09fb1"]]},{"id":"7cb5225e.f58d84","type":"change","z":"4b3124db.8bc61c","name":"magenta","rules":[{"t":"set","p":"topic","pt":"msg","to":"sensor/printer1/magenta","tot":"str"},{"t":"set","p":"oid","pt":"msg","to":"1.3.6.1.2.1.43.11.1.1.9.1.3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":1380,"wires":[["fcb23ac5.09fb1"]]},{"id":"534ffa97.983b34","type":"change","z":"4b3124db.8bc61c","name":"yellow","rules":[{"t":"set","p":"topic","pt":"msg","to":"sensor/printer1/yellow","tot":"str"},{"t":"set","p":"oid","pt":"msg","to":"1.3.6.1.2.1.43.11.1.1.9.1.3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":1420,"wires":[["fcb23ac5.09fb1"]]},{"id":"c5687504.381ed","type":"change","z":"4b3124db.8bc61c","name":"mv data","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":1360,"wires":[["fc37ca26.cdbd1","6090a099.413068","69e8937d.a554bc"]]},{"id":"fc37ca26.cdbd1","type":"function","z":"4b3124db.8bc61c","name":"sensorStatus","func":"// Input:\n// msg.topic = sensor/printer1/black\n// msg.payload = 81\n//\n// Store in sensorStatus global variable:\n// sensorStatus.printer1.black = 81\n//\n// Output for inluxdb\n// msg.payload = {\"printer1\":{\"black\":81}}\n// msg.measurement = sensor\n\nvar stat = global.get('sensorStatus',\"storeInFile\")||{};\nvar parts = msg.topic.split(\"/\");\nvar sensor = parts[1];\nvar value = parts[2];\n\nif (typeof(stat[sensor])==\"undefined\") stat[sensor]={};\n\nstat[sensor][value]= msg.payload;\n\nglobal.set('sensorStatus',stat,\"storeInFile\");\n\n// create output for influxdb\nmsg.measurement = sensor;\nvar newPayload = {};\nnewPayload[value] = msg.payload;\nmsg.payload = newPayload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":830,"y":1360,"wires":[["a1450671.23d2b"]]},{"id":"a1450671.23d2b","type":"influxdb out","z":"4b3124db.8bc61c","influxdb":"17705ec2.e325d9","name":"","measurement":"","precision":"","retentionPolicy":"","database":"database","precisionV18FluxV20":"ms","retentionPolicyV18Flux":"","org":"organisation","bucket":"bucket","x":1000,"y":1360,"wires":[]},{"id":"6090a099.413068","type":"mqtt out","z":"4b3124db.8bc61c","name":"sensor/","topic":"","qos":"","retain":"","broker":"478a3533.38d8ac","x":820,"y":1320,"wires":[]},{"id":"db5c7c9a.d23858","type":"ui_chart","z":"4b3124db.8bc61c","name":"","group":"93adcb2d.cbd21","order":2,"width":0,"height":0,"label":"ink fill [%]","chartType":"bar","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#000000","#00fdff","#ff40ff","#fffb00","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":980,"y":1400,"wires":[[]]},{"id":"69e8937d.a554bc","type":"function","z":"4b3124db.8bc61c","name":"dataStatus","func":"var parts = msg.topic.split(\"/\");\nvar printer = parts[1];\nvar colour = parts[2];\nmsg.topic = colour;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":830,"y":1400,"wires":[["db5c7c9a.d23858"]]},{"id":"17705ec2.e325d9","type":"influxdb","hostname":"127.0.0.1","port":"8086","protocol":"http","database":"home","name":"influxdb","usetls":false,"tls":"","influxdbVersion":"1.x","url":"http://127.0.0.1:8086","rejectUnauthorized":false},{"id":"478a3533.38d8ac","type":"mqtt-broker","name":"central1","broker":"central1.local","port":"1883","clientid":"","usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"93adcb2d.cbd21","type":"ui_group","name":"EPSON ET-2750","tab":"4bfea25c.32fdc4","order":1,"disp":true,"width":"6","collapse":false},{"id":"4bfea25c.32fdc4","type":"ui_tab","name":"Printer","icon":"dashboard","order":2,"disabled":false,"hidden":false}]
1 Like

Very effective !

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.