Emit a single event where the first argument contains
a "JobEvent" enumeration that describes the particular
event. This reduces the number of callbacks registered
by JobState consumers and allows them react to multiple
state changes in the same callback.
The individual events remain for compatibility, however
they are deprecated. Current modules should be updated
to use the "job_state:state_changed" event and new modules
must use this event.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
These flags replace strings as constants used to register and
identify Request Types (ie: GET, POST) and API Transport
Types.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Some installations do not have Klipper's configuration
in the data path's "config" folder. Provide a way to
opt out of this check.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use EAFP techniques to test for directory read permission
during registration. If access fails continue with registration.
This allows users to potentially fix an issue without restarting.
Inotify failures always require a restart to resolve.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Introduce placeholders for the regex capture groups.
This reduces the length of the original pattern and
makes it easy to change the pattern for a return value
if necessary.
This change modifies the float pattern to accept any
float or integer.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Correction of the regex (Replacing the = with one: and adding the filament index for the regex to work).
Signed-off-by: Emmanuel WALDNER emmanuel.waldner@gmail.com
Create a websocket endpoint that allows clients identified as
agents to register remote methods with Klipper.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If the Klipper installation is not updatable (ie not a git repo)
abort reinstantion of the deployer.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use the low level os.open() method to open the vcio device. This
resolves "unknown ioctl" spamming of the kernel log.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Improve the efficiency of "vcgencmd get_throttled" by directly requesting
the status from the user space driver using ioctl. This should reduce CPU
spikes that result from forking the current process.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If the user creates or moves a folder that was is reserved
reserved correctly ignore or remove watches as appropriate.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Expose the UID assigned to webcams and allow clients to fetch, modify,
and delete items based on the UID. New additions must not specify a
UID.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Temperature Monitors may report null values as temperatures,
thus special handling is needed. This commit also reworks
temperature store updates to use the subscription cache
rather than perform its own caching of "last temps".
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Now that all subscriptions are cached it is no longer required for
the paneldue component to cache its own printer state.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This callback will only fire after a component has requested
a subscription, preventing early updates while the component
is waiting for the subscription request to complete. It is still
valid for components to register the "server:status_update"
event handler if this behavior is not a concern.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
A previous bug in the webcam module could have set boolean
values as integers. Make sure they are type correct when
reading webcams from the db.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
In Python a "bool" is a subclass of int. When introspecting
a webcam's attributes it is necessary to check for booleans
before integers.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use Moonraker's environment variables when generating the
env file for service validation updates.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This allows Moonraker to report anomalies detected in an updater
that won't prevent an update. Front ends may decide to present
these to users in a more subtle fashion so they know the state of
the repo without being concerned of an issue.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>