Repository navigation
5. Connecting to NodeRed
-
Before weighing the ingredients, make sure Node-RED is set up and the weighing machine is connected to a PC through a cable. Then, inside Node-RED, locate the node COM8, and edit the
Serial Portby clicking the pencil icon, then click the search icon beside theSerial Port. The weighing machine should be found immediately. After that, clickUpdateon the top right corner. The weighing mahchine is set up. -
Before deploying the Node-RED flow, the API key from ERPNext is needed to insert the data from Node-RED to ERPNext. Go to
Settingsat the top right corner of the page, then clickMy Settings, scroll all the way down and find the sectionAPI AccessandGenerate Keys. -
The API keys in ERPNext contains two parts:
API KeyandAPI Secret. Save theAPI Secrettoken somewhere safe as it cannot be viewed or regenerated again. Refresh the page, andAPI Keywill appear besideAPI Secret. -
In ERPNext, go to
LGM Settings. Fill up the required fields.
-
API Keyis the API Key in the settings. -
API Secretis the API Secret in the settings. -
URLshould be your network IPv4 URL. Do make sure to includehttp://in front of the IP address. -
Portis the port number for Node-RED. By default, it is1880.

- To find your Wi-Fi address, open a terminal and type in
ipconfig. UnderWireless LAN adapter Wi-Fi, look forIPv4 address, as shown in the picture above.
The fields you need to include in NodeRed are the following: "job_card" or "work" for job card ID "name" for ingredient name "mix_no" for mix number "weight" for measured ingredient weight
Here are the pages