{"id":14449412,"url":"https://github.com/msf4-0/SWSI","last_synced_at":"2025-08-28T03:31:47.781Z","repository":{"id":41889772,"uuid":"484109135","full_name":"msf4-0/SWSI","owner":"msf4-0","description":"Smart Weighing Scale \u0026 Inventory","archived":false,"fork":false,"pushed_at":"2022-07-28T07:58:16.000Z","size":142,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-25T09:51:42.997Z","etag":null,"topics":["arduino","erpnext","inventory-tracking-system","iot","node-red"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msf4-0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-21T15:37:32.000Z","updated_at":"2024-12-23T03:33:28.000Z","dependencies_parsed_at":"2022-08-03T06:15:30.454Z","dependency_job_id":null,"html_url":"https://github.com/msf4-0/SWSI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/msf4-0/SWSI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msf4-0%2FSWSI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msf4-0%2FSWSI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msf4-0%2FSWSI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msf4-0%2FSWSI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msf4-0","download_url":"https://codeload.github.com/msf4-0/SWSI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msf4-0%2FSWSI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272430607,"owners_count":24933892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","erpnext","inventory-tracking-system","iot","node-red"],"created_at":"2024-09-01T08:01:16.287Z","updated_at":"2025-08-28T03:31:47.449Z","avatar_url":"https://github.com/msf4-0.png","language":"C++","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Smart Weighing Scale \u0026amp; Inventory\nA wireless \u0026 portable smart weighing scale embedded system that interfaces with Node-Red for IoT connectivity and ERPNext for inventory \u0026 stock tracking.\n\nThe embedded system is developed on PlatformIO IDE and built on the Arduino framework.\n\n\u003cimg src= \"https://user-images.githubusercontent.com/76152507/164983018-ce873b46-68f4-4928-9d6d-3f753c45c488.png\" width=\"500\" height=\"400\" /\u003e\n\n## **Installation** ## \n1. This application is supported in both Windows and Ubuntu 20.04 \n2. This application have been tested on vultr cloud platform, other cloud platforms have not been tested.\n\n  - Install Node.js at https://nodejs.org/en/ \n  - Install Node-RED at https://nodered.org/docs/getting-started/local\n  - Install MySQL on windows at https://dev.mysql.com/downloads/installer/ \n  - Install MySQL on Ubuntu 20.04 using the terminal\n      1. Typed in ```sudo apt update``` \n      2. Install mySQL server package using the prompt ```sudo apt install mysql-server``` \n      3. Ensure that the server is running using the prompt ```sudo systemctl start mysql.service```\n      4. Run the security script ```sudo mysql_secure_installation```, the first prompt will ask the user to validate the password. While the second prompt will be used for the MySQL root user.\n      5. You can check the condition of the services by using the command prompt ```systemctl status mysql.service```\n  - Install Influxdb at https://portal.influxdata.com/downloads/\n  - Install ERPNext using vultr (A cloud platform) at https://www.vultr.com/\n\n## **Basic User Guide** ##\n\nThere are several process that you should be aware of before running the flow;\n1. 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.\n```\n// WiFI \u0026 MQTT\nconst char* id = \"gdWS1\"; // Unique Scale ID\nconst char* ssid = \"!!!WIFI_ID!!!\";\nconst char* password = \"!!!WIFI_PASSWORD!!!\";\nconst char* mqtt_server = \"192.168.0.164\"\n```\n\n2. In ERPNext homepage; \n\ni. Underneath \"My settings\"\n\n\u003cimg src= \"https://user-images.githubusercontent.com/75675418/181437964-1305fefa-9fe0-460c-a80b-50efa9cf91e8.png\" width=\"216\" height=\"401\" /\u003e\n\nii. You will able to find API Access that could \"Generate API Key\", likes so;\n\n\n\u003cimg src= \"https://user-images.githubusercontent.com/75675418/181438828-71cf2b39-27a0-4867-ba44-2961529f2f58.JPG\" width=\"631\" height=\"181\" /\u003e\n\niii. Once generated, you can copy both the API Keys and the API Secret onto the Node-RED flow.\n\niv. By using change nodes and an inject node, you can make it so that the API Keys of the ERPNext to be global.\n\n\u003cimg src= \"https://user-images.githubusercontent.com/75675418/181440183-c336749e-6c41-46c6-9153-c10c1662c997.JPG\" width=\"420\" height=\"84\" /\u003e\n\nInside the ERPNext domain node;\n\n\u003cimg src= \"https://user-images.githubusercontent.com/75675418/181440187-be28c1f1-1201-4d98-b21d-c54c6879d2ce.JPG\" width=\"508\" height=\"337\" /\u003e\n\nInside the ERPNext token node;\n\n\u003cimg src= \"https://user-images.githubusercontent.com/75675418/181440177-a95ac427-3fde-4dbc-be94-2812a2074ef3.JPG\" width=\"505\" height=\"410\" /\u003e\n\nV. Once this is done, your ERPNext should be connected to the Node-RED\n\n3. Before importing the Node-RED flow, you need to install some Node-RED modules;\n  - node-red-contrib-influxdb\n  - node-red-contrib-aedes\n  - node-red-node-mysql\n  - node-red-contrib-bcrypt\n  - node-red-dashboard\n\n4. 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**.\n\n\u003cimg src= \"https://user-images.githubusercontent.com/75675418/181443483-63936997-03f6-49a8-a352-1fcdb2d0510f.JPG\" width=\"618\" height=\"160\" /\u003e\n\nOnce 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;\n\n\u003cimg src=\"https://user-images.githubusercontent.com/75675418/181444866-f88cdf0c-40d9-453d-8abe-6db3ee4f6944.JPG\" width=\"263\" height=\"156\" /\u003e\n\nLastly, to see the value that is being read by using the command ```select * from “[Your Database Name]” order by time desc limit 5```;\n\n\u003cimg src= \"https://user-images.githubusercontent.com/75675418/181445328-999dcf15-3ba3-4d75-94b8-e85251dc8541.JPG\" width=\"497\" height=\"185\" /\u003e\n\n5. 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;\n\n\u003cimg src= \"https://user-images.githubusercontent.com/75675418/181446719-ce58e390-7abe-49db-9655-445a063ad76b.JPG\" width=\"157\" height=\"59\" /\u003e\n\nUpon importing the flow, the node should also be configured accordingly. In our case, we set it as;\n\n\u003cimg src=\"https://user-images.githubusercontent.com/75675418/181447253-5d53da33-16b2-4470-9892-e79daaa72347.JPG\" width=\"500\" height=\"229\" /\u003e\n\nand\n\n\u003cimg src= \"https://user-images.githubusercontent.com/75675418/181447262-c13bf9b6-bc79-47a0-8db7-eac54bb34c71.JPG\" width=\"511\" height=\"577\" /\u003e\n\n\n## **Detailed Documentation** ##\nFollow the [documentation](https://drive.google.com/drive/folders/1bG_YV6uIwTKT_12CuCw8axnyWVp6YvOv?usp=sharing) process for further detailed explaination.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsf4-0%2FSWSI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsf4-0%2FSWSI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsf4-0%2FSWSI/lists"}