1687 Commits

Author SHA1 Message Date
Eric Callahan
a5d63db9a6
server: rename moonraker.py to server.py
Signed-off-by:  Eric Callahan <arksiine.code@gmail.com>
2023-02-21 18:05:01 -05:00
Eric Callahan
1e7be4598c
docs: add a changelog
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-21 16:54:29 -05:00
Eric Callahan
833519ecc3
docs: update file_manager documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-21 12:24:54 -05:00
Eric Callahan
dce3b9eaf5
file_manager: add metadata scan endpoint
Support manual scan requests for systems where inotify
does not function correctlly (network shares).  This endpoint
may also be used to force a rescan of files that have already
had an initial scan.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-21 12:10:56 -05:00
Eric Callahan
9178b3833c
file_manager: improve observer log message
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-21 07:33:45 -05:00
Eric Callahan
522fdab63d
metadata: simplify the S3Dv5 temp regex
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-21 06:24:17 -05:00
Eric Callahan
7845390dd1
file_manager: support uploading to symlinks
Previously Moonraker disabled writing to symbolic links, as
doing so would overwrite the link.  Moonraker now resolves
the link, overwrites the file, and manually emits a websocket
notification.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-20 20:42:19 -05:00
Eric Callahan
0f7b781f57
file_manager: process metadata changes when no observer is configured
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-20 19:49:48 -05:00
Eric Callahan
347c9f4d2b
file_manager: improve duplicate notifcation detection
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-20 19:36:58 -05:00
Eric Callahan
2fd668bf0d
file_manager: implement configurable fs observer
Currently the choices are "none" and "inotify".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-20 19:36:58 -05:00
Eric Callahan
1e97571aa8
file_manager: refactor attribute names
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-20 19:36:57 -05:00
Eric Callahan
7330c2c123
file_manager: add request notifcation fallback
Schedule fallback websocket notifications in the event that
inotify is unable to watch a file system.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-20 19:36:57 -05:00
Eric Callahan
51e307dbd6
file_manager: don't queue "create from move" events
Treat these events as if they were actual file write events.  They
will reset the node completion time and suppress the notifcation.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-20 19:36:56 -05:00
Christian Speich
45506647a7 metadata: Add support for Simplify3D v5
Signed-off-by: Christian Speich <christian@spei.ch>
2023-02-20 19:35:37 -05:00
Eric Callahan
3917c9cd56
docs: fix minor typos
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-20 17:47:39 -05:00
Morton Jonuschat
b2ba52ce3d
sensor: add support to track generic single value sensors
This feature implements a sensor component that can be used to
track/log generic sensors from multiple sources. Each sensor
can have properties like unit of measurement, accuracy and a
display name that help frontends display the tracked measurements.


Signed-off-by: Morton Jonuschat <mjonuschat+moonraker@gmail.com>
2023-02-20 17:43:41 -05:00
Eric Callahan
0a811b9e44
file_manager: cleanup coroutines on close
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-17 16:40:31 -05:00
Eric Callahan
36de982692
docs: document file manager API fix
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-17 15:04:04 -05:00
Eric Callahan
a8c82b4560
moonraker: bump API version for patch
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-17 14:28:18 -05:00
Eric Callahan
7dac9c3961
file_manager: queue move event notifications
It is possible for a move event to occur shortly after a directory
is created.  These events are not bundled as part of an operation
like "copy", so they should not be suppressed, however the
notification should be emitted after the "create_dir" from its
parent is emitted.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-17 12:29:10 -05:00
Eric Callahan
d39792b84e
file_manager: allow concurrent inotify processing
All of the awaitable calls in the inotify loop only block to
postpone notifications.  Only gcode notifications require async
processing due to metadata analysis.  Queue these notifications
while allowing inotify events to be received concurrently.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>

fix
2023-02-17 08:24:55 -05:00
Eric Callahan
9f08aad6f6
file_manager: improve notification sync
Most requests do not require waiting for inotify to process the
file event before exiting.  Rework the NotifySyncLock to make this
optional.  Replace the write mutex with the sync lock itself,
a guarantee that the synchronization state is cleaned up when
a request is complete.

