- base url:
localhost:4000/api
Stops the currenlty running routine. Response:
200 {}
Request:
{
"id": 10,
}
Response:
200 {
"data": {
"id": 10,
"title": "title",
"strain": "strain",
"medium": "medium",
"target_temp": "target_temp",
"target_ph": "target_ph",
"target_co2": "target_co2",
"target_density": "target_density",
"estimated_time_seconds": "estimated_time_seconds",
"extra_notes": "extra_notes",
"inserted_at": "inserted_at",
"updated_at": "updated_at",
}
}
422 {"errors": []}
Response:
200 {
"data": [{
"id": 10,
"title": "title",
"strain": "strain",
"medium": "medium",
"target_temp": "target_temp",
"target_ph": "target_ph",
"target_co2": "target_co2",
"target_density": "target_density",
"estimated_time_seconds": "estimated_time_seconds",
"extra_notes": "extra_notes",
"inserted_at": "inserted_at",
"updated_at": "updated_at",
}]
}
422 {"errors": []}
Creates and starts a new routine. It fails if there is a routine already started. Response:
200 {
"data": {
"id": 10,
"title": "title",
"strain": "strain",
"medium": "medium",
"target_temp": "target_temp",
"target_ph": "target_ph",
"target_co2": "target_co2",
"target_density": "target_density",
"estimated_time_seconds": "estimated_time_seconds",
"extra_notes": "extra_notes",
"inserted_at": "inserted_at",
"updated_at": "updated_at",
}
}
422 {"errors": []}
Updates a routine Response:
200 {
"data": {
"id": 10,
"title": "title",
"strain": "strain",
"medium": "medium",
"target_temp": "target_temp",
"target_ph": "target_ph",
"target_co2": "target_co2",
"target_density": "target_density",
"estimated_time_seconds": "estimated_time_seconds",
"extra_notes": "extra_notes",
"inserted_at": "inserted_at",
"updated_at": "updated_at",
}
}
422 {"errors": []}
Deletes a routine Response:
200 {}
500 {}
Response:
200 {
"data": [{
"id": 10,
"temp": "temp",
"ph": "ph",
"co2": "co2",
"density": "density",
"routine_id": "routine_id"
}]
}
Response:
200 {
"data": {
"id": 10,
"temp": "temp",
"ph": "ph",
"co2": "co2",
"density": "density",
"routine_id": "routine_id"
}
}
Response:
200 {}
500 {}
Response
{
"current_value": "7.2"
}
RETURNS THE STATUS OF THE LAST CALIBRATION STARTED Response
{
calibration_target: (4 | 7 | 10),
calibration_status: (ok, started, error, not_started)
}
SETS THE BASE CONFIG ON THE SENSOR, RETURNS THAT VALUE (NOT FOR USE, JUST TO SEND IT) BODY
{}
Response
{
"message": "Comenzó la calibración, no quite el sensor de la solución"
}
SETS THE ACID CONFIG ON THE SENSOR, RETURNS THAT VALUE (NOT FOR USE, JUST TO SEND IT) BODY
{}
Response
{
"message": "Comenzó la calibración, no quite el sensor de la solución"
}
SETS THE NEUTRAL CONFIG ON THE SENSOR, RETURNS THAT VALUE (NOT FOR USE, JUST TO SEND IT) BODY
{}
Response
{
"message": "Comenzó la calibración, no quite el sensor de la solución"
}
- Base url:
localhost:4000/socket
- Topic:
routine
- Events:
update | start | stop | alert
Called when the routine starts
- Event:
start
- Payload:
{"id": "routine.id", "target_temp": "routine.target_temp"}
Called when the routine stops
- Event:
stop
- Payload:
{"id": "routine.id", "target_temp": "routine.target_temp"}
Called when a new reading is recorded
- Event:
update
- Payload:
{"id": "routine.id", "temp": "reading.temp"}
Called when an alert is issued after processing a reading
- Event:
start
- Payload:
{"message": "message", "errors": ["error1", "errorN"]}
Called when the sensor status is checked
- Event:
status
- Payload:
{"temp": "temp"}
Called when there is an error with the sensors
- Event:
error
- Payload:
{"message": "message"}