API between Raspberry Pi and server - RPI-ODQS/ODQS-Raspberry-Pi GitHub Wiki
Raspberry Pi publishing end
Send names and building ID to server
/init/ (publish)
buildingId: string
temperature 1: string
...
pressure 1: string
...
waterflow 1: string
...
current 1: string
...
switch 1: string
...
output 1: string
...
Send SOS data to server
/data/ (publish)
buildingId: string
timeStamp: string
data : {
temperature 1: float
...
pressure 1: float
...
waterflow 1: float
...
current 1: float
...
switch 1: bool
...
output 1: float
...
}
Response for COM
/comRes/ + buildingId
buildingId: string
commandId: string
actionTime: string
actionStatus: int
Send picture to server
/picture/
buildingId: string
time: string
picture: string (b64encoded)
Raspberry Pi Subscribing end
update local opi data
/opi/ + buildingId (subscribe)
time: string
type: int
input1: float
input2: float
hotWater: {float, float, ..., float}
elePrice: {float, float, ..., float}
ambTemperature: {float, float, ..., float}
solarEnergyOutput: {float, float, ..., float}
demandResponseScaler: {float, float, ..., float}
New command from server
/comReq/ + buildingId (subscribe)
time: string
id: string
type: int
parameterVar1: float
parameterVar2: float
Update display name
/name/ + buildingId (subscribe)
temperature x: xxx
...
...
the function of this api is to change all the display names in the list sended to Raspberry Pi