Commit graph moonraker/moonraker
Author SHA1 Message Date
3062378a7b Merge branch 'master' of https://github.com/Arksine/moonraker 2026-01-17 22:45:51 +01:00
Eric Callahan
63672ea38b
mqtt: update static types to support client version 2.0 or greater
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2026-01-15 12:55:40 +00:00
Eric Callahan
d7df2876dd sysdeps_parser: add support for env exclusions
A list of system package exclusions may be set via the
MOONRAKER_EXCLUDED_PKGS environment variable.
In addition, a MOONRAKER_VENDOR enviroment
variable has been added to allow for manually setting
the vendor name.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2026-01-14 12:49:16 +00:00
Eric Callahan
bdeddcabad system_deploy: check update severity bits in info_code
The update severity is stored in the upper 16 bits of the info code in
newer versions of package kit.  Some backends may omit the lower
16-bits and only store the severity, in those cases use the update
severity enum value in place of the info value.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2026-01-14 12:49:16 +00:00
82ce1ff26f feat: add spoolman auth support 2026-01-14 06:22:14 +01:00
igiannakas
b3f9566b8b spoolman: fix filament accounting on MMU setups (happy hare, AFC)
Rebase E high-water mark on active spool change to prevent spoolman undercount after tool changes

Signed-off-by: Ioannis Giannakas <ioannis@my-spot.co.uk>
2026-01-06 10:33:38 -05:00
Pedro Lamas
5b92e52e29 metadata: filament_name and filament_type as array
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2025-12-13 12:46:00 -05:00
Michał Ciesielski
058517b5b4 json_wrapper: don't include spaces in encoded json
msgspec doesn't encodes into compact JSON, without spaces. Make default json.dumps do the same.

Signed-off-by: Michal Ciesielski <michal@ciesie.com>
2025-12-04 19:45:20 -05:00
Eric Callahan
960e933837
thirdparty: update packagekit enums
Add new packagekit enumerations.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-11-23 11:19:55 +00:00
Eric Callahan
be41e8ded6
system_deploy: fix Info enum instantiation
The info_code included in the package signal may
contain a "package_severity" value in the upper
16-bits.  Mask off the lower 16 bits to avoid an
instantiation error.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-11-22 15:39:11 +00:00
Javad Asgari Shafique
3129d89f0f simplyprint: increase connect timeout from 5.0 to 15.0 seconds
Signed-off-by: Javad Asgari Shafique <me@javad.sh>
2025-11-16 06:02:14 -05:00
Jonas Damtoft
abd2026b90 python_deploy: use --pre flag for pip beta channel
Signed-off-by: Jonas Damtoft <jonasdamtoft@gmail.com>
2025-11-10 07:53:36 -05:00
Eric Callahan
8426f4107c
simplyprint: avoid divide by zero in layer detection
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-10-20 10:47:57 -04:00
Eric Callahan
3eb575d0ec td1: add annotations future import
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-10-12 07:46:50 -04:00
Eric Callahan
f2bb93ffc4
common: use the 'data' field for agent error info
The JSON-PRC specs "data" as the correct field name for
extra error data.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-10-04 17:02:53 -04:00
martijnvanduijneveldt
5836eab233
proc_stats : Add support for cpu temperature readout on intel and amd
thermal_zone0 doesn't exist on amd, and can be wrongly mapped on intel
Detect correct thermal zone based on hwmon name, fallback to thermal_zone0

Signed-off-by: Martijn van Duijneveldt <martijnvanduijneveldt@gmail.com>
2025-10-02 14:20:01 -04:00
matszwe02
0775e3f4fc metadata: allow generating thumbnails for unknown slicer
This will allow for less common or newly created slicers to attach thumbnails into gcode, without a need to report as being a different slicer

Signed-off-by: Mateusz Szwedka <matszwe02@gmail.com>
2025-10-02 07:40:45 -04:00
Eric Callahan
1bc2189b72 common: improve agent error handling
Introduce an AgentError exception which contains error
details provided by the agent in response to a client
request.  These details are included in an "extra" field
of the error object in the response.

Use code error code 424 (Failed Dependency) when an agent
responds to a request with an error.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-10-02 07:30:54 -04:00
Eric Callahan
9098675ede td1: various cleanup
- Limit imports to those necessary during type checking
- Fix ambiguous annotations
- Remove calls to deprecated "datetime.utcnow"
- Rename TD1Protocol to TD1Connection
- Remove extraneous whitespace
- Remove duplicative "TD1._known_serials" class member.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-10-02 07:30:54 -04:00
jimmyjon711
e22da356d1 td1: Adding support for interfacing with TD-1 devices
Signed-off-by: Jim Madill <jcmadill1@gmail.com>
2025-09-25 05:53:38 -04:00
Eric Callahan
72ca7dbe05
asyncio_serial: add force option to set_read_callback
If force == true and None is passed as the read callback then
the existing reader will be closed and a new reader is created.
This can be used to exit an existing reader's iterator without
closing the serial connection.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-09-22 15:10:57 -04:00
Eric Callahan
596e7d9e79
async_serial: fix linter error
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-09-21 14:23:06 -04:00
Eric Callahan
3fe343db57
async_serial: allow custom read callbacks
AsyncSerialConnection consumers may switch between Stream Reader mode and callback mode to process incoming data.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-09-20 10:31:33 -04:00
Eric Callahan
a18a18c1b1
async_serial: add from_config static method
Allow AsyncSerialConnection class instantiation with or without a
ConfigHelper object.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-09-20 05:54:58 -04:00
Eric Callahan
00170f3505 pip_utils: bump pip version to 25.2
Python 3.7 and 3.8 are now EOL and not supported by the latest version
of Pip, so pip version pinning and updates required refactoring.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-09-16 07:47:32 -04:00
Eric Callahan
01963c45c1 metadata: improve handling of file encoding
The size of the file is not necessarily equal to the number of characters
read due to variable length utf8 encoding.  Read gcode files in binary mode then encode to a string.

