Command line tool that parses the USB serial output of a Prusa printer and publishes the sensor values and progress to an MQTT server.
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
prusa2mqtt-0.5.tar.gz
(4.4 kB
view details)
File details
Details for the file prusa2mqtt-0.5.tar.gz
.
File metadata
- Download URL: prusa2mqtt-0.5.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcffea676f7c4d2f021e088f9d402f53bccc2eec06e18d7293206f2667c1a6ea |
|
MD5 | 9f808a0f0258fa8c63c5655925c46423 |
|
BLAKE2b-256 | 2a4afb53ac910d9fa376a1d68335c9322b6c35ff99bf5047bc9c791553313442 |