1564 Commits

Author SHA1 Message Date
zkk
9c91d48cfb 修复切换WIFI后 ssdp无法扫描到问题
修复未获取到下位机版本号时会升级的问题
新增P800配置

Squashed commit of the following:
commit f20f64f6e27842a6a76302a8a9dff32d3db66cc9
Merge: f546156 b48fdc7
Author: zkk <1007518571@qq.com>
Date:   Sat Jun 21 11:17:37 2025 +0800

    Merge commit 'b48fdc708c052b6c4342db499307518db13d702b' into release
2025-06-21 13:57:16 +08:00
zkk
08648da7a4 实现下位机版本检测升级功能以及优化断电续打
# Conflicts:
#	config/moonraker.conf   resolved by f5461563b8a7a5a25470a8763b8513779dbff253 version
#	scripts/sync_dependencies.py   resolved by f5461563b8a7a5a25470a8763b8513779dbff253 version
2025-05-10 16:36:55 +08:00
zkk
2f184c317d 合并最新内容,适配开门检测机型
# Conflicts:
#	moonraker/components/file_manager/metadata.py   resolved by ada08d4574e13099a392bba4b3ebe34485807c0a version
2025-03-31 11:37:27 +08:00
zkk
797c5aa322 增加取消打印宏调用
Squashed commit of the following:

commit 3dbd8d3355059b4bb39d680b1a6deff9f6277c7e
Merge: 34c1604 ef2e38b
Author: zkk <1007518571@qq.com>
Date:   Thu Dec 19 17:07:14 2024 +0800

    Merge branch 'develop' of https://server.creatbot.com/Gitea/CreatBot/CreatbotMoonraker into develop

commit ef2e38b870357e74fd69710fa3b09fa38604feff
Author: ruipeng <1041589370@qq.com>
Date:   Thu Dec 19 11:01:45 2024 +0800

    新增取消打印宏命令

commit 34c1604d8c5a79e95e94f13c34b5635672df47d1
Author: zkk <1007518571@qq.com>
Date:   Tue Dec 3 14:33:32 2024 +0800

    关闭更新管理中指定节点的配置

commit d3355361dc7ff974a9fef25956adc2966ba58120
Merge: 333a789 9c00be2
Author: zkk <1007518571@qq.com>
Date:   Fri Nov 29 10:04:34 2024 +0800

    Merge remote-tracking branch 'origin/develop' into develop

commit 9c00be2f4e21f2738e4e59d92e5af4a335a258b6
Author: ruipeng <1041589370@qq.com>
Date:   Fri Nov 29 08:57:23 2024 +0800

    gcode文件切片信息显示适配CreatWare切片软件

commit 333a789469445f5cb60d29dc7ed24a2776db3385
Author: zkk <1007518571@qq.com>
Date:   Tue Nov 26 18:03:29 2024 +0800

    修复z高度保存的精度问题
2024-12-19 17:15:56 +08:00
zkk
75d52f9f56 添加支持CreatbotWare软件元数据的支持和修复断电保存z精度问题:
commit 34c1604d8c5a79e95e94f13c34b5635672df47d1
Author: zkk <1007518571@qq.com>
Date:   Tue Dec 3 14:33:32 2024 +0800

    关闭更新管理中指定节点的配置

commit d3355361dc7ff974a9fef25956adc2966ba58120
Merge: 333a789 9c00be2
Author: zkk <1007518571@qq.com>
Date:   Fri Nov 29 10:04:34 2024 +0800

    Merge remote-tracking branch 'origin/develop' into develop

commit 9c00be2f4e21f2738e4e59d92e5af4a335a258b6
Author: ruipeng <1041589370@qq.com>
Date:   Fri Nov 29 08:57:23 2024 +0800

    gcode文件切片信息显示适配CreatWare切片软件

commit 333a789469445f5cb60d29dc7ed24a2776db3385
Author: zkk <1007518571@qq.com>
Date:   Tue Nov 26 18:03:29 2024 +0800

    修复z高度保存的精度问题
