Skip to main content

prusa2mqtt

Command line tool that parses the USB serial output of a Prusa 3D printer and publishes the sensor values and progress to an MQTT server.

The difference between this script and the MQTT plugin for Octoprint is, that this script only connects once to the /dev/ttyACM0 port and the connection doesn't abort if you power down the printer.

Install:

pip install prusa2mqtt
prusa2mqtt --help
usage: prusa2mqtt [-h] [--topic TOPIC] [--client_id CLIENT_ID]
                     [--check_interval CHECK_INTERVAL]
                     [--serial_port SERIAL_PORT] [--mqtt_address MQTT_ADDRESS]
                     [--mqtt_port MQTT_PORT] [--mqtt_username MQTT_USERNAME]
                     [--mqtt_password MQTT_PASSWORD]
                     [--discrete_topics DISCRETE_TOPICS]

Log temperature data and progress from the USB port of a Prusa printer to an MQTT server.

optional arguments:
  -h, --help            show this help message and exit
  --serial_port SERIAL_PORT
                        Path to the serial port device. (default: /dev/ttyACM0)
  --topic TOPIC         Topic for the MQTT message. (default: prusa)
  --client_id CLIENT_ID
                        Distinct client ID for the MQTT connection. (default: prusa2mqtt)
  --check_interval CHECK_INTERVAL
                        Interval in seconds for checking the temperatures. (default: 5)
  --serial_port SERIAL_PORT
                        Path to the serial port device.
  --mqtt_address MQTT_ADDRESS
                        Address for the MQTT connection. (default: localhost)
  --mqtt_port MQTT_PORT
                        Port for the MQTT connection. (default: 1883)
  --mqtt_username MQTT_USERNAME
                        User name for the MQTT connection. (default: None)
  --mqtt_password MQTT_PASSWORD
                        Password name for the MQTT connection. (default: None)
  --discrete_topics DISCRETE_TOPICS
                        Post sensor data to discrete topics instead of one JSON payload. (default: False)

Send GCODE over MQTT:

You can also send GCODE to your printer if you publish something to $TOPIC/gcode

Metadata

Release files for prusa2mqtt 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prusa2mqtt 0.5
File Size Uploaded
prusa2mqtt-0.5.tar.gz 4.4 kB Details

Release files / prusa2mqtt-0.5.tar.gz

Download URL prusa2mqtt-0.5.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dcffea676f7c4d2f021e088f9d402f53bccc2eec06e18d7293206f2667c1a6ea
BLAKE2b-256 checksum
How to use checksums
2a4afb53ac910d9fa376a1d68335c9322b6c35ff99bf5047bc9c791553313442
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.5 This release

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page