UNPKG

oee-cli

Version:

Node.js CLI program to calculate and log OEE data obtained from MQTT server to InfluxDB

21 lines (10 loc) 850 B
The expected message sent to the oee/Machine1 topic should include JSON data with the following fields: runTime, totalTime,targetSpeed,totalProduced,goodProduced. example json input { "runTime": 3600, "totalTime": 4200, "targetSpeed": 50, "totalProduced": 10000, "goodProduced": 9700 } The input is taken from mqtt topic and output is logged into influxdb. This program calculates OEE from above parameters. To run this program after npm install oee-cli -g oee-cli -b <MQTT broker URL> -u <MQTT broker username> -p <MQTT broker password> -i <InfluxDB URL> -d <InfluxDB database> -t <MQTT topic to subscribe to> Example oee-cli -b mqtt://localhost -u " " -p " " -i localhost -d oee -t oee/machine1 Replace localhost by your real machine or vm name or ip oee-cli - By Harshad Joshi at Bufferstack.IO Analytics Technology LLP, Pune, 2023