Examples

Simple usage examples

Python /stats

Example:

import requests   

resp = requests.get("http://nexus.local/api/power/0.0.1/1/stats", auth=("", ""))
if resp.status_code == requests.codes.ok:
	response = resp.json()
	print("Voltage on 3.3V rail: " + str(response['voltage_3v3']) + " mV")
	print("Voltage on 5.0V rail: " + str(response['voltage_5v0']) + " mV")
	print("Voltage on  12V rail: " + str(response['voltage_12v']) + " mV")

Output:

Voltage on 3.3V rail: 3301 mV
Voltage on 5.0V rail: 4933 mV
Voltage on  12V rail: 11942 mV

Last modified September 1, 2021