Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

machine: add support for peripheral requests #798

Merged
merged 12 commits into from
Feb 1, 2024

Conversation

Arksine
Copy link
Owner

@Arksine Arksine commented Jan 23, 2024

This pull request adds the ability to query the local machine for the following peripherals:

  • Serial Devices, including hardware UARTs
  • Connected USB devices
  • Video Devices (V4L2 and libcamera)
  • Unassigned CAN Nodes running Klipper or Katapult

This is accomplished for the most part using sysfs and IOCTLs. No external dependencies are added in this PR. That said, it is necessary for the python3-libcamera package to be installed on the system to query libcamera devices. Since this package is only widely available for RPi OS it can't be added to Moonraker as a system dependency as it would cause standard Debian/Ubuntu installs to fail. That said, if the module is not available it will not cause an error.

This PR also marks the switch from the "readthedocs" theme to the "material" theme for Moonraker's documentation. Given the complexity of the responses I wanted to try to introduce a better structure for the API documentation. It won't be available on readthedocs until this PR is merged, however its generally possible to read the API docs in the PR to get an idea of what the new APIs look like.

This resolves PR #658 and issue #768.
@meteyou This PR also addresses your request to query hardware devices.

@Arksine Arksine force-pushed the dev-machine-peripherials-20231225 branch from d401574 to 83fdc5c Compare January 24, 2024 00:31
This folder contains miscellaneous files used by Moonraker
or other applications in the Klipper ecosystem.

Signed-off-by:  Eric Callahan <[email protected]>
Implement endpoints to query the following:
- Serial Devices (including Hardware UART)
- USB Devices using lsusb
- Klipper CAN Node UUIDs

Signed-off-by:  Eric Callahan <[email protected]>
While a hardware UART generally won't have symlinks in the "by-path"
and "by-id" folders, it is possible to configure udev to add them.
In addition, adding these fields makes the schema consistent.

Signed-off-by:  Eric Callahan <[email protected]>
The material theme is more feature complete and flexibile,
providing better documentation for APIs and such.  This
commit is just the initial move.  The documents are functional,
but the layout and color schemes are subject to change.

Signed-off-by:  Eric Callahan <[email protected]>
This adds a new structure for API documentation, making each
aspect visible and uniform.  The parameters, response, and
schema are collapsible, allowing for easier navigation.

Signed-off-by:  Eric Callahan <[email protected]>
@Arksine Arksine force-pushed the dev-machine-peripherials-20231225 branch from b61015f to 71517b2 Compare February 1, 2024 15:28
@Arksine Arksine merged commit 71517b2 into master Feb 1, 2024
2 checks passed
@Arksine Arksine deleted the dev-machine-peripherials-20231225 branch February 1, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant