14 Commits

Author SHA1 Message Date
Eric Callahan
b836d618c9
spoolman: add a websocket connect
Connect to the spoolman sevice via websocket to receive
spool events.  In addition, this gives Moonraker a persistent
connection to know when the service is available.

Signed-off-by:  Eric Callahan  <arksine.code@gmail.com>
2024-01-21 08:24:00 -05:00
Eric Callahan
66de18f9b6
spoolman: really fix type checking this time
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-01-16 13:57:20 -05:00
Eric Callahan
8d6def7e41
spoolman: type checking fix
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-01-16 13:53:21 -05:00
Eric Callahan
15fed2e819
spoolman: check for deleted spools
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-01-16 11:57:53 -05:00
Eric Callahan
374516a00a
spoolman: remove class variables
Variables should be contained within the spoolman instance, as in the
future it could be desirable to support multiple instances.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-01-16 07:58:22 -05:00
Eric Callahan
a88468eb79
refactor: convert websockets into a component
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-01-13 15:15:15 -05:00
Eric Callahan
b18e9cc222
all: Replace strings with RequestType flags
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-12-16 16:21:20 -05:00
Eric Callahan
9ad8fed81e
spoolman: register announcement feed
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-12-02 07:44:40 -05:00
Eric Callahan
a71c5c159d
spoolman: filter spool_id before setting it active
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-24 19:32:24 -04:00
Eric Callahan
d3bab5de94
klippy_apis: support subscription callbacks
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>
2023-07-30 16:30:00 -04:00
Eric Callahan
93f473f629
spoolman: correct API registration
Internal Moonraker APIs must be registered with a top level path of
"server" or "machine".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-06-27 16:23:56 -04:00
Eric Callahan
a237ba3735
spoolman: add remote method to set active spool
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-06-26 16:52:13 -04:00
Eric Callahan
5d54a10177
spoolman: minor fixes
Set the minimum value for the sync_rate to 1 second, rather
than above 1 second.  When transitioning from a null spool
to a named spool clear tracked extrusion.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-06-26 16:38:19 -04:00
Donkie
4b9c836743
spoolman: Added basic spoolman integration
Proxies any request to the spoolman server. Records filament usage.

Signed-off-by: Daniel Hultgren <daniel.cf.hultgren@gmail.com>
2023-06-26 16:24:40 -04:00