Code Monkey home page Code Monkey logo

swsi's Introduction

Smart Weighing Scale & Inventory

A wireless & portable smart weighing scale embedded system that interfaces with Node-Red for IoT connectivity and ERPNext for inventory & stock tracking.

The embedded system is developed on PlatformIO IDE and built on the Arduino framework.

Installation

  1. This application is supported in both Windows and Ubuntu 20.04
  2. This application have been tested on vultr cloud platform, other cloud platforms have not been tested.

Basic User Guide

There are several process that you should be aware of before running the flow;

  1. Within Microsoft Visual Studio, when trying to build and/or upload the code. In main.cpp (within the src folder), change the !!!WIFI_ID!!! and !!!WIFI_PASSWORD!!! according to your own network credentials. While the mqtt_server_IP_address change it according to your own IPv4 address.
// WiFI & MQTT
const char* id = "gdWS1"; // Unique Scale ID
const char* ssid = "!!!WIFI_ID!!!";
const char* password = "!!!WIFI_PASSWORD!!!";
const char* mqtt_server = "192.168.0.164"
  1. In ERPNext homepage;

i. Underneath "My settings"

ii. You will able to find API Access that could "Generate API Key", likes so;

iii. Once generated, you can copy both the API Keys and the API Secret onto the Node-RED flow.

iv. By using change nodes and an inject node, you can make it so that the API Keys of the ERPNext to be global.

Inside the ERPNext domain node;

Inside the ERPNext token node;

V. Once this is done, your ERPNext should be connected to the Node-RED

  1. Before importing the Node-RED flow, you need to install some Node-RED modules;
  • node-red-contrib-influxdb
  • node-red-contrib-aedes
  • node-red-node-mysql
  • node-red-contrib-bcrypt
  • node-red-dashboard
  1. To ensure that the data of the scale is being properly read, you need to ensure that influxdb is properly run. To do this, make a database called location1 and location2.

Once done, proceed with inserting measurement onto our databases by using the command insert gdWS1/main value=0.1 for scale 1 and insert gdWS2/main value=0.1 for scale 2. Following is the successful configuration of both databases and measurements within scale 1;

Lastly, to see the value that is being read by using the command select * from โ€œ[Your Database Name]โ€ order by time desc limit 5;

  1. For mysql, there is a node in node-RED that users should be aware of when running the flow, it is the mysql node that looks like;

Upon importing the flow, the node should also be configured accordingly. In our case, we set it as;

and

Detailed Documentation

Follow the documentation process for further detailed explaination.

swsi's People

Contributors

madzhaan avatar navanair avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.