2024-12-03 14:35:42 +08:00
zkk
9f32f0704a 添加开始打印的宏命令 2024-10-18 16:40:42 +08:00
zkk
7081bba5fd 更新提示优化
(cherry picked from commit defb4580255f96b5aa6b81f7c7188afe304bf7b1)
2024-08-15 15:32:52 +08:00
Eric Callahan
346a3d7c9d
history: fix default for unknown filename during migration
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-06-02 07:37:05 -04:00
Eric Callahan
f2f2c93aa1
history: check for null values during database migration
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-06-02 07:17:15 -04:00
Eric Callahan
4fe89d5571
database: don't warn on UUID mismatch
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-28 18:07:18 -04:00
Eric Callahan
7f89bd7d62 git_deploy: limit corruption detection
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-28 16:13:13 -04:00
Eric Callahan
3b1c21a72d
database: attempt to install lmdb if missing
When attempting a conversion, install the lmdb package if its missing.
This should resolve issues with containers or new installations that
want to migrate a previous db to sqlite.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-28 06:11:42 -04:00
Eric Callahan
5332eab258
database: skip invalid values when migrating namespaces
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-27 10:49:34 -04:00
Eric Callahan
fa1dc438fa git_deploy: add support for pinned commits
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-25 12:30:56 -04:00
Eric Callahan
bc34ebdff9 filelock: fix lockfile cleanup
Python 3.7 does not support the "missing_ok" argument
in pathlib.unlink().

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
e41a934f74 database: support legacy sqlite_master table
Sqlite versions older than 3.33.0 store schema information in the
sqlite_master table rather than the sqlite_schema table.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
6b31076a43 machine: skip validation for new installs
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
3f62bb6fb4 database: add backup, restore, and compact endpoints
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
0b1fce8a6d file_manager: minor type checking fixes
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
bb0266f5c4 app: replace dict with UserInfo throughout Moonraker
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
eddf47e4a3 authorization: use SQL tables to store user info
Add a UserInfo class which provides type annotations for each member.
This class easily converts to a dict or tuple, simplifying conversion
for usage in SQL statements.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
3f0d20ed8c history: use tables for history and totals storage
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
80c762074f database: migrate from lmdb to sqlite
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-18 08:03:47 -04:00
Eric Callahan
9d0d09de80 eventloop: add low level eventloop property
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-18 08:03:47 -04:00
Eric Callahan
76704feee4 sensor: add support for parameter configuration
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-15 07:31:57 -04:00
Eric Callahan
c5bf6e77a7
confighelper: type checking fix
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-14 20:08:40 -04:00
Eric Callahan
9c6048a759
confighelper: store deep copies of parsed options
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-14 18:05:19 -04:00
Eric Callahan
ddc0e76ffc power: add support for uhubctl devices
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-06 06:46:53 -04:00
Eric Callahan
81899e04fd sensor: add history field options
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-05 06:29:21 -04:00
Eric Callahan
b60e6dc311 spoolman: add history field tracking spool ids
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-04 08:16:37 -04:00
Eric Callahan
531028ef4f history: report user in job history
When possible record the name of the user that requested the
job.  The klippy_api's component now takes an optional user
argument in its "start_print" method.  This user is broadcast
in an event after a print request successfully returns.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-04 08:16:37 -04:00
Eric Callahan
1dfbffb422 history: add support for auxiliary fields
Allow other components to register custom fields tracked and reported
in job history.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-04 08:16:37 -04:00
Eric Callahan
b6896c7c0a common: add common history tracking implementation
The HistoryDataField class can be instantiated by any
component.  It can then be used to register additional fields
tracked in the job history.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-04 08:16:37 -04:00
Eric Callahan
e7d3f3e961 job_state: track and store most recent Job Event
Signed-off-by:  Eric Callahan <arksine.codee@gmail.com>
2024-05-03 08:22:41 -04:00
Eric Callahan
4b1a3b8792 sensor: minor refactoring
Remove dataclasses, refactor for consistency with
other components.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-03 08:22:41 -04:00
Eric Callahan
8d59c424d7 server: convert history a core component
The history component requires no specific configuration, is
generally always used, and has no dependencies that prevent
loading at startup.  Convert history to a core component,
making it eligible for lookup/use in optional components.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-03 08:22:41 -04:00
Eric Callahan
0f2e3d7c99
mqtt: fix whitespace error
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-28 12:32:34 -04:00
Eric Callahan
ac550bac24 mqtt: add support for tls connections
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-28 12:08:30 -04:00
Eric Callahan
5570ab02ee power: remove state check when performing job queue requests
Allow the device to refresh the state in the event that its stale.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-28 12:08:30 -04:00
Eric Callahan
1ab413e9bc mqtt: add support for paho client version 2.0
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-28 12:08:30 -04:00
Eric Callahan
a802e10725
mqtt: support configurable status update interval
SIgned-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-28 06:03:12 -04:00
Eric Callahan
546a17f5d3
filelock: add missing newline
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-27 11:10:24 -04:00
Eric Callahan
7394a22c2d
filelock: fix type annotation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-27 11:08:18 -04:00
Eric Callahan
379a26600c
update_manager: use temporary file storage for iids
The default behavior of systemd is to remove shared memory
files when the user that created them logs out.  This breaks
instance ID tracking for most installations.  While its possible
to overcome this by changing the user type or the logind
configuration, these solutions required elevated privileges.
The simple solution is to store iids in a temporary file, with
access protected by a flock.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-27 10:52:22 -04:00
Eric Callahan
683d93a894
utils: add file lock utility
Uses linux flock to create lock files that can be used
to protect access across multiple processes.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-27 10:24:44 -04:00
Patrick Schmidt
c857e1a99f spoolman: Add spoolman response headers to proxy results
Added the response headers to the V2 response of the proxy implementation as a new field named "response_headers".

Signed-off-by: Patrick Schmidt <ps.patti1998@gmail.com>
2024-04-24 13:51:23 -04:00
Eric Callahan
2bf6d609cb
klippy_apis: add print/job request logging
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-24 07:22:19 -04:00
Eric Callahan
9447494bd5
file_manager: static type checking fixes 2024-04-19 11:28:01 -04:00
Eric Callahan
44a5600038
job_state; check stored state on disconnect
If Klipper disconnects while printing manually set the state
to "error".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-04 20:15:33 -04:00
Eric Callahan
99b97afc7d
simplyprint: fix layer detect divide by zero
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-04-03 10:47:34 -04:00