Commit Graph

1138 Commits

Author SHA1 Message Date
dependabot[bot] 60f2e3e1c7 build(deps): bump pillow from 8.3.2 to 9.0.0 in /scripts
Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.3.2 to 9.0.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/8.3.2...9.0.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-13 05:53:30 -05:00
Eric Callahan dd6a06e9de docs: update proc_stats documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-01-12 19:58:49 -05:00
Eric Callahan 4c99f99cf0 proc_stats: report system cpu usage
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-01-12 19:58:49 -05:00
Lukas Fink 693a34d562 docs: add 'off_when_shutdown_delay' documentation
Signed-off-by: Lukas Fink <lukas.fink1@gmail.com>
2022-01-12 19:58:25 -05:00
Lukas Fink 3cbc2c2ca8 power: add 'off_when_shutdown_delay' option
This option allows to delay switching off a power source after klippy
shuts down.

Signed-off-by: Lukas Fink <lukas.fink1@gmail.com>
2022-01-12 19:58:25 -05:00
Richard Mitchell cfd3d63a0d
wled: Add serial support for direct communication (#325)
wled: Add serial support for direct communication

Signed-off-by:  Richard Mitchell <richardjm+moonraker@gmail.com>
2022-01-12 19:56:14 -05:00
Eric Callahan 59fd35827e docs: add button documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-01-12 08:05:17 -05:00
Eric Callahan 4c087612d8 mqtt: allow internal access to API endpoints
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-01-12 08:05:17 -05:00
Eric Callahan 2025332e6f button: initial implementation
Adds support for GPIO buttons.  Each button is configured to render
a template when pressed and/or released.  The button event
templates recieve a context with  a "call_method" field, allowing
them to call nearly all Moonraker APIs.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-01-12 08:05:17 -05:00
Eric Callahan a652845843 moonraker: add register_component() method
Allow base modules to register themselves as components during
initialization.  This makes them accessible via lookup_component()
across the entire application.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-01-12 08:05:17 -05:00
Eric Callahan 27c65e0a64 application: support internal API consumption
Track registered endpoints and allow internal APIs calls through
their JSON-RPC method names.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-01-12 08:05:17 -05:00
Eric Callahan 3bd5f7edbd template: add support for async rendering
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-01-12 08:05:17 -05:00
Eric Callahan fc5e34096a gpio: add support for line events
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-01-12 08:05:17 -05:00
Eric Callahan 9346186337 gpio: refactor pin parsing
Return a dictionary of pin params rather than a tuple

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-01-06 11:56:41 -05:00
th33xitus 505c1bfdba metadata.py: fix parsing of IdeaMaker nozzle_diameter
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
2022-01-06 11:55:52 -05:00
th33xitus 6c8e3690a7 chore: remove unused import
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
2022-01-05 06:32:09 -05:00
th33xitus 2c732b7afa metadata.py: add parsing of filament name
This commit will add parsing of optional filament name metadata for:
- PrusaSlicer and it's derivatives
- Simplify3D
- Cura
- IdeaMaker

For Cura and IdeaMaker it is necessary to add a custom start g-code comment.
Cura:
;Filament name = {material_name}
IdeaMaker:
;Filament name = {filament_name1}

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
2022-01-05 06:32:09 -05:00
th33xitus d145442d4b metadata.py: add parsing of filament type
This commit will add parsing of optional filament type metadata for:
- PrusaSlicer and it's derivatives
- Cura
- IdeaMaker

For Cura and IdeaMaker it is necessary to add a custom start g-code comment.
Cura:
;Filament type = {material_type}
IdeaMaker:
;Filament type = {filament_name_abbreviation1}

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
2022-01-05 06:32:09 -05:00
th33xitus 20d3c9961d metadata.py: add parsing of nozzle diameter
This commit will add parsing of optional nozzle diameter metadata for:
- PrusaSlicer and it's derivatives
- Simplify3D
- Cura
- IdeaMaker

For Cura and IdeaMaker it is necessary to add a custom start g-code comment.
Cura:
;Nozzle diameter = {machine_nozzle_size}
IdeaMaker:
;Nozzle diameter = {machine_nozzle_diameter1}

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
2022-01-05 06:32:09 -05:00
Pedro Lamas 9d7baa1eb6 utils: fixes minor typo
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2021-12-28 14:13:27 -05:00
Pedro Lamas d997fd637a moonraker: fixes minor typo
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2021-12-28 14:13:27 -05:00
Pedro Lamas 05af4babb9 mqtt: fixes minor typo
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2021-12-28 14:13:27 -05:00
Pedro Lamas 7c5d840c1b zip_deploy: fixes minor typo
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2021-12-28 14:13:27 -05:00
Pedro Lamas 5f20dafadb docs: fixes minor typo
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2021-12-28 14:13:27 -05:00
Eric Callahan 1d1ce0671d docs: fix jinja2 example
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-12-28 11:05:15 -05:00
Eric Callahan adfe8a67b6 docs: fix error in mqtt power device documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-28 10:49:27 -05:00
Eric Callahan 0a541bbea1 docs: add documentation for the secrets module
Update the documentation for all relevant options that may
be resolved from secrets.

Signed-off-by:  Eric Calalahan <arksine.code@gmail.com>
2021-12-24 14:44:48 -05:00
Eric Callahan 1e440741da mqtt: add support for "secret" credentials
Deprecate the "password_file" option in favor of "password".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-24 14:23:05 -05:00
Eric Callahan c5fd863bb7 power: add support for secrets
The "user", "password", and "token" options are templates
that can resolve items stored in the secrets file.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-12-24 14:23:05 -05:00
Eric Callahan a269de5dc0 confighelper: add load_template method
This is an alternative to gettemplate that always returns a
template.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-24 14:23:05 -05:00
Eric Callahan a4f960d40c confighelper: implement deprecation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-24 14:23:05 -05:00
Eric Callahan 9dadf50ac6 templates: add support for secrets
Add the secrets module as a Jinja2 Environment global.
All templates will be able to access secrets as if it were
a dictionary.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-24 12:41:28 -05:00
Eric Callahan d498eefd13 secrets: initial implmentation
Add support for an external "secrets" file that may contain
usernames, passwords, and tokens.  This file may be in
"ini" or "json" format.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-24 12:41:28 -05:00
Eric Callahan f4e3803647 metadata: refactor thumbnail parsing
Check for "Prusa" style embedded thumbnails by default for
all slicers.  This is becoming a standard, as it is now available
in Cura, Ideamaker, and Simplify3D via plugins.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-23 06:38:13 -05:00
Eric Callahan 51ca383591 docs: add missing headers to config examples
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-12-22 19:50:25 -05:00
Eric Callahan 01245ea8a1 docs: document the publish_mqtt_topic remote method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-22 19:31:00 -05:00
Eric Callahan 92954245fa mqtt: implement a "publish_mqtt_topic" remote method
Allow Klipper to publish MQTT topics from gcode macros.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-12-22 19:31:00 -05:00
Eric Callahan 57b00cb33a docs: add a warning for tplink devices
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-22 12:46:54 -05:00
Eric Callahan 5f7c6d623c docs: update "octoprint_compat" documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-22 07:49:41 -05:00
Eric Callahan cc1a55a871 metadata: always create a miniature thumbnail
Don't require that gcode files embed two thumbnails.  When
a single large thumbnail is parsed use pillow to create a
small one.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-22 07:29:16 -05:00
Eric Callahan 5766d16edc octoprint_compat: default printer profile fix
Cura's Octoprint plugin expects an "axes" field for each profile.
Report these values to match the default values used by the
plugin.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-22 05:41:00 -05:00
Eric Callahan ec43f5e9b6 octoprint_compat: make UFP uploads optional
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-22 05:41:00 -05:00
Eric Callahan e2fb1cc931 octoprint_compat: add support for "print on start"
Cura's Octoprint plugin does not set the 'start' flag on uploads
when UFP is enabled.  Instead it waits for the upload to
finish then issues Octoprint's "file command" request.  Add
limited support for this API, mimicing how uploads are normally
handled.

Singed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-22 05:41:00 -05:00
Eric Callahan e46b4994d4 app: add support for empty responses
If a dynamic request handler returns None with "wrap_result"
disabled, set the return status to 204.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-21 18:12:27 -05:00
Eric Callahan b369173f94 app: refactor upload handler registration
Move upload handler registration out of the file manager.
Register the primary hander in the app module, and the
Octoprint Comptaiblity handler in octoprint_compat.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-21 16:53:33 -05:00
Eric Callahan ac9eaa7681 app: set the status to 201 for uploads
Set the location header when the upload returns a valid result.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-21 15:32:28 -05:00
Eric Callahan 3e70e4b4ce machine: report additional release info
Report information contained within a linux distribution's
release file if it exists.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-20 16:58:21 -05:00
Eric Callahan 1333413db7 update_manager: fix pip location resolution
When creating a virtualenv, some operating systems provide
symbolic links back to /usr/bin/python3 rather than copy
the python exectuable over.  Previously Moonraker resolved
this symbolic link, resulting in a failure  to locate pip.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-20 12:30:26 -05:00
Eric Callahan 7d1cf435f7 authorization: report invalid "trusted_clients"
Add warnings that are reported to clients and logged if an
invalid trusted client is detected.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-20 08:37:54 -05:00
Eric Callahan 828be30466 docs: refactor [power] documentation
Separate the configuration for each device type, making it
easier for users to identify options specific for each
device.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-12-20 08:00:53 -05:00