Commit Graph

2050 Commits

Author SHA1 Message Date
Eric Callahan 0f2e3d7c99
mqtt: fix whitespace error
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-28 12:32:34 -04:00
Eric Callahan 48cb177ef0
docs: update configuration and changelog
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-28 12:21:24 -04:00
Eric Callahan ac550bac24 mqtt: add support for tls connections
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-28 12:08:30 -04:00
Eric Callahan 5570ab02ee power: remove state check when performing job queue requests
Allow the device to refresh the state in the event that its stale.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-28 12:08:30 -04:00
Eric Callahan 1ab413e9bc mqtt: add support for paho client version 2.0
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-28 12:08:30 -04:00
Eric Callahan a802e10725
mqtt: support configurable status update interval
SIgned-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-28 06:03:12 -04:00
Eric Callahan 546a17f5d3
filelock: add missing newline
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-27 11:10:24 -04:00
Eric Callahan 7394a22c2d
filelock: fix type annotation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-27 11:08:18 -04:00
Eric Callahan 379a26600c
update_manager: use temporary file storage for iids
The default behavior of systemd is to remove shared memory
files when the user that created them logs out.  This breaks
instance ID tracking for most installations.  While its possible
to overcome this by changing the user type or the logind
configuration, these solutions required elevated privileges.
The simple solution is to store iids in a temporary file, with
access protected by a flock.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-27 10:52:22 -04:00
Eric Callahan 683d93a894
utils: add file lock utility
Uses linux flock to create lock files that can be used
to protect access across multiple processes.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-27 10:24:44 -04:00
David Zwart 02144b472a docs: more tweaks in remote API JSON formatting
Remote API docs tweaks. Some leading commas removed for JSON serialization. Also found an unclosed json section.

Signed-off-by: David Zwart <davidzwa@gmail.com>
2024-04-27 06:16:59 -04:00
David Zwart 763d987309 docs: fix remote API JSON formatting and url(s)
"Delete a webcam" section contained a wrong url. Some response examples were wrapped in result, and some others were not. I've removed "result": { } for consistency. Finally I've removed many leading commas causing problems with JSON deserialization.

Signed-off-by: David Zwart <davidzwa@gmail.com>
2024-04-27 06:16:59 -04:00
Patrick Schmidt c857e1a99f spoolman: Add spoolman response headers to proxy results
Added the response headers to the V2 response of the proxy implementation as a new field named "response_headers".

Signed-off-by: Patrick Schmidt <ps.patti1998@gmail.com>
2024-04-24 13:51:23 -04:00
Eric Callahan b631ec44bb
docs: update contributing documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-24 07:51:42 -04:00
Eric Callahan 2bf6d609cb
klippy_apis: add print/job request logging
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-24 07:22:19 -04:00
dependabot[bot] 5a60d64f04 build(deps): bump pillow from 9.5.0 to 10.3.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.5.0 to 10.3.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/9.5.0...10.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-23 19:55:27 -04:00
Eric Callahan 9447494bd5
file_manager: static type checking fixes 2024-04-19 11:28:01 -04:00
Eric Callahan 44a5600038
job_state; check stored state on disconnect
If Klipper disconnects while printing manually set the state
to "error".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-04 20:15:33 -04:00
Eric Callahan 99b97afc7d
simplyprint: fix layer detect divide by zero
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-03 10:47:34 -04:00
Pedro Lamas a3e4dac5fb docs: corrects canbus peripherals response example
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2024-03-16 05:23:24 -04:00
Eric Callahan affe196ff6
machine: move default allowed services to an asset file
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-03-15 15:07:29 -04:00
Eric Callahan 98bb40bd80
utils: add kernel version
Move the kernel version tuple calculation out of gpio.py into
the utils package so its available for any module that requires
it.  In addition, report the kernel version string with the distribution
info and log the platform in the rollover header.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-03-11 06:26:18 -04:00
Eric Callahan 10dfb0d477
update_manager: improve instance detection
Implement instance package wide for the update_manager.  This
only requires detecting multiple instances once and eliminates
costly calls to git.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-03-11 06:26:17 -04:00
bakatrouble 6b1b8c5102
metadata: support multiple filament lengths for prusaslicer
Signed-off-by: Aleksey Frolov <bakatrouble@gmail.com>
2024-03-05 19:42:59 -05:00
Eric Callahan f0ae51792f
power: add support for custom Homeseer ports
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-03-01 05:50:03 -05:00
Eric Callahan 9813011db2
build: pin smart_open to 6.4.0 or lower
This is a temporary workaround to resolve a bug in smart_open 7.0.
Moonraker does not depend on smart_open directly or use its
functionality, however `streaming_form_data` pulls in in.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-26 05:54:41 -05:00
Eric Callahan 0850c16b00
sensor: require the 'state_response_template'
The sensor configuration isn't useful unless the user configures a
template that calls "set_result" to update fields for the desired
template.  Remove the default payload template and require
that it be configured.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-24 06:05:07 -05:00
Eric Callahan 90e13c07f7
git_deploy: fix initialization regression
New repos have not yet saved the valid state, so it is necessary to
provide a default value when attempting to access the "is_valid"
field.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-24 05:40:33 -05:00
Eric Callahan 119f579a44
git_deploy: improve refresh error handling
Save repo state if an exception is raised during a refresh
attempt.   Add additional repo warnings with for better
descriptions regarding repo issues.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-23 18:22:38 -05:00
Thijs Triemstra aadff0d54e
docs: fix fluidd link
Signed-off-by: Thijs Triemstra <info@collab.nl>
2024-02-19 19:54:29 -05:00
Eric Callahan e87ab4a895
build: remove pdm.lock
Currently Moonraker's dependencies aren't managed by PDM.
Remove the lockfile and badge.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-02-17 14:00:16 -05:00
Kamil Domański 04b1103778 Allow configuring the update refresh window
This enables customizing the time of day within which periodic refresh occurs.

