811 Commits

Author SHA1 Message Date
Eric Callahan
d721ec5d9c
update_manager: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:36:49 -04:00
Eric Callahan
6f6f535d6a
file_manager: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:36:16 -04:00
Eric Callahan
b4dfa5a4dd
zeroconf: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:35:58 -04:00
Eric Callahan
d25ddc954a
wled: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:35:29 -04:00
Eric Callahan
0afbefc962
simplyprint: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:33:56 -04:00
Eric Callahan
a28c7c3f93
power: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:33:20 -04:00
Eric Callahan
bfc7ea3635
notifier: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:31:58 -04:00
Eric Callahan
0e7c759bde
machine: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:31:41 -04:00
Eric Callahan
2a7594fc3b
job_state: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:31:15 -04:00
Eric Callahan
7219cc45a5
button: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:30:56 -04:00
Eric Callahan
0eae069666
announcements: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:30: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
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
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
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
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
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
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
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
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
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
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
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
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
1fadae885e
server: allow commandline unix socket configuration
Add a command line option that allows the installation to specify
the exact path to Moonraker's unix domain server socket.  The
default location remains at:

<data_path>/comms/moonraker.sock

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-22 06:17:56 -04:00
Eric Callahan
3e1919b46e
git_deploy: improve pristine detection
Detect untracked source files and modified files for each
configured repo.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-21 06:11:00 -04:00
Eric Callahan
9b1eed534b
update_manage: move web update deployer to its own module
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-14 12:43:57 -04:00
Eric Callahan
f46cc32be3
update_manager: move package management to its own module
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-14 12:40:18 -04:00
Eric Callahan
4f785cfca0
update_manager: clarify web client git warning
When the parent folder of a web client is a git repo note the specific
directory that contians a .git subdirectory.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-14 12:40:17 -04:00
Eric Callahan
db27fef6f2
git_deploy: only return tags merged in the remote branch
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-13 10:31:39 -04:00
Eric Callahan
0437d1623e
git_deploy: improve recovery implementation
After performing a recovery attempt to reset to the commit the
repo was at prior to the repo failure.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-13 08:22:29 -04:00
Eric Callahan
4443bfbd41
update_manager: improve package manager logging
Assign a custom prefix for the configured provider.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-13 07:58:41 -04:00
Eric Callahan
01141fa10e
git_deploy: validation improvements
Add a check for shallow repos and move validation logic to the
GitRepo class.  Additionally report the real number of commits behind.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-13 07:58:41 -04:00
Eric Callahan
51e3568aac
update_manager: add git repo instance detection
Use git-config to set track the current Moonraker instance managing a
a git repo.  If multiple  instances are detected log and create a repo
warning.

Singed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-13 07:58:40 -04:00
Eric Callahan
011179ca6d
git_deploy: improve submodule validation
Submodules contain a .git file that includes the path to the
actual repository folder.  Extract that path and use it for
lock file detection.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-13 07:58:40 -04:00
Eric Callahan
270c78d8af
git_deploy: refactor initialization
Use git-branch to determine current the current branch and
head state instead of git-status.  The former is a porcelain
command with guaranteed output.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-13 07:58:40 -04:00
Eric Callahan
3f1e9e397e
update_manger: log remaining refresh time on init
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-12 13:57:27 -04:00
Eric Callahan
1c16233da0
git_deploy: rollback improvements
Streamline the rollback defaults so only one dict object
is explicitly defined in "capture_state_for_rollback()".
Validate the rollback branch on detached heads before
setting it.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-12 13:57:26 -04:00
Eric Callahan
9651923f8e
git_deploy: fetch partial clones for hard recovery
It isn't necessary to download and decompress all blobs.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-12 13:57:26 -04:00
Eric Callahan
3e875b583c
git_deploy: add support for stable updates
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-12 13:57:25 -04:00
Eric Callahan
1a4480e74c
git_deploy: use versions utility
Use the newly implemented versions utility for git version parsing.
This allows for simple access to version information and
version comparison.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-12 13:57:25 -04:00