To implement the parent EPIC, we need a user-interface in Grafana to add and modify data.
Graphical elements
Mockup: https://xd.adobe.com/view/9604a01e-fa09-4cbc-9576-ab9b53ae15c8-c357/screen/d36faf85-f3fe-4543-9368-d59307420727
Use standard grafana design elements for the UI: https://developers.grafana.com/ui/latest/index.html?path=/story/docs-overview-intro--page
Overwrite machine states list widget
User Story 1: I want to remove unrealistic long machine running times in the past 30 days
- I select the desired location
- I select the desired asset
- I select the past 30 days in the Grafana time selector widget on the top right
- I select 6h in the 'show elements longer than selected timerange' dropdown
- I search for rows with machine state 'machine running' and select 'unknown stop' for each unrealistic shift / row and press 'adjust state'.
- I confirm the change for each row
- I do it until I am satisfied with the result
User Story 2: (story currently not in scope) I want to overwrite several machine states at once
- I select the desired location
- I select the desired asset
- I select the past 2 Day in the Grafana time selector widget on the top right
- I select all in the 'show elements longer than selected timerange' dropdown
- I select in the table "select all"
- I click in the dropdown of the entire table the new desired state for the entire period and confirm my input
- I do it until I am satisfied with the result
Overwrite shift list widget
User Story 1: I want to adjust a shift, that ended earlier than expected
- I select the rough time range of that shift in the Grafana time selector widget (e.g. past 7 days)
- I see now all shift in that time range
- I remove the shift that ended earlier by pressing on the remove icon in that row and confirming
- I enter the time range at the bottom / 'add new shift' using a date selector and press add button and confirm
User Story 2: I want to remove a shift on the weekend
- I select the rough time range of that shift in the Grafana time selector widget (e.g. past 7 days)
- I see now all shift in that time range
- I remove the shift that I want to be removed
Scrap entire timerange widget
User Story 1: I want to mark the products of the past 3h as scrap / bad quality
- I select the rough time range of that shift in the Grafana time selector widget (e.g. past 7 days)
- I see now the produced pieces, scrapped pieces, etc. in other widgets
- I finetune the time range until I am satisfied with the amount of produced pieces
- I press 'scrap everything in current time range' and confirm
MQTT messages
MQTT messages for "Overwrite machine states list widget" User Story 1
Topic: ia/<customerID>/<location>/<AssetID>/removeState
With the help of this topic a state can be deleted from a machine with a certain timestamp.
scrapState
in the JSON is a string.
{
"timestamp_ms": 1588879689394
}
Topic: ia/<customerID>/<location>/<AssetID>/state
A message is sent here each time the asset changes status. Subsequent changes are not possible. Different statuses can also be process steps, such as "setup", "post-processing", etc. You can find a list of all supported states here
state
in the JSON is a integer according to this datamodel
Example for /state
{
"timestamp_ms": 1588879689394,
"state": 10000
}
MQTT messages for "Overwrite shift list widget" User Story 1
Topic: ia/<customerID>/<location>/<AssetID>/removeShift
With the help of this topic a Shift can be deleted from a machine with a certain timestamps.
scrapShift
in the JSON is a string.
{
"timestamp_ms": 1588879689394,
"timestamp_ms_end": 1588879689395
}
MQTT messages for "Overwrite shift list widget" User Story 2
Topic: ia/<customerID>/<location>/<AssetID>/removeShift
With the help of this topic a Shift can be deleted from a machine with a certain timestamps.
scrapShift
in the JSON is a string.
{
"timestamp_ms": 1588879689394,
"timestamp_ms_end": 1588879689395
}
Topic: ia/<customerID>/<location>/<AssetID>/addShift
A message is sent here each time a new shift is started.
timestamp_ms_end
in the JSON is a integer representing a UNIX timestamp in milliseconds.
Example for /addShift
{
"timestamp_ms": 1588879689394,
"timestamp_ms_end": 1588879689395
}
MQTT messages for "Scrap entire timerange widget" User Story 1
Topic: ia/<customerID>/<location>/<AssetID>/scrapCount
Here a message is sent every time products should be marked as scrap. It works as follows:
A message with scrap
and timestamp_ms
is sent. It starts with the count that is directly before timestamp_ms
. It is now iterated step by step back in time and step by step the existing counts are set to scrap until a total of scrap
products have been scraped.
Important notes:
- You can specify maximum of 24h to be scrapped to avoid accidents
- (NOT IMPLEMENTED YET) If counts does not equal
scrap
, e.g. the count is 5 but only 2 more need to be scrapped, it will scrap exactly 2. Currently it would ignore these 2. see also #125
- (NOT IMPLEMENTED YET) If no counts are available for this asset, but uniqueProducts are available, they can also be marked as scrap. //TODO
scrap
in the JSON is an integer.
Example for /scrapCount
{
"timestamp_ms": 1588879689394,
"scrap": 1
}
open questions
- Where do I get the available machine states which I can select in the dropdown menu?