This implementation avoids potential deadlocks or long wait times
when inotify is not enabled on a file system.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-16 19:37:34 -05:00
Eric Callahan
87dba2f2e2
template: handle render exceptions
Re-raise as either a ServerError or ConfigError as appropriate.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-14 14:13:06 -05:00
Eric Callahan
a40dae2bc8
file_manager: improve klipper config detection
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-13 15:33:04 -05:00
Eric Callahan
bec9a66411
klippy_connection: fix regression in state reporting
Moonraker should only force the state to report as "startup"
when Klippy is connected and it hasn't detected a transition
to startup.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-11 11:43:18 -05:00
Eric Callahan
dbd1b4ac1b
github: increase the max line length to 88 characters
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-11 11:43:17 -05:00
Eric Callahan
9b9a6d0646
http_client: remove escape_url method
This method will not work correctly if any individual part contains
a special character.  For example, if an item in the path contains
a "#", the regex will return an incorrect result.  Likewise, if any item
in a query string contains an "&" the query string will be correctly
escaped.

All urls supplied to the http client must be escaped by the consumer.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-11 11:43:17 -05:00
Eric Callahan
0b4e604c95
webcam: remove call to escape_url
The configured url should already be escaped.  It isn't possible to
reliably quote a full url if any of the parts contain special characters.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-11 11:43:16 -05:00
Eric Callahan
5661b0216c
simplyprint: remove call to escape_url
The url received from SimplyPrint should already be escaped.  It
isn't possibly to reliably quote a full url if any of the parts contain
special characters.

This commit also corrects some minor type checking issues.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-11 11:43:16 -05:00
Eric Callahan
55ebe120c5
power: resolve url encoding issues
Dynamic parts of the url must be encoded individually to
guarantee correct url generation.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-11 11:43:15 -05:00
cmerkle
0de712e822
power: add support for Hue device groups
Signed-off-by: Clayton Merkle <clay.merkle@gmail.com>
2023-02-09 11:15:27 -05:00
Eric Callahan
5325693ed6
machine: report provider in system_info
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-08 17:44:57 -05:00
Eric Callahan
8c7b93c6dd
machine: fix supervisord active state reporting
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-08 17:00:39 -05:00
Eric Callahan
25d2ad4af6
docs: update SimplyPrint documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-08 16:34:18 -05:00
Eric Callahan
3710d49f46
docs: various small updates
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-08 16:32:45 -05:00
Eric Callahan
c5c6366a84
docs: document shutdown_action option
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-08 11:11:35 -05:00
Eric Callahan
ea4ec1f424
scripts: add halt polkit rules
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-08 11:11:34 -05:00
Eric Callahan
8010f1dda2
machine: add shutdown action option
Signed-off-by:  Eric Callahan <arkisne.code@gmail.com>
2023-02-08 11:11:34 -05:00
Eric Callahan
f0b82afde4
machine: remove unnecessary supervisord handlers
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-08 06:02:25 -05:00
Eric Callahan
645f0c9acf
machine: add container detection logging
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-08 06:00:01 -05:00
Eric Callahan
d70dfaeebd
docs: update machine config documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-08 05:42:30 -05:00
Eric Callahan
b02224485e
machine: rename supervisord provider
This is a cli providers, so rename it to supervisord_cli.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-08 05:36:57 -05:00
Eric Callahan
d9579c9374
shell_command: allow optional success codes
Some commands may return codes other than zero on a successful
return.  Allow callers to specify an optional list of return codes that
will return success without raising an exception.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-07 19:10:18 -05:00
Eric Callahan
c69441955a
machine: support supervisord service info extraction
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-07 19:10:17 -05:00
Eric Callahan
5aa645f974
machine: simplify extract_service_info() call
Don't require the caller to specifiy properties, use the default
property list if not specified.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-07 19:10:17 -05:00
Eric Callahan
2fb136449a
machine: fix supervisorctl command arguments
According to the supervisord documentation the `-c` option is used to
specify the configuraiton file.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-07 19:10:17 -05:00
Eric Callahan
8335906443
machine: automate supervisord process init
Don't hardcode klipper and moonraker, detect them along with all other
allowed services.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-07 19:10:16 -05:00
Eric Callahan
5807757efa
Revert "announcements: enable dev_mode when the debug flag is set"
This reverts commit 83e0947d312e44843807777bfee504aab48de89a.
2023-02-07 19:09:14 -05:00
Eric Callahan
0db655b9d6
github: update lint workflow
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-07 11:29:37 -05:00
Eric Callahan
385b9a1b7a
update_manager: handle rev-list on tagless repos
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-07 11:20:08 -05:00