Commit Graph

2123 Commits

Author SHA1 Message Date
Eric Callahan 327441fd6b
confighelper: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:29:24 -04:00
Eric Callahan 9b0aec378e
common: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:29:04 -04:00
Eric Callahan 16c407e33c
app: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:28:45 -04:00
Eric Callahan 6f20150e6e
workflows: update linter action arguments
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 08:16:27 -04:00
Eric Callahan a39dbeadac
docs: update changelog
Note performance improvement for Raspberry Pi CPU
throttle detection.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 07:40:42 -04:00
Eric Callahan 8d0c8e4033
proc_stats: improve vcgencmd request
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>
2023-10-07 07:40:41 -04:00
Eric Callahan 65644bab8b
utils: add ioctl_macros module
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-10-07 07:40:41 -04:00
Eric Callahan 82dd2f3c1f
docs: add speedups documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 07:40:40 -04:00
Eric Callahan ffbb628ce2
scripts: add support for installing speedups
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 07:40:40 -04:00
Eric Callahan d4c4b64cd5
loghelper: add newline to stdout header
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 07:10:14 -04:00
Eric Callahan c4aaf43662
gitignore: replace .pdm.toml with .pdm-python
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 07:10:14 -04:00
Eric Callahan e073df40b0
zeroconf: detect appropriate ip version
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 07:10:13 -04:00
Eric Callahan e90691f168
build: bump zeroconf version
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 07:10:13 -04:00
Eric Callahan 0c23630e87
mqtt: don't instantiate futures directly
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 07:10:12 -04:00
Eric Callahan 3026a0c7e7
pyproject: add msgspec and uvloop as optional dependencies
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 07:10:12 -04:00
Eric Callahan 51f4d4b888
eventloop: add support for uvloop
Signed-off-by:  Eric Callahan <arskine.code@gmail.com>
2023-10-06 18:20:28 -04:00
Eric Callahan f99e5b0bea
utils: add support for msgspec with stdlib json fallback
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-10-06 18:20:28 -04:00
Eric Callahan 3ccf02c156
docs: update changelog
Note the fix for parsing inline comments.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-06 18:20:19 -04:00
Eric Callahan c50e61a25b
docs: update and clarify inline comment rules
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-06 12:35:43 -04:00
Eric Callahan 4329241949
confighelper: fix inline comment parsing
Require that inline comments be separated from configuration
data by whitespace.  Unescape comment specifiers that follow
the correct escape sequence.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-06 12:25:26 -04:00
SHID 52ee49eed3
metadata: add support for Moment Slicer
Signed-off-by: Sanghun Jung / Email: sanghun.id@gmail.com
2023-10-05 08:08:22 -04:00
Eric Callahan 0c6b4e0dad
file_manager: fix reserved path handling during runtime
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>
2023-10-05 07:59:23 -04:00
Eric Callahan a222ff0042
docs: update webcam API documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-03 07:41:32 -04:00
Eric Callahan a232260713
webcam: support lookup by UID
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>
2023-09-28 08:08:37 -04:00
Eric Callahan ee62d07c68
zeroconf: use route prefix for zeroconf/ssdp servers
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-09-22 07:55:10 -04:00
Eric Callahan d98f11b98e
docs: note route_prefix option
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-09-20 12:42:30 -04:00
Eric Callahan ae1d3b0393
app: implement route prefix option
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-09-15 16:33:05 -04:00
Eric Callahan 3d9052d711
git_deploy: detached head verification fix
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-08-14 08:13:51 -04:00
Eric Callahan fe120952ee
docs: note "include_monitors" arg for the temperature store
Signed-off-by:   Eric Callahan <arksine.code@gmail.com>
2023-08-03 07:57:36 -04:00
Eric Callahan 47f0f0c21e
data_store: add support for temp monitors
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>
2023-08-03 06:13:21 -04:00
Eric Callahan 797c62389d
docs: add links to Klipper's status reference
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-31 16:44:23 -04:00
Eric Callahan 8adda52df1
docs: update changelog
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-31 16:42:46 -04:00
Eric Callahan e433252934
paneldue: use cached subscription data
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>
2023-07-31 11:19:04 -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 7e85ac97c9
klippy_connection: cache subscription data
It is possible that a subscripition request can occur between
after Klipper updates a field's status, but before it pushes
a status update to the connection.  The result is a race
condiiton where the response to the subscription request
contains the lastest state but it is not propagated to
currently connected clients.

This is resolved by caching subscripiton data, diffing it
with the response to the subscription request, and
manually pushing the diff.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-30 15:35:13 -04:00
Eric Callahan 8ad19e6054
web_deploy: return repo name in status response
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-30 15:35:13 -04:00
Eric Callahan 6467cc6b89
klippy_connection: refactor KlippyRequest class
Wrap a Future instead of an Event, as we don't need to notify multiple
waiters. Additionally the future can return responses and raise exceptions
directly.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-30 15:35:13 -04:00
Eric Callahan c3697d0656
klippy_connection: apply a mutex to the subscription request
The subscripition request is reentrant in Klippy.  Sending multiple
requests from the same connection may create a race condition,
so use a lock to prevent reentry.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-30 15:35:12 -04:00
Eric Callahan 7c8d68c0a1
components: fix pycodestyle E721 warnings
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-30 15:34:56 -04:00
Eric Callahan f487de77bc
webcam: make sure db values are type correct
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>
2023-07-28 16:28:04 -04:00
Eric Callahan a22033ac49
webcam: fix boolean updates
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>
2023-07-28 15:24:38 -04:00
Eric Callahan 937c766ded
docs: add environment variable documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-26 07:29:41 -04:00
Eric Callahan 1857eecb36
install: use environment vars for service env file
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-25 19:36:18 -04:00
Eric Callahan 22d1fda655
machine: use env vars for service validation
Use Moonraker's environment variables when generating the
env file for service validation updates.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-25 19:35:43 -04:00
Eric Callahan a0a50442f7
server: add support for enironment variables
Allow all command line arguments to be specificed as an
environment variable.  If both the command line argument
and environment variable is present the command line argument
takes precedence.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-25 16:27:11 -04:00
Eric Callahan aebcd00f61
docs: note the anomalies field for update status
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-24 18:12:12 -04:00
Eric Callahan 5a0dde2017
update_manager: introduce anomalies field
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>
2023-07-24 16:57:44 -04:00
Eric Callahan 871c551134
git_deploy: remove untracked file warnings
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-24 15:30:25 -04:00
mista-funky fe52bc5b6d
power: tplink smartstrip fix
Correct the procedure for setting the child id for devices that control more than one outlet.

Signed-off-by: Rick Marino <rcmarino@gmail.com>
2023-07-22 06:34:29 -04:00
Eric Callahan 821f3c5161
docs: note unixsocket commandline option
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-22 06:17:57 -04:00