I’ve tried your script. It seems it works. I had to remove /PRESENTATION/HTML/TOP/PRTINFO.HTML from the URL address, though. Here’s the output:
homeassistant@hassbian:~ $ sh /home/homeassistant/.homeassistant/includes/shell_scripts/get-ink-level.sh 192.168.0.202 '/Ink_Y.PNG/'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6925 100 6925 0 0 82310 0 --:--:-- --:--:-- --:--:-- 84451
14
homeassistant@hassbian:~ $ sh /home/homeassistant/.homeassistant/includes/shell_scripts/get-ink-level.sh 192.168.0.202 '/Ink_C.PNG/'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6925 100 6925 0 0 71486 0 --:--:-- --:--:-- --:--:-- 72894
2
homeassistant@hassbian:~ $ sh /home/homeassistant/.homeassistant/includes/shell_scripts/get-ink-level.sh 192.168.0.202 '/Ink_K.PNG/'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6925 100 6925 0 0 98655 0 --:--:-- --:--:-- --:--:-- 99k
70
homeassistant@hassbian:~ $ sh /home/homeassistant/.homeassistant/includes/shell_scripts/get-ink-level.sh 192.168.0.202 '/Ink_M.PNG/'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6925 100 6925 0 0 69900 0 --:--:-- --:--:-- --:--:-- 76944
100
14, 2, 70 and 100 are the current levels of yellow, cyan, black and magenta, respectively. Still not changed the cyan cartridge
Thanks for sharing!
Awesome - great it worked. I’m having issues getting this to work in my HASS instance. I think it has to do with me using SSL, Let’s Encrypt and DuckDns. It fails to execute the shell command when trying to hit my local epson IP. Really bizarre.
@timseebeck are you running ssl for your hass install?
In theory the ipptool method should work with any printer that speaks IPP, and possibly even non-network printers attached to CUPS servers, but I don’t have anything like that around to test the theory.
You would need to change the command for the other 3 inks. In my case I had to keep the /PRESENTATION/HTML/TOP/PRTINFO.HTML as on the epson 845 without that it takes you to a menu page.
desperately trying to get this to work, but i cant seem to get the command right:
I’m still on Hassio .62.1
I get through the setup without errors , but no output yet. Please forgive my asking, but how could these 4 commands , while being identical except for the .png file, get 4 different results? Don’t they ‘command’ the same??
this is what i get right now. Looking fine, no info of use though ;-(((
been ‘inspecting’ the html page of the above cartridge-status page, but it seems there’s no mentioning of any percentages. Might that explain the output-less outcome of the above scripts?
Does anyone of you see any percentages in the epson driver page at all? I only have these cartridge icons, and no reference in the underlying code…
you can set .png files as entity_picture (either in known_devices, in templates when using template sensors, or by using customize.
Icons are only useable with the mdi: icons
Just came across this. Thanks for the icons. I have a HP printer and was needing some nice icons for the ink, and I should be able to adapt some of this for my printer.
Hi @tarbax , I don’t own an Epson XP-900 so what I’m going to suggest has not been tested. It seems that black and photo black information cannot be properly split because Ink_K.PNG appears twice so I would suggest to modify the command a little bit: using head and tail commands. What about this?