this post was submitted on 19 Dec 2023
21 points (92.0% liked)

Selfhosted

40219 readers
1525 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Hi fellow self-hosting lemmings,

In an SME setting, I'm looking for a service to regularly fetch mails from an IMAP server and print incoming mails and attachments on a local network printer based on rules (e.g., only print mails where the subject contains a specific word.)

Does a solution like that exist, ideally with a browser frontend to set it up?

Thank you!

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 11 months ago* (last edited 11 months ago) (5 children)

You might use Node Red with this node to obtain the attachments, then send to an IPP printer with this node.

[–] [email protected] 2 points 11 months ago* (last edited 11 months ago) (4 children)

Now this is an idea I like. Thank you so much, I never would have considered Node-RED for this application!

[–] [email protected] 1 points 11 months ago* (last edited 11 months ago) (1 children)

I actually use NR to keep an eye on my CUPS print queue for jobs waiting, and it sends a wakeup to a tasmota wall plug to turn on the printer and then turn it off in 5 minutes. This lets me have a network printer always ready, but not using power in idle. This might work in with your project.

spoiler[{"id":"6f4056a8.eb32","type":"inject","z":"f268801.6c137","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":250,"y":240,"wires":[["5e57130e.32c56c"]]},{"id":"5a7d9cb9.82e2ac","type":"html","z":"f268801.6c137","name":"","property":"payload","outproperty":"payload","tag":".list > tbody:nth-child(2) > tr:nth-child(1) > td:nth-child(1) > a:nth-child(1)","ret":"html","as":"single","x":370,"y":300,"wires":[["667f6421.e13924"]]},{"id":"5e57130e.32c56c","type":"http request","z":"f268801.6c137","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://10.10.251.50:631/jobs?","tls":"","persist":false,"proxy":"","authType":"","x":420,"y":240,"wires":[["5a7d9cb9.82e2ac"]]},{"id":"667f6421.e13924","type":"split","z":"f268801.6c137","name":"","splt":"\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":180,"y":380,"wires":[["836d047d.c5a41"]]},{"id":"836d047d.c5a41","type":"switch","z":"f268801.6c137","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"HP_LaserJet_4000_Series","vt":"str"},{"t":"null"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":380,"wires":[["474b85e1.a317ec"],[]]},{"id":"be8ec1f.57fad4","type":"Tasmota Switch","z":"f268801.6c137","broker":"4ba22e0f7edb8148","device":"tasmota_LJ4000","name":"","outputs":1,"uidisabler":false,"fullTopic":"","cmndPrefix":"","statPrefix":"","telePrefix":"","x":700,"y":380,"wires":[[]]},{"id":"474b85e1.a317ec","type":"trigger","z":"f268801.6c137","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"5","extend":true,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":510,"y":380,"wires":[["be8ec1f.57fad4"]]},{"id":"316b902c.639208","type":"comment","z":"f268801.6c137","name":"LaserJet 4k Wakeup on Print","info":"","x":140,"y":200,"wires":[]},{"id":"4ba22e0f7edb8148","type":"tasmota-mqtt-broker","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"keepalive":"60","cleansession":true}]

[–] [email protected] 1 points 11 months ago

I do actually use Node-RED myself for my zigbee home automation. Funny how it never crossed my mind to pick it up for this. It's perfect as I want a non-programmer to be able to maintain it.

I doubt my solution will be much more than ingest and print, but I'll report back. Still fighting to get that hp p3015 to do something over IPP...

load more comments (2 replies)
load more comments (2 replies)