Giter Site home page Giter Site logo

brother_ql_fridgedate's Introduction

Gif

This whole project is still kinda sketchy. The goal is to attach a Raspberry Pi (or any other small board) to a Brother labelprinter and use it to print the current date onto a label, when a button is pressed.
Why? To stick it on food in your fridge. Ever lived in a shared appartment?

The script implements this topic with last-will message as indicator if it's still running:

dersimn/maintenance/LabelPrinter/online    -> bool

Sending anything to this topic will trigger printing of a new label with the current date:

dersimn/action/LabelPrinter/printdate    <- any string

Configure OpenHAB or mqtt-smarthome to trigger this topic when an Amazon Dash button is pressed.

Usage

Install Docker on your Raspberry Pi and use this command to run the script:

docker run -d --restart=always --name=labelprinter \
    --device=/dev/usb/lp0 \
    -e BROTHER_MODEL="QL-700" \
    -e BROTHER_LABEL="d24" \
    -e MQTT_HOST="10.1.1.50" \
    -e TZ="Europe/Berlin" \
    dersimn/brother_ql_fridgedate

Refer to the brother_ql documentation / source code for compatible printer models and label types.

Development

Local

docker run -d --name=mqtt -p 1883:1883 -p 9001:9001 -v "$(pwd)/contrib/mosquitto.conf":/mosquitto/config/mosquitto.conf:ro eclipse-mosquitto

docker run -d --name=webui \
    -v $(pwd)/contrib/webui.yaml:/www/data.yaml:ro \
    -e "WS_PROXY=host.docker.internal:9001" \
    -p 8000:80 \
    dersimn/mqtt-smarthome-webui

docker build -t test .
docker run --rm -e MQTT_HOST=host.docker.internal test python3 mqtt.py

Local with Docker Compose

docker compose up

Docker Hub deploy:

docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx build --platform linux/amd64,linux/arm/v7 -t dersimn/brother_ql_fridgedate -t dersimn/brother_ql_fridgedate:1.x.0 --push .

Credits

Philipp "pklaus" Klaus for his brother_ql package. Jim Lyles for the attached Vera font.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.