hwmonitor/hwmon-service/docs/SERVER_API.md

73 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2024-10-18 22:51:22 +03:00
# API of server.py
Just send `GET_MON_ALL` to remote machine without '\n' of the end and server
reply JSON with sensors data from it. On sended from client another data
reply `ERR 1 Bad Request`.
## Requests
- `GET_MON_ALL` - response is JSON with HWMON sensors data.
## Response JSON
{
"k10temp": {
"temp1": {
"type": "temperature",
"rate": "\u00b0C",
"name": "Tctl",
"value": 35.75
}
},
"amdgpu": {
"in1": {
"type": "voltage",
"rate": "V",
"value": 749
},
"in0": {
"type": "voltage",
"rate": "V",
"value": 699
},
"temp1": {
"type": "temperature",
"rate": "\u00b0C",
"name": "edge",
"value": 34.0
}
},
"nvme": {
"temp1": {
"type": "temperature",
"rate": "\u00b0C",
"name": "Composite",
"value": 41.85
}
},
"acpitz": {
"temp1": {
"type": "temperature",
"rate": "\u00b0C",
"value": 37.0
}
},
"ADP1": {},
"BAT1": {
"in0": {
"type": "voltage",
"rate": "V",
"value": 11091
},
"curr1": {
"type": "current",
"rate": "A",
"value": 446
}
}
}
## Response errors
- `ERR 1 Bad Request` - server send it if request is bad.