Skip to content

6. Guide to Set Up Weight Fetching from Node‐RED to ERPNext

seejayyy edited this page Feb 7, 2024 · 1 revision
  1. 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 Port by clicking the pencil icon, then click the search icon beside the Serial Port. The weighing machine should be found immediately. After that, click Update on the top right corner. The weighing mahchine is set up.

  2. Before deploying the Node-RED flow, the API key from ERPNext is needed to insert the data from Node-RED to ERPNext. Go to Settings at the top right corner of the page, then click My Settings, scroll all the way down and find the section API Access and Generate Keys.

  3. The API keys in ERPNext contains two parts: API Key and API Secret. Save the API Secret token somewhere safe as it cannot be viewed or regenerated again. Refresh the page, and API Key will appear beside API Secret.

  4. In ERPNext, go to LGM Settings. Fill up the required fields.

  • API Key is the API Key in the settings.
  • API Secret is the API Secret in the settings.
  • URL should be your network IPv4 URL. Do make sure to include http:// in front of the IP address.
  • Port is the port number for Node-RED. By default, it is 1880.

image

  • To find your Wi-Fi address, open a terminal and type in ipconfig. Under Wireless LAN adapter Wi-Fi, look for IPv4 address, as shown in the picture above.