Arksine / moonraker

Web API Server for Klipper
https://moonraker.readthedocs.io
GNU General Public License v3.0
1.02k stars 392 forks source link

machine: add support for peripheral requests #798

Closed Arksine closed 5 months ago

Arksine commented 5 months ago

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

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.