ERPNext truck scale serial interface

Hello to everyone, I’m looking for a solution to interface a truck scale to ERPNext app.
The idea is to capture the weight of a truck thru a serial interface from the scale (Cardinal), can anyone point me to the right direction please?
Do I need an intermediate software to make the input?

Thanks for your help

José

1 Like

You would need some software to read data from the scale sensors at a minimum.

How you integrate it into ERPNext then depends on what you want to do with the data.

Thanks for your reply, what I need is to capture the truck’s weight in a field of a Doctype form and save it to the database.
Is there a way to read a string on a text file or STDOUT and paste it on a form field?

How are you reading your serial interface?

Let’s suppose that the reader puts out a file. You could upload that file using a Customized Form Button and read it via JS or a Python API endpoint and then fill the field with the parsed value.

If you’re reading from the input as a system device, there are certain complications. A browser extension or a local app could help with it; the app would work like a barcode scanner does and key-in the scale data (given it is only 1 field).

Thank you Kevin for four input.
The file read would be the least elegant solution but systems like this worked like that in the past.
But the idea of a browser extension really makes me click, I’m going to search on that !!
I’ll post my findings.
Thank you again

It was really fast to find a good possibility:

It’s a chrome API to read and write over serial ports, it’s native to chrome. I’ll start testing as soon as I get my hands on a serial device in my lab.

1 Like

Thanks @Ipasoft-sv. This might be the solution to send items price to a customer VFD in retail POS.

@olamide_shodunke have you tried the Google API for USB VFD?

Thanks @muzzy for bringing this to my attention

@EnSeal and I will test this

Thanks

1 Like

Exactly, there are lots of applications that need to interact with external devices.
In my my case:
Scales
Gas pumps
RFID
It would be important to open a dedicated channel for interfacing these kind of devices.
Thanks to all

I also found this other development to check it out:

Welcome @olamide_shodunke. Do keep us posted. Let me know if you need any assistance. Would be happy to help.

any solution for truck scale? please share your code.

Hi Mohamed - this isn’t my repository, but this developer has implemented serial scales in the POS for me. Maybe you will find his repository useful.

And it’s specifically this script that mostly deals with the weigh scale.

2 Likes