This API defines the minimal interface between the ReelData System & a RAS Feed Control System.
This document is written from the perspective of the Feed Control System. PUB & SUB channels indicate how the Feed Control System would connect and interact with the MQTT interface used to communicate with the ReelData System.
This section contains typical use-cases which illustrate communication between the ReelData system and the Feed Control System. See the 'Operations' section for the specifics of each interface shown in the diagrams below.
The diagram below illustrates the communication between the ReelData System and the Feed Control System when the ReelData System initiates a 'ReelData System - Appetite Command'.
In response to the command, the Feed Control System submits a response on the Feed Control - Feeder Information Update and Feed Control - Appetite Command Acknowledgement channels. Once the feeder state with the new appetite is received from the Feed Control System, the ReelData System stores it in its database and uses it as the basis of future appetite requests.
When a change occurs in the Feed Control System to the state of a tank feeder, the Feed Control System shall notify the ReelData System of the change with a Feed Control - Feeder Information Update message. Here are examples covering all of the changes which would result in an info message to the ReelData System:
This flow is identical for any of the scenarios identified above.
The diagram below illustrates the communication between the ReelData System and the Feed Control System when ReelData initiates a 'ReelData System - Request Feeder Information Command'.
In response to the command, the Feed Control System submits a response on the Feed Control - Feeder Information Update and Feed Control - Request Feeder Information Acknowledgement channels. In this way, the ReelData System can reconcile its state with that of the Feed Control System.
An example mqtt connection for a production environment.
This will be supplied by ReelData.
X509 certificate used by the Feed Control System to connect to the ReelData System. Allows access on specific '{environment}' paths.
A test MQTT server which can be developed against for validation.
A certificate will be provided by ReelData to test.
X509 certificate used by the Feed Control System to connect to the ReelData System. Allows access on specific '{environment}' paths.
ReelData System - Appetite Command
The ReelData System commands a specific feeder to a new appetite value in the Feed Control System.
The tank feeder id is the unique identifier of the tank feeder in the underlying Feed Control System.
May be any string less than 128 characters which uniquely identifies the tank feeder in the Feed Control System.
Identifies the environment.
The environment will be provided at the same time as the x509 certificate required to connect to the MQTT broker.
Accepts the following message:
ReelData command sent to the Feed Control System to update the Appetite value.
{
"requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
"appetite": 0
}
ReelData System - Request Feeder Information Command
The ReelData System requests the state of the feeder from the Feed Control System. The response is then response expected on the 'server/{tankFeederId}/info' channel.
The tank feeder id is the unique identifier of the tank feeder in the underlying Feed Control System.
May be any string less than 128 characters which uniquely identifies the tank feeder in the Feed Control System.
Identifies the environment.
The environment will be provided at the same time as the x509 certificate required to connect to the MQTT broker.
Accepts the following message:
ReelData command sent to the Feed Control System to retrieve the current feeder info.
{
"requestId": "2025df72-035c-4121-8c1b-bd754816bbbd"
}
Feed Control - Feeder Information Update
This channel is used by the Feed Control System to communicate changes to the ReelData System. Example events which the Feed Control System shall inform the ReelData System include:
If any value defined in the 'Feeder State Update Message' changes in the Feed Control System for a tank, the Feed Control System shall publish all values in the 'Feeder State Update Message' to the corresponding feeder topic.
The tank feeder id is the unique identifier of the tank feeder in the underlying Feed Control System.
May be any string less than 128 characters which uniquely identifies the tank feeder in the Feed Control System.
Identifies the environment.
The environment will be provided at the same time as the x509 certificate required to connect to the MQTT broker.
Accepts the following message:
The Feed Control System informs the ReelData System of new tank feeder values whenever they change.
{
"appetite": 100,
"pelletType": "1",
"maximumPhysicalAppetite": 800,
"minimumPhysicalAppetite": 0,
"runStatus": 1,
"source": "REELDATA_INFO_REQUEST",
"requestId": "2025df72-035c-4121-8c1b-bd754816bbbd"
}
{
"appetite": 100,
"pelletType": "1",
"maximumPhysicalAppetite": 800,
"minimumPhysicalAppetite": 0,
"runStatus": 1,
"source": "REELDATA_APPETITE_REQUEST",
"requestId": "2025df72-035c-4121-8c1b-bd754816bbbd"
}
{
"appetite": 150,
"pelletType": "2",
"maximumPhysicalAppetite": 400,
"minimumPhysicalAppetite": 0,
"runStatus": 1,
"source": "FEED_CONTROL_INITIATED"
}
Feed Control - Appetite Command Acknowledgement
The Feed Control System publishes to this topic when a command has been applied against the feeder.
The tank feeder id is the unique identifier of the tank feeder in the underlying Feed Control System.
May be any string less than 128 characters which uniquely identifies the tank feeder in the Feed Control System.
Identifies the environment.
The environment will be provided at the same time as the x509 certificate required to connect to the MQTT broker.
Accepts the following message:
The command acknowledgement message is sent by the Feed Control System to the ReelData System when an info or appetite command has been applied against the feeder.
{
"status": "SUCCESS",
"requestId": "2025df72-035c-4121-8c1b-bd754816bbbd"
}
{
"status": "BAD_REQUEST",
"requestId": "2025df72-035c-4121-8c1b-bd754816bbbd"
}
Feed Control - Request Feeder Information Acknowledgement
The Feed Control System publishes to this topic with the status of the "ReelData System requests feeder information" command.
The tank feeder id is the unique identifier of the tank feeder in the underlying Feed Control System.
May be any string less than 128 characters which uniquely identifies the tank feeder in the Feed Control System.
Identifies the environment.
The environment will be provided at the same time as the x509 certificate required to connect to the MQTT broker.
Accepts the following message:
The command acknowledgement message is sent by the Feed Control System to the ReelData System when an info or appetite command has been applied against the feeder.
{
"status": "SUCCESS",
"requestId": "2025df72-035c-4121-8c1b-bd754816bbbd"
}
{
"status": "BAD_REQUEST",
"requestId": "2025df72-035c-4121-8c1b-bd754816bbbd"
}
ReelData command sent to the Feed Control System to update the Appetite value.
ReelData command sent to the Feed Control System to retrieve the current feeder info.
The Feed Control System informs the ReelData System of new tank feeder values whenever they change.
The command acknowledgement message is sent by the Feed Control System to the ReelData System when an info or appetite command has been applied against the feeder.
Request Id is used to uniquely identify a response or information update from an underlying Feed Control System to a previous request sent by the ReelData System.
The Request Id returned in acknowledgements and information updates by the Feed Control System is expected
to match what is provided in requests initiated by the ReelData System.
The ReelData System will ignore this field in the case where a message from the Feed Control System contains 'FEED_CONTROL_INITIATED'.
The request id is a uuidv4 string.
Appetite value the ReelData System has requested for the feeder.
Note: "appetite" can be either an integer or a floating point number. This will be configured by ReelData according to your feeder's requirements.
The source of the Feeder State Update Message.
Maximum appetite the Feed Control System allows
Minimum appetite the Feed Control System allows
Selected feed pellet.
Any string identifier may be used to identify the pellet type.
Run status for a particular tank feeder.
Used by the ReelData System to know if a tank feeder is off or on.
Status of ReelData command sent to the Feed Control System, after Feed Control System is done processing the command.