I'm a cybersecurity and programming enthusiast based in the UK, who loves writing about and filming projects.

My new Photocopier Monitoring Tools!!!

10 Aug 2023 » python, tech, linux

My photocopier ran out of ink. Right when we really needed it. So I came up with a hacky solution! I wrote a Python script using Selenium and BeautifulSoup that pulls the HTML from the copier’s web dashboard and selects the ink levels. It then determines whether or not to send a text to the user based on whether or not any ink level has gone below 10%. If so, an SMS is sent using Twilio which looks like this:

Copier ink is [LOW/EMPTY] - Yel 10%, Mag 56%, Cya 2%, Bla 79%

I run the script on a weekly cronjob on my Raspberry Pi server to alert us when new ink needs to be ordered. The script is made for Olivetti/Konica photocopiers and should work for most models made in the last few years (not sure exactly, perhaps a community made compatibility list would be good 🤣). Anyway, it works perfectly on my Olivetti MF223. I have also written another script, soon to be published, which gets the meter readings from the copier and automatically emails the copier maintenance/leasing company, which will run on a monthly cronjob. The repo is here: Ink-Monitor Let me know if you would like a more detailed code breakdown/runthrough - I’ll see what I can put together for the YouTube channel. Do leave your thoughts/experiences with hacky printer scripts in the comments, I’d be interested to hear if you’ve done anything similar.

P.S sorry for not posting for ages on here, I’ve been busy and have somewhat (very much) neglected this blog, and for that matter, the YT channel.