Repository navigation
Version 1.11.0 “Lanston”: fortune, Home Assistant integration, container - #24
Merged
Merged
Conversation
With PRINTR_MQTT_DISCOVERY=off, Printr subscribes to its own retained discovery configs under the default prefix and publishes empty retained messages over them, so Home Assistant drops the device instead of keeping a ghost next to another integration (such as the Printr integration). Tested against Mosquitto: 9 retained configs, 0 after.
fortune: a fortune-cookie line from a built-in French or English list, or from the system fortune command (source: system). cow draws the cowsay bubble and cow in the printer's font. The system command is only looked up in the package locations (not the PATH), run without a shell or environment, with a fixed argument, a 2 s timeout and a length cap. cp858::normalize now drops control characters too (encode already did), so line wrapping counts exactly what is printed; a test checks that ESC/POS commands hidden in text never reach the printer. 56 blocks.
Home Assistant gets its own section after MQTT: the two ways in (Matteo Penaud's integration over the HTTP API, or MQTT discovery), a comparison and the advice to pick one (PRINTR_MQTT_DISCOVERY=off with the integration), then four automations ready to paste. The READMEs link to it. The container files now point to the guide instead of the README.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Printr 1.11.0 “Lanston”. Full list in the CHANGELOG.
Added
deploy/Dockerfileanddeploy/compose.yaml(Printr en conteneur : Dockerfile et compose.yaml #20, by Matteo Penaud).source: systemuses the realfortunecommand (fixed locations, no shell, time and length limits).Changed
Security
ctutils0.4.5 (RUSTSEC-2026-0385), tokio 1.54.1 (1.54.0 yanked).Tested: 167 tests; MQTT discovery cleanup against Mosquitto;
fortunecommand in a container with fortune-mod; deployed on the Pi and printed on the TM-T88V.