Arksine
b0f781ec16
file_manager: serve Klipper's "docs" directory
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-23 06:17:23 -05:00
Matthias Neumayr
a2327a093b
Fixed error when reading Tasmota status response
...
Signed-off-by: Matthias Neumayr <matt.neumayr@gmail.com>
2020-11-21 13:59:29 -05:00
Matthias Neumayr
6ba54d9cb1
Added Tasmota power plugin
...
Signed-off-by: Matthias Neumayr <matt.neumayr@gmail.com>
2020-11-21 13:59:29 -05:00
Arksine
8ead49504b
power: add support for tplink smartplug (Kasa) devices
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-19 08:32:37 -05:00
Arksine
47c7cea5a5
power: add initial support for device types
...
This changes the API endpoints from "/machine/gpio_power" to "/machine/device_power".
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-19 08:32:37 -05:00
Arksine
f6fa093369
power: refactor power requests
...
Do not allow on, off, or status requests without arguments. Pass device objects to "power_device()" rather than device names.
Signed-off-by: Eric Callahan <arkine.code@gmail.com>
2020-11-19 08:32:37 -05:00
Arksine
6738aa8c68
power: Use libgpiod instead of sysfs for gpio management
...
This resolves issues inherent with sysfs gpio management.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-19 08:32:37 -05:00
Arksine
48266e0bd6
power: rework configuration
...
Devices are now configured using "prefix" sections. The pin configuration now more closely mimics that of Klipper's configuration so as to reduce confusion.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-17 15:39:13 -05:00
Arksine
de34fee72a
machine: register "reboot_machine" and "shutdown_machine" remote methods
...
This allows Klippy to command moonraker to reboot or shutdown the host machine.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-17 12:21:16 -05:00
Arksine
5081810a96
file_manager: normalize the path for the metadata script
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-16 19:55:37 -05:00
Arksine
b021d10de5
klippy_apis: add quotes around filename in call to SDCARD_PRINT_FILE
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-13 06:03:19 -05:00
Arksine
6763ea6197
file_manager: correct issue with directories that contain spaces
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-13 05:25:37 -05:00
Arksine
697be6a822
file_manager: Immedately fetch metadata for file uploads
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-12 17:27:52 -05:00
Arksine
a6913a982a
moonraker: manage subscriptions independently for each connection
...
This allows clients to "unsubscribe"by sending an empty dict. Each client will receive updates only for subscribed objects.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-11 04:46:21 -05:00
Arksine
de1575f757
power: update request handlers to accept WebRequest objects
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-11 04:46:21 -05:00
Arksine
6c8ef93f9f
machine: update request handlers to accept WebRequest objects
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-11 04:46:21 -05:00
Arksine
a260356d78
klippy_apis: update request handlers to accept WebRequest objects
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-11 04:46:21 -05:00
Arksine
27a17ed5a6
file_manager: update request handlers to accept WebRequest objects
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-11 04:46:21 -05:00
Arksine
870cabfa05
data_store: update request handlers to accept WebRequest objects
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-11 04:46:21 -05:00
Arksine
b83211e98d
paneldue: convert "paneldue_beep" into a coroutine
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-11 04:41:26 -05:00
Pawel Zubrycki
a0e23eb22a
power: make the module more modular
...
Signed-off-by: Pawel Zubrycki <paw.zubr@gmail.com>
2020-11-09 06:48:00 -05:00
Arksine
453745c1b6
file_manager: rename references from "url_path" to "rel_path"
...
This is a better description of the item parsed from _convert_path() is a path relative to the "root" directory.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-08 07:39:59 -05:00
Arksine
ffdcfd527a
file_manager: clear metadata on item delete or move
...
When a directory is deleted or moved go ahead and prune the storage.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-08 07:39:36 -05:00
Arksine
472c7c4b23
file_manager: rename all refrences of "base" to "root"
...
Previously different parts of the file manager referred to name identifying a "root directory" as either base or root. This could lead to confusion, so all references are now "root".
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-07 20:36:08 -05:00
Arksine
c415f9ee15
file_manager: Don't store file lists
...
Since we need to walk through a file list each time one is requested there is no gain from storing lists locally.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-07 20:36:08 -05:00
Arksine
e51dbb45c1
file_manager: refactor the MetadataStorage class
...
Storage is now updated by individual calls to "parse_metadata()" instead of passing a full list. This will allow the manager to
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-07 20:36:08 -05:00
Arksine
59d27e6829
power: register "set_device_power" remote method
...
This allows device power to be toggled from a klipper gcode macro.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-07 20:34:56 -05:00
Arksine
6464bbfc3c
paneldue: register "paneldue_beep" remote method
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-07 20:34:56 -05:00
Arksine
c6d629659b
klippy_apis: Add API to register methods with Klippy
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-07 20:34:56 -05:00
Arksine
8bd6e45303
file_manager: fix bug in _handle_metadata_request()
...
Don't modify the metadata directly. Create a copy, then add the "filename" item.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-05 12:43:17 -05:00
Arksine
624be50026
file_manager: add "extended" argument to directory endpoint
...
If extended==True is passed to GET directory then the result for each gcode file will include associate metadata, if present.
SIgned-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-02 20:18:07 -05:00
Arksine
f14b1f3ff0
file_manager: use os.path.splitext to find file extensions
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-11-02 20:18:03 -05:00
Arksine
0d515e4938
file_manager: Add support for uploading and extracting ufp files
...
Credit to GitHub user cdkeito for creating a template from which this implementation was inspired.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-10-31 08:40:49 -04:00
Jordan Ruthe
b63d192df7
power: add websocket notification
...
Signed-off-by: Jordan Ruthe <jordanruthe@gmail.com>
2020-10-27 18:08:56 -04:00
Arksine
7554a599b4
paneldue: Convert "modifed" attribute of metadata to a string
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-10-21 17:54:36 -04:00
Arksine
f2fb8d33d4
file_manager: store file "modified" time as unix time
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-10-21 17:53:08 -04:00
Arksine
8a6503da8a
datastore: Add timestamp (in unix time) field to each line in the gcode store
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-10-18 16:52:08 -04:00
Arksine
28844cb41d
PanelDue: Dump recieved gcode queue on restart
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-10-11 09:09:17 -04:00
Arksine
346c3ad2a0
PanelDue: Make checksums optional
...
Some displays which emulate PD firmware do not use checksums.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-10-08 14:28:15 -04:00
Arksine
7a013a42f7
machine: Use shutdown -r command to reboot
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-10-05 18:23:58 -04:00
Arksine
264e708c1d
file_manager: fix typo in directory check
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-10-05 18:16:10 -04:00
Arksine
620fb356cc
file_manager: Update the internal file list when get_directory
is called
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-10-05 17:57:18 -04:00
Arksine
7e3f236393
data_store: add "/server/gcode_store" endpoint
...
Clients may use this API to fetch up to 1000 lines of cached gocde responses.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-09-28 14:57:44 -04:00
Arksine
b8fc6f5130
plugins: rename "temperature_store" plugin to "data_store".
...
This is in preparation for additional storage functionality.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-09-28 14:08:40 -04:00
Arksine
6905515f3d
shell_command: add ability to cancel a running process
...
Also adds an indefinite timeout if the timeout is specified as "None".
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-09-26 06:14:35 -04:00
Arksine
36c82d0c7f
file_manager: simplify directory registration
...
Now that the file_manager directly handles DELETE file requests, it is not necessary have the HTTP file handler perform any checks. Thus it is no longer required to pass a "can_delete" parameter.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-09-07 12:38:15 -04:00
Arksine
ae49dfe8f2
file_manager: add websocket method for file delete
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-09-07 12:38:15 -04:00
Arksine
7078d5c980
file_manager: update delete_file method
...
This method is now the primary means of deleting files, as it includes checks to make sure that the delete is allowed.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-09-07 12:38:15 -04:00
jruthe
c523f35c5e
Fixing paths on power plugin\
...
Signed off by: Jordan Ruthe
2020-09-05 14:17:45 -04:00
Arksine
8eaef1e559
power: Refactor APIs
...
Register APIs in the "machine/gpio_power" namespace.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-09-03 14:01:34 -04:00