When determining the "gcode start byte" and "gcode end byte" use
the length of the decoded string to determine the correct value.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-09-16 07:47:32 -04:00
Eric Callahan
fa90202eb9 metadata: support more PrusaSlicer thumbnail formats
Singed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-09-12 14:15:14 -04:00
Eric Callahan
df3965e896 python_deploy: bump pip refresh timeout to 10 minutes
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-09-12 14:15:14 -04:00
Eric Callahan
b9b1c899b3 app_deploy: refactor pip update check
Reduce time spent running "pip --version" by storing the version
info and last time checked.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-09-11 16:52:14 -04:00
Eric Callahan
29083b7c49
python_deploy: update pip prior to refresh
Packages updated via PyPI require a recent version of Pip
to perform the "dry run" installation used to determine
upstream version info.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-09-08 10:33:21 -04:00
Javad Shafique
52e315868b simplyprint: extend job_info with objects and job_id
- Restructered `exclude_object` handling to be sent over `job_info` as
  `skipped_objects`
- Append and track current job_id in `job_info` and `file_progress`
  messages
- Fixed old test-url (internal usage)
- Send `current_object` as `job_info.object`

Signed-off-by: Javad Asgari Shafique <me@javad.sh>
2025-08-31 12:24:24 -04:00
Eric Callahan
bbda9e2f55 simplyprint: forward exclude_object status
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-08-31 12:24:24 -04:00
Eric Callahan
f20feff6c6
job_state: refactor print start detection
Any transition to from an idle state to any state other
than "standby" should emit a started event.  This should
nearly always be a "printing" state, however it is possible
that Klipper's API server will not have a chance to push
a  "printing" status update if the print is immediately
paused, cancelled, or aborted due to an error.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-08-01 18:17:31 -04:00
Božo Dragojevič
77c9149348 git_deploy: Support relative paths in gitfile
When a git project managed by moonraker is a submodule of a superproject, gitfile
contains a relative path.

Resolve contents of the gitfile relative to the directory containing the gitfile.

Signed-off-by: Božo Dragojevič <bozzo.dragojevic@gmail.com>
2025-07-28 16:27:58 -04:00
Eric Callahan
cea6fbcf17
machine: fix typo in usb_id storage
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-07-26 14:05:49 -04:00
Thijs Triemstra
00720f5bf0
moonraker: fix typos in source
Signed-off-by: Thijs Triemstra <info@collab.nl>
2025-07-26 14:03:29 -04:00
Thijs Triemstra
46913913be
git deploy: fix typos
Signed-off-by: Thijs Triemstra <info@collab.nl>
2025-07-26 13:59:29 -04:00
Eric Callahan
206fd4828d
sysdeps_parser: add support for vendor specifier
Currently the vendor is only detected for systems running
Raspberry Pi OS and reported as 'raspberry-pi'.  This may be
used to filter Pi specific dependencies.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-07-23 19:28:01 -04:00
Eric Callahan
b1b515a1fb
power: fix linting error
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-07-16 06:39:08 -04:00
Eric Callahan
3df6a1eafd power: silence polling errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-07-15 10:35:12 -04:00
Eric Callahan
8d4244ba87 power: improve device initialization
Remove duplicate code and improve error handling
during device init.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-07-13 13:52:52 -04:00
Eric Callahan
3072882495 power: add device polling
Implement optional polling for devices that are not updated
asynchronously.  GPIO, RF, Klipper, and MQTT devices are
excluded.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-07-13 13:52:52 -04:00
Eric Callahan
a6862fba03 power: klipper device improvements
Avoid binding to the detected unit name of the Klipper
service, if available.  Exclude all async notifications
sent when  the device is processing a request.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2025-07-12 06:18:14 -04:00
Eric Callahan
8d67e65c7f power: process initial bound services for uhubctl and klipper devices
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-07-12 06:17:14 -04:00
Eric Callahan
a78e704b0d power: add restrict action processing option
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-07-12 06:17:10 -04:00
Eric Callahan
06cdffa169
application: disable websocket pinging for older versions of tornado
Version of Tornado prior to 6.5.0 have a bug that may
prematurely close websocket connections when pinging
is enabled.  Disable pinging for Moonraker's websocket
server and spoolman's client.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-07-08 06:24:45 -04:00
Julien Batonnet
3c1f31874a simplyprint: Improve progess calculation mimicing what's being done in Mainsail and Fluidd
Signed-off-by: Julien Batonnet <julien.batonnet@gmail.com>
2025-07-06 12:40:35 -04:00
Eric Callahan
826f0e3ea3
spoolman: fix ping timeout
Tornado client websockets treat the ping timeout differently
from server websockets.  The ping timeout should be less than
the ping interval.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-06-27 14:00:37 -04:00
Eric Callahan
bfdf2a91ef template: add debug logging environment global
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-06-27 10:41:04 -04:00
Eric Callahan
bd266cdce2 eventloop: store reference to all background tasks
Newer versions of Python can potentially destroy tasks
before they are complete due to garbage collection.   To
prevent this a reference to all created tasks are kept in
a set and removed when the task is done.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-06-27 10:41:04 -04:00