Previously docs said it happens between 12am-4am which is misleading,
because the code effectively allowed refresh until 4:59:59 AM.
The default window is now '0-5', which is practically the same as before.

The comment about checking every 24h hours has been fixed as well.
This hasn't been true since commit c4fa76f217

Signed-off-by: Kamil Domański <kamil@domanski.co>
2024-02-17 12:41:51 -05:00
Eric Callahan 65a8271925
spoolman: fix exception handling
Make sure the connection delay isn't skipped if the
error list is full.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-14 20:34:33 -05:00
Eric Callahan 67c98f6a76
announcements: push notification for internal announcements
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-07 10:55:41 -05:00
Eric Callahan f946e6a28d
sysfs_devs: implement mode query
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-03 11:47:23 -05:00
Eric Callahan 71b46cc768
build: bump preprocess-cancellation in pyproject
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:35:01 -05:00
Frank Tackitt d18021950d
build: bump preprocess_cancellation to 0.2.1
0.2.1 ensures that the exclude_object markers are the first
 non-comment g-code in the files, fixing issues with klipper adaptive
 meshing

Signed-off-by: Franklyn Tackitt <git@frank.af>
2024-02-01 10:34:08 -05:00
Eric Callahan 71517b255d
machine: dont allow usb id request to block initialization
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:28:20 -05:00
Eric Callahan 6ec37fdacc
docs: add new doc structure for peripheral requests
This adds a new structure for API documentation, making each
aspect visible and uniform.  The parameters, response, and
schema are collapsible, allowing for easier navigation.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:28:20 -05:00
Eric Callahan 931e88b9f0
docs: move to material theme
The material theme is more feature complete and flexibile,
providing better documentation for APIs and such.  This
commit is just the initial move.  The documents are functional,
but the layout and color schemes are subject to change.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:28:19 -05:00
Eric Callahan 948b842351
docs: add peripheral API documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:28:14 -05:00
Eric Callahan 145968af0f
sysdevs: report paths for all devices
While a hardware UART generally won't have symlinks in the "by-path"
and "by-id" folders, it is possible to configure udev to add them.
In addition, adding these fields makes the schema consistent.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:27:22 -05:00
Eric Callahan 6f4a0480f3
machine: add video peripheral API request
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:27:22 -05:00
Eric Callahan 522b4df989
sysfs_devs: add v4l2 video campture device detection
Signed-off-by:  Eric Callahan  <arksine.code@gmail.com>
2024-02-01 10:27:21 -05:00
Eric Callahan eb1599fa07
machine: add support for peripheral queries
Implement endpoints to query the following:
- Serial Devices (including Hardware UART)
- USB Devices using lsusb
- Klipper CAN Node UUIDs

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:27:21 -05:00
Eric Callahan 0fb997285b
sysfs_devs: hardware discovery utils using sysfs
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:27:21 -05:00
Eric Callahan d6c8d6d3a6
server: add method to get individual app args
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:27:20 -05:00
Eric Callahan 088a7e4e70
server: create a misc folder in the datapath
This folder contains miscellaneous files used by Moonraker
or other applications in the Klipper ecosystem.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:27:20 -05:00
Eric Callahan 2cebf5cc03
cansocket: utility for querying klipper can nodes
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:27:19 -05:00
Eric Callahan 61ea86033a
docs: update changelog and configuration docs
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-01-28 06:12:13 -05:00