Skip to content

Commit

Permalink
Merged
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhollingworth committed Aug 20, 2020
2 parents a0cf1f9 + fe6aba5 commit 4db6cec
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 33 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/grafana/plugins
/grafana/plugins/
/grafana/plugins/
tmp
tmp/
64 changes: 46 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

> Open source Manufacturing Execution and Performance Monitoring built on [Grafana](https://grafana.com), [Influx](https://www.influxdata.com/), and [Postgres](https://www.postgresql.org/).
Define your master data, push your machine metrics to modernize your manufacturing and start collecting and analysing your manufacturing data with Libre. Libre is an open source manufacturing execution and performance monitoring tool.
Define your master data, push your machine metrics, start collecting and analyzing your manufacturing data with Libre. Libre is an open source manufacturing execution and performance monitoring tool.

- _Define:_ Your manufacturing master data including your enterprise model, downtime reasons, products, ingredients and product steps.
- _Capture:_ Connect up your machines using a variety of methods into key buckets with an InfluxDB Historian
- _Use:_ Schedullers create and schedule orders, operators execute orders and capture downtime reasons.
- _Use:_ Schedulers create and schedule orders, operators execute orders and capture downtime reasons.
- _Improve:_ Get key insights into your manufacturing, understand your biggest losses, visualize OEE.
- _Extensible:_ Built on Grafana, Influx and postgres push your key process parameters to view alongside your production dashboards. Extend with your Grafana dashboards.
- _Extensible:_ Built on Grafana, Influx and postgres push your key process parameters to view alongside your production dashboards. Extend with your Grafana dashboards. Free to innovate.

![Libre](docs/libre-line-performance.png)

## Try it out

Use the [Libre Simulator](https://github.com/Spruik/Libre-Simulator) to test out Libre. The quickest way to run Libre and the Libre Simulator it is with with docker-compose `docker-compose -f docker-compose.yml -f docker-compose.sim.yml up -d` command. This will start up Libre and the simulator together. After running the command, browse to `http://localhost:3000` to access Grafana and `http://localhost:1880` to control the simulation.
Use the [Libre Simulator](https://github.com/Spruik/Libre-Simulator) to test out Libre. The quickest way to run Libre and the Libre Simulator it is with the docker-compose command `docker-compose -f docker-compose.yml -f docker-compose.sim.yml up -d`. This will start up Libre and the simulator together. After running the command, browse to `http://localhost:3000` to access Grafana and `http://localhost:1880/ui` to control the simulation.

See [Try it out](/docs/try-it-out.md) for more information.

Expand Down Expand Up @@ -40,16 +42,21 @@ Receiving objects: 100% (165/165), 176.45 KiB | 3.60 MiB/s, done.
Resolving deltas: 100% (49/49), done.

$ docker-compose up -d
Creating libre-grafana_postgres_1 ... done
Creating libre-grafana_influx_1 ... done
Creating libre-grafana_postREST_1 ... done
Creating libre-grafana_grafana_1 ... done
Creating network "libre_default" with the default driver
Creating volume "libre_grafana_plugins" with default driver
Creating volume "libre_grafana_provisioning" with default driver
Creating volume "libre_postgres_data" with default driver
Creating volume "libre_influx_data" with default driver
Creating libre_influx_1 ... done
Creating libre_postgres_1 ... done
Creating libre_grafana_1 ... done
Creating libre_postREST_1 ... done

```

#### Set Grafana Admin Password

Once Libre is installed and running, navigate to `http://<server>:3000/` and and use the default grafana login username `admin` and password `admin` to login. You will then be prompted to change the default password.
Once Libre is installed and running, navigate to `http://<server>:3000/` and use the default Grafana login username `admin` and password `admin` to login. You will then be prompted to change the default password.

### Define your factory Model

Expand All @@ -63,7 +70,7 @@ Next, define your reason codes. Long click ReasonCodes in the Reason Codes panel
![Reason Codes](/docs/reason-codes.png)

Raw Materials are added during product operations. Products are made up of a number of product operations. Finally products can be categorized by groups. Start by entering in Raw Material information by clicking the (+) on the Raw Material panel. These are the ingredients that go into your final product. Once raw materials have been added, add in the required Product Operationsin the Product Operation panel. Product Operations are the steps to manufacture the final product and is where a raw ingredient is added. For example `Fill Tank` or `Add Label`.
Raw Materials are added during product operations. Products are made up of a number of product operations. Finally, products can be categorized by groups. Start by entering in Raw Material information by clicking the (+) on the Raw Material panel. These are the ingredients that go into your final product. Once raw materials have been added, add in the required Product Operations in the Product Operation panel. Product Operations are the steps to manufacture the final product and is where a raw ingredient is added. For example `Fill Tank` or `Add Label`.

![Raw Materials](docs/raw-material.png)

Expand All @@ -73,9 +80,9 @@ Once Raw Materials and Product Operations are added create a Product group using

![Products](docs/product.png)

Now that you have defined your factory model, downtime reasons, ingredients, product operations and products your are ready to start schedulling orders.
Now that you have defined your factory model, downtime reasons, ingredients, product operations and products your are ready to start scheduling orders.

### Schedulling Orders
### Scheduling Orders

Schedule orders on your lines using the `SmartFactory/Schedulling` dashboard. To setup use the `Production Line Start Time Setter` to define the start time for each line. This is the time whereby an order will be first scheduled for the day. For 24hr operation, set to 12:00AM.

Expand All @@ -89,11 +96,11 @@ Orders have the following state model:

The `SmartFactory/Line Schedule` dashboard shows the schedule for the selected manufacturing line. Orders can be set to next/running so that they are visible on the `SmartFactory/Line Performance` dashboard.

### Executing Orders and Integrating Machines
### Executing Orders

Orders be executed by clicking from the list in either `SmartFactory/Line Performance` or `SmartFactory/Line Schedule` and selecting Running. Only a single order can be Running at once per line. The Paused state can be used to pause orders until they are ready to be execute on again or completed. Once an order is running machine state and counts are logged against that order.

#### Integrating Machine State
### Integrating Machines

Machines will need to push data to the following buckets and schemas.

Expand Down Expand Up @@ -155,21 +162,42 @@ The machine will need to publish to the `OrderPerformance` Influx bucket with th
| order_id | tag | string | Current order id |
| issued_qty | field | number | Count of good products this order |

### Analysing the Manufacturing Data
### Analyzing the Manufacturing Data

Analyse your manufacturing data using the `SmartFactory/Line Performance` and `SmartFactory/Analysis` dashboards. Line Performance offers analysis of performance and availability whilst the Analysis dashboard drills into time loss through Downtime Pareto graphs and sunbursts of both Downtime duration and frequency.

## Developing

Prerequisites

- docker (>= 18 required)
- git (>= 1.20 required)

1. Run the docker compose with the docker-compose.dev.yl file. Include the --build argument to build containers from source. `docker-compose -f docker-compose.dev.yml up --build`
2. To clear data whilst developing ensure to remove volumes `docker-compose -f docker-compose.dev.yml rm -v`

## Building

Prerequisites

- docker (>= 18 required)
- git (>= 1.20 required)

Analyse your manufacturing data using the `SmartFactory/Line Performance` and `SmartFactory/Analysis` dashboards. Line Performance offers analysis of performance and availability whilst the Analysis dashboard drills into time loss through Downtime paretos and sunbursts of both Downtime duration and frequency.
1. Clone this repository with `git clone https://github.com/Spruik/Libre` and enter directory `cd Libre`
2. Change directory into grafana and build the container `cd grafana`, `docker build . -t spruiktec/libre-grafana`
3. Change directory up one level, into postgres and build the container `cd .. && cd postgres`, `docker build . -t spruiktec/libre-postgres`

## Contributing

For any issue, there are fundamentally three ways an individual can contribute:

- By opening the issue for discussion: For instance, if you believe that you have uncovered a bug in, creating a new issue in the [GitHub issue tracker](https://github.com/Spruik/Libre/issues) is the way to report it.
- By helping to triage the issue: This can be done either by providing supporting details (a test case that demonstrates a bug), or providing suggestions on how to address the issue.
- By helping to triage the issue: This can be done either by providing supporting details (a test case that demonstrates a bug) or providing suggestions on how to address the issue.
- By helping to resolve the issue: Typically, this is done either in the form of demonstrating that the issue reported is not a problem after all, or more often, by opening a Pull Request that changes some bit of something in the panel in a concrete and reviewable manner.

## License

Libre is distrbuted under the [Apache 2.0 License](https://github.com/spruik/libre/blob/master/LICENSE).
Libre is distributed under the [Apache 2.0 License](https://github.com/spruik/libre/blob/master/LICENSE).

## Change Log

Expand Down
Binary file added docs/libre-line-performance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/libre-order-state-model.drawio
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<mxfile host="Electron" modified="2020-08-20T13:37:06.210Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/13.0.3 Chrome/80.0.3987.163 Electron/8.2.1 Safari/537.36" etag="aGvjdjCgljemfaDek0y0" version="13.0.3" type="device"><diagram name="Page-1" id="edf60f1a-56cd-e834-aa8a-f176f3a09ee4">7VvbcpswEP0aPyYDyFz82NpxM+llOk1veeooZg00MvIIObbz9RUgGTBxUBzXJhnykGFX2pXQ7jlapHEPDWerDwzPw8/UB9KzDH/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bUWbVtHGqaxP9xqvvrHx1t3haaPtz03t5OgzXoLYEPNhxi6WEPNd3H/G2r1G7QOao9DzawArVRVNmGt8o3tHu0jG2mCzerAdiywdRege+5rumXkic6ztKvIVh/09/uHqyItr9nX/0Zb/RK0Q9tB0VatIo92QqJbRbb69HgbIM4LvtiMRlc7oCZSEq9L3eZph+SRF1OT3joKtQpU75zcoMlEPOTz0ES/EIsfdeTdix/OoIt/</diagram></mxfile>
<mxfile host="Electron" modified="2020-08-20T15:21:34.592Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/13.0.3 Chrome/80.0.3987.163 Electron/8.2.1 Safari/537.36" etag="hrPZ4yk3nCuzg_U7t5xm" version="13.0.3" type="device"><diagram name="Page-1" id="edf60f1a-56cd-e834-aa8a-f176f3a09ee4">7VtbU6MwFP41fdQBwq2Pa2t13Ms46+6qTzuxpMCakk5Ibeuv3wAJl2JLrLVFBx8czknOScg535dDMu2BwXR5QeEs+E48hHuG5i17YNgzDMfs8/+JYpUpTNPMFD4NvUylF4qb8BkJpSa089BDcaUjIwSzcFZVjkkUoTGr6CClZFHtNiG4OuoM+qimuBlDXNfehh4LhFbXtKLhEoV+IIZ2LdHwAMePPiXzSIzXM8Ak/cuap1D6Ev3jAHpkUVKB8x4YUEJY9jRdDhBOllYuW2Y32tCaz5uiiKkY2BpyNEe3nT7QAUD9EyAC9QTxHMl3SGfKVnJ1kMcXS4iEsoD4JIL4vNCepSuAkjE0LgVsivmjzh8xfED4LF+kAcGE8qaIRIlZzCBlIhssLqPI+5JEk4tjDOM4HP8KwihrGIVYOuVSyegfYmwlZDhnhKuKSX4jZCasYkbJYx7eRDMhERvBaYiTrP2DqAcjKNTCn5uOxujqTrxaKtwnwqklxeGy3DhcSWkZsjs5Y/5csuJSYZQI0qYeThHhmMzpWITj6/PvxQTdDgdXzj10/16iq+HziUQNpD5iW/qJ6CYhLQ0gkuUCkSni78A7CGSfaKe2bTuZ0aoKWoowZOFTFUJQINHPXeXer0nI36roQiaTmM+1lK78oTSJQpUm8csJvW0xSjk9oAgynqDrqb0IQoZuZjBd2wXntmr6VvM6B69KZu+WbBCHfpSkP08ARGW7mG/qhsNAjsXJZpT+5ZnzhChDy43csD3WktNEmK3+qWtnmkXBia7oFJTY0NQ2x74S2tfG0ajF8SeC3uqjR/HtodKd1sUK1GL1Ay1ZFyqj37pQdVv+jlu+sdueb6hs+ms78m5VgKFYBYAWbfpFHwkxt4oYt0CM9JIthLDb4iqvuze7ytaq5mpfpYhV38LmURRGfseMpt46ZrQ7Zmzbx5AKLzbynaXIn63mRWsNL87uvGhqx+ZFp4a0AZnOMGKoI0YLtI4Y3Y4YPyIxNhKepUigTquJsZnNVInRMo9NjP06MWISf/yjq7fTot2+AyqZ5B0vfjJedBR5sd9mXrTtvfGic/SCUa8f6l/DeUeMvfqHtA5awIz1s/uOGTcw46ljVchRkRqlnWBH/VDcqFoz6m26Wvzk5Fi/fenQtgltRgVtujLajDLatEOhTX/VGVdr0bZ2pKFru8Ot5ss8PN66KzR1vO24uR0FbcZnABtoPsRQxRpovot7b6jVb9A6qL0MNb0CtFJV2YS1yje2c7CPbKAINqMD26HA1l2A7rivqZaRRzrPUq4iW33Qb5r7qyINt9nXe6OtfgnaoW2vaKtWkQc7IVGtIlt9erwOEPsNX2xao6sNUOMpCVelbrOkQ/zCi8lJrx2FGgWqN06u32TCH7J5KKKfi8UvOrLuxa9mwPl/</diagram></mxfile>
Binary file modified docs/libre-order-state-model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 11 additions & 13 deletions docs/try-it-out.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,21 @@ Resolving deltas: 100% (49/49), done.

```shell
$ docker-compose -f docker-compose.yml -f docker-compose.sim.yml up -d
Creating network "libre-grafana_default" with the default driver
Creating volume "libre-grafana_grafana_plugins" with default driver
Creating volume "libre-grafana_grafana_provisioning" with default driver
Creating volume "libre-grafana_postgres_data" with default driver
Creating volume "libre-grafana_influx_data" with default driver
Creating libre-grafana_influx_1 ... done
Creating libre-grafana_postgres_1 ... done
Recreating libre-grafana_simulator_1 ... done
Creating libre-grafana_postREST_1 ... done
Creating libre-grafana_grafana_1 ... done
Creating network "libre_default" with the default driver
Creating volume "libre_grafana_plugins" with default driver
Creating volume "libre_grafana_provisioning" with default driver
Creating volume "libre_postgres_data" with default driver
Creating volume "libre_influx_data" with default driver
Creating libre_influx_1 ... done
Creating libre_postgres_1 ... done
Creating libre_simulator_1 ... done
Creating libre_postREST_1 ... done
Creating libre_grafana_1 ... done

```

3. Navigate to `https://localhost:3000` log into grafana with username admin and password admin. Explore the SmartFactory dashboard folder.

4. Navigate to `https://localhost:3000` to start/stop and complete a line.
4. Navigate to `https://localhost:1880/ui` to start/stop and complete a line.

![Simulation](simulator.png)

## Example

0 comments on commit 4db6cec

Please sign in to comment.