[TOC]
An inventory system that scales.
(v1.0.0, Fri sep 18)
"Do you stop warehouse operations for days to physically count items and make sure that count matches the data stored in your software? This is an absolutely unnecessary, costly and outdated mindset." - Brian Sutter
Tracking inventory can be a major sore point for many manufacturing based companies. Many tracking systems exist for inventory coming in and out of the factory, but what about goods which are consumed within the factory itself?
The following is a hypothetical business situation which better describes the problem. You are a global manufacturing company that has assembly plants all over the world. Corporate relies on monthly inventory checks by staff in order to make purchasing decisions. By the time inventory is counted and a monthly count is submitted, the data is invalid because material is constantly being used internally to keep manufacturing moving. Another factor which limits the accuracy of data is human error when manually performing inventory counts. The delay and potential inaccuracy of data available to lead decision makers causes many of the plants to face a situation where they have a deficit in a required part and can no longer continue production. How can we keep track of dynamically changing inventory counts, and measure them more frequently without having to manually count the inventory every single day?
Not having enough inventory may cause a business to miss crucial opportunities, while having too much inventory can cause loss though storage costs.
The solution leverages both IoT and edge computing. Sensors, on one hand, can alleviate the need for manual inventory tracking. Edge Computing, on the other hand, makes it possible to locally process data and send batch updates to the cloud. In other words: relying on edge computing means that we can locally process, and bundle data, saving bandwidth when talking to the cloud. we can orchestrate a network of low power computers, microprocessors and sensors that can handle collecting and processing inventory data within the factory. We can then aggregate the many different streams of data created by each factory into one Cloud dashboard that decision makers can leverage to make insightful decisions for the company.
Manual tracking of inventory is a control issue, since management has to rely on often outdated and potentially incorrect data due to human error. By utilising IoT we can effectively have an accurate inventory count available in real time. With this constant flow of data we are able to derive metrics which show how goods are being consumed, so that management can optimise the supply chain as well as inventory levels
Keywords/Verticals: Inventory management, iOT, Fog Computing, data management.
erDiagram
Cloud }|..|{ EdgeNode1 : Internet
Cloud }|..|{ EdgeNode2 : Internet
EdgeNode1 }|..|{ iOTScale1 : WLAN
EdgeNode1 }|..|{ iOTScale2 : WLAN
EdgeNode1 }|..|{ iOTScale3 : WLAN
EdgeNode2 }|..|{ iOTScale4 : WLAN
EdgeNode2 }|..|{ iOTScale5 : WLAN
EdgeNode2 }|..|{ iOTScale6 : WLAN

Hardware Components
Link to the GitHub repo for the code
Cloud Layer:
Eclipse Streamsheets allows for us to easily aggregate and visualise data flows. For this reason, It will be run on the cloud node and will oversee all the data produced by the smart factories. Another benefit that is provided by Eclipse Streamsheets are the many different pre-configured services that run on the image; such as Eclipse Mosquitto, and Mongo DB.
Edge Agent Layer:
The goal of this demo is to demonstrate how Eclipse ioFog can easily orchestrate a multi-Edge network, over the public internet, and allow for dynamic configurations between each node. In this demo, ioFog was utilised to deploy pre-made docker containers which hold a software stack consisting of Eclipse Mosquitto, Express web-server, and 2 different MQTT clients to send and receive messages across the network.
Internet of Things Layer:
The low-power ESP8266 was leveraged to bring data-collection directly at the point in which data is created. These boards combined with a set of load cells allow us to accurately derive the number of items in a plastic bin. These boards, are then able to publish the counts via MQTT over WLAN to the Edge layer.
How the Data Flows Between Layers
Note: to make installation easier, it is recommended to install portaner on the 'master-agent' machine
docker run -d -p 1883:1883 -p 27017:27017 -p 6379:6379 -p 8080:8080 -p 8081:8081 -p 8083:8083 -p 8088:8088 -p 9001:9000 cedalo/streamsheets:latest
go to Eclipse Streamsheets web portal > Hamburger menu > Administration > consumers > MQTT_Consumer > scroll down, to review username and password
cd ioFog
edit ControlPlaneSetup.yaml & StreamsheetsAgentConfig.yaml, to match your required configuration.
all fields that should be edited have been marked with a #
in order for Eclipse ioFog for function, one must prepare the network. This means that the machine which runs iofogctl can ssh into all machines without a password, run sudo commands without being asked for a password, and lastly, network ports must be opened to allow for ssh, and web socket connection to occur.
for further explanation please read the ioFog documentation:
https://ioFog.org/docs/2/platform-deployment/prepare-your-network.html
https://ioFog.org/docs/2/platform-deployment/prepare-your-remote-hosts.html
This demo Relies on using mqtt between all agents and Eclipse Streamsheets, therefore one will most likely need to also port-forward 1883 TCP
cd ioFog
ioFogctl deploy -f ControlPlaneSetup.yaml
#if this fails using the following command to figure out what is going wrong
ioFogctl deploy -v -f ControlPlaneSetup.yaml --debug
ioFogctl deploy -f StreamsheetsAgentConfig.yaml
#if this fails using the following command to figure out what is going wrong
ioFogctl deploy -v -f StreamsheetsAgentConfig.yaml --debug
#only need to do this if the geevo/eclipse-smartfactory:<version> repo is down/discontinued
cd docker
docker build --no-cache --tag geevo/eclipse-smartfactory:<version> .
docker run -p 8080:8080 -p 1883:1883 -d geevo/eclipse-smartfactory:<version>
In this demo, the NODE MCU 1.0 is used.
use-case one as a clicker, which when pressed sends mqtt message to its configured agent, informing of how many times its been clicked

use-case two, a series of load cells is used to count the number of items in a bin, and when there is a change a message is published to the configured agent.

to install, open respective arduino sketch located in the Arduino file.
Change the parameters for wifi, mqtt, and other properties.
1) NodeMCU library: https://arduino.esp8266.com/stable/package_esp8266com_index.json
2) PubSubClient: https://github.com/knolleary/pubsubclient
3) Arduino_JSON: https://arduinojson.org/
4) HX711 (loadcell library): https://github.com/bogde/HX711/blob/master/src/HX711.h
5) upload the sketch
Both devices should automatically connect to the configured wifi-network, and post a message to the MQTT server which was defined upon creation of data.
Content type
Image
Digest
Size
39.5 MB
Last updated
about 6 years ago
docker pull geevo/eclipse-smartfactory