I see that there is an API endpoint for configuring the GPIO interface(s) on Peplink routers. However I don’t see any documentation on how to query the status of a GPIO pin. Is this possible? If so, is there documentation showing me how?
Also, if anyone happens to know if there’s a way to query power supply input voltage via API, that would be helpful too.
Thanks!
1 Like
@Patrick_Shoemaker, you may check out the Router API document from Miscellaneous Downloads section.
It should be this command:

Try it out and let us know if encounter an issue.
1 Like
Hi @WeiMing , I do see that API endpoint, but that only allows me to set or query the configuration parameters for the GPIO pins. It does not return any data on the current pin values (1/0 for digital inputs, a voltage for analog inputs, etc.). How can I access those values?
@Patrick_Shoemaker, are you referring to these kinds of messages, that indicate the GPIO status?
If this is the case, then you can try the new commands (beta, subject to change):
- /api/status.gpio.output
- /api/status.gpio.input
Below is a sample query and output for your reference.
GET https://[Router IP]/api/status.gpio.output?list

3 Likes
@WeiMing , that is exactly what I was seeking. Thank you for the information. Acknowledging that this is beta and subject to change.
Do you have any information regarding whether there is also an API endpoint for viewing the input voltage for the router? This is helpful in vehicle applications where one might want to query the voltage being supplied.
1 Like
@Patrick_Shoemaker, this is what will be seen when it is configured as Digital Input with GET https://[Router IP]/api/status.gpio.input?list command.

Currently, there isn’t an API command available to retrieve the PIN voltage, but if you can let me know the model(s) you are exploring (or working on), I think I should be able to find out the High and Low threshold to share with you.
Example |
Model = MAX HD2/4-MBX |
GPIO = Digital Input |
Input = LOW |
|
Low threshold: 0.7 V (30 V tolerant) |
Input = HIGH |
|
High threshold: 2.2 V (30 V tolerant) |
Hope this helps.
1 Like
Thank you @WeiMing . I am actually referring to the power supply input voltage to the router. In a vehicle application, this matches the vehicle’s battery voltage, which is a useful value to be able to query via API. So, it’s not related to the GPIO pin hardware.
I am working with a BR1 Pro 5G device in this case. Thank you.
@Patrick_Shoemaker, do you mean retrieving the router input voltage via API? If that is the case then it isn’t available on the BR1 Pro 5G I am aware. The reason being is, the voltage monitoring feature is available on the higher-end models, eg. MBX-Mini, HD2/HD4-MBX, etc.
2 Likes
While not ideally, you could add something like this:
This would trigger the gpio when the battery voltage reaches 10v.
I would also request that the BR1 Pro 5g have an analog pin added for future releases.
1 Like
Thank you both. If there’s no internal monitoring in the hardware, then I’ll use an external device as suggested by Jonathan.
On my MAX BR2 Pro running 8.3.0 fw i was able to set GPIO I/O (brown wire) as a analog input as shown below
Now i can use ‘https://192.168.50.1/api/status.gpio.input?list’
this will return the following response:
{
“stat”: “ok”,
“response”: {
“order”: [
2
],
“2”: {
“voltage”: 13.210000000000001,
“type”: “analog_input”,
“name”: “I/O”,
“enable”: true
}
}
}
So you can now monitor the input voltage of your router.
Hi, did you do to show the GPIO using API