mirror of
https://github.com/pikvm/pikvm.git
synced 2026-03-02 18:16:56 -05:00
API: Switch GPIO channel post call is failing with the message "This GPIO channel does not support switching" #696
Labels
No labels
component:documentation
help wanted
resolution:delayed
resolution:duplicate
resolution:fixed
resolution:invalid
resolution:rejected
resolution:wontfix
success story
type:bug
type:bug
type:feature
type:question
type:question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pikvm-pikvm#696
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @plia7 on GitHub (Jul 21, 2023).
Originally assigned to: @mdevaev on GitHub.
Describe the bug
API - Switch GPIO channel post call is failing with message "This GPIO channel does not support switching" (GpioChannelNotFoundError).
To Reproduce
using HTTP Basic Auth with the following parameters::
channel=ch1_button
state=1
Actual behavior
Getting a 400 HTTP Response Code:
Expected behavior
GPIO switches from channel ch0_button to ch1_button just like it allows you to do it from the Web UI.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
API Call
PiKVM info:
pacman -Q | grep kvmdkvmd-platform-v3-hdmi-rpi4 3.234-1
pacman -Q | grep ustreamerustreamer 5.41-1
uname -aLinux pikvm 5.15.68-3-rpi-ARCH #1 SMP Mon Oct 31 20:56:54 MSK 2022 armv7l GNU/Linux
Additional context
I tried the same test with being on channel ch1_button and trying to switch to channel ch0_button and getting the same result.
It allows you to do it from the Web UI without any problems, there shouldn't be a reason why it gives you this error when doing it from the API.
For reference, here is the response I got when running an API GET call to: https://pikvm-ip/api/gpio
@mdevaev commented on GitHub (Jul 21, 2023):
For buttons without fixed state you should use the pulse API: https://docs.pikvm.org/api/#pulse-gpio-channel