Scale integration

Hi guys,

I have a scale that I want to use with SambaPOS 5.2.12.

I followed the whole tutorial for v4 and something is just not working.

When I connect to the scale via Putty I get the weight 0.789kg. It is not a continuous value that is send from the scale. On the scale I need to press print and this then sends the weight.

How can I set it up to work on SambaPOS? Or do I need other scale?

Depends how it sends it.
Try ‘printing’ with notepad open.
If it outputs there it acts like keyboard/HID and you can just use number pad rule to pick it up.
If not you may need to look at actual scale intergration options.

No need to test it with notepad because it won’t work. Custom Scale device mentioned in tutorial can receive readings from COM port and set the numberpad value but it needs a regular expression to be able to extract weight data.

@juan13rautenbach some scales can set to continuous mode through settings menu that is accessible from the front panel however at least you should be able to read a value from SambaPOS when you press the print button. How did you configured the regex? How reading appears on putty screen when you press print?

Hi thanks for the replies,

@emre this is the screen from putty. So I have connected to Putty then I have blank screen, I put something on the scale and press “Print” then this is what the reading is.

Untitled

The regex is what I might have an issue with. I have googled and found some websites where you paste the text and then you build the regex to match what you want.

So the one I’m trying now is

Untitled1

[0-9]+[.]+[0-9]+[0-9]+[0-9]

The scale can only weigh up to 6kg so no need for double digits. I’m not very good with regex so sorry for this in advanced.

Thanks for the help in advanced.

Anyone have any ideas? Or do I have to get other scale?

Try [\D]+[^\.]+\d+

Thanks @emre, I tried it and nothing.

On the Numberpad input box I don’t get a reading. Any other ideas?

Maybe if I use a pop-up box with a product tag on the items? Do you think this might help?

For next update I’m planning to implement debug mode / logging for devices. It may help us to identify the issue.

1 Like

Thanks @emre. Any idea when the next update? I know the latest update was not so long ago.

I added logging support for next update. That will be released for testing in few days.

Enable debug mode and post generated scale.log file here, so we can see what happens.

Watch this topic for next update.

1 Like

Scale.log
2018/09/03 14:03
2018/09/03 14:03:19 Custom Scale>Init Start,COM1
######################### E N D #########################
2018/09/03 14:03
2018/09/03 14:03:19 Custom Scale>Init End,COM1
######################### E N D #########################
2018/09/03 14:04
2018/09/03 14:04:15 Custom Scale>Data: 1.534kg
,COM1
######################### E N D #########################
2018/09/03 14:04
2018/09/03 14:04:15 Custom Scale>Match Data:1.534,rx:[^\d]+([0-9]+[.,]+[0-9]+),COM1
######################### E N D #########################
2018/09/03 14:04
2018/09/03 14:04:15 Custom Scale>Final Match Data:,COM1
######################### E N D #########################
2018/09/03 14:04
2018/09/03 14:04:45 Custom Scale>Init Start,COM1
######################### E N D #########################
2018/09/03 14:04
2018/09/03 14:04:45 Custom Scale>Init End,COM1
######################### E N D #########################
2018/09/03 14:09
2018/09/03 14:09:52 Custom Scale>Init Start,COM1
######################### E N D #########################
2018/09/03 14:09
2018/09/03 14:09:52 Custom Scale>Init End,COM1
######################### E N D #########################

scale.zip (337 Bytes)

Can you …

  1. delete scale.log
  2. change string format as #.####
  3. post scale.log

Scale.log
2018/09/03 15:45
2018/09/03 15:45:15 Custom Scale>Init Start,COM1
######################### E N D #########################
2018/09/03 15:45
2018/09/03 15:45:15 Custom Scale>Init End,COM1
######################### E N D #########################
2018/09/03 15:45
2018/09/03 15:45:52 Custom Scale>Finalize Start,COM1
######################### E N D #########################
2018/09/03 15:45
2018/09/03 15:45:52 Custom Scale>Finalize End,COM1
######################### E N D #########################
2018/09/03 15:45
2018/09/03 15:45:52 Custom Scale>Init Start,COM1
######################### E N D #########################
2018/09/03 15:45
2018/09/03 15:45:52 Custom Scale>Init End,COM1
######################### E N D #########################
2018/09/03 15:47
2018/09/03 15:47:21 Custom Scale>Data: 1.876kg
,COM1
######################### E N D #########################
2018/09/03 15:47
2018/09/03 15:47:21 Custom Scale>Match Data:1.876,rx:[^\d]+([0-9]+[.,]+[0-9]+),COM1
######################### E N D #########################
2018/09/03 15:47
2018/09/03 15:47:21 Custom Scale>Final Match Data:,COM1
######################### E N D #########################
2018/09/03 15:48
2018/09/03 15:48:04 Custom Scale>Init Start,COM1
######################### E N D #########################
2018/09/03 15:48
2018/09/03 15:48:04 Custom Scale>Init End,COM1
######################### E N D #########################
2018/09/03 15:48
2018/09/03 15:48:33 Custom Scale>Data: 2.196kg
,COM1
######################### E N D #########################
2018/09/03 15:48
2018/09/03 15:48:33 Custom Scale>Match Data:2.196,rx:[^\d]+([0-9]+[.,]+[0-9]+),COM1
######################### E N D #########################
2018/09/03 15:48
2018/09/03 15:48:33 Custom Scale>Final Match Data:,COM1
######################### E N D #########################
scale.zip (377 Bytes)

Is your system decimal separator is “.” ? Seems like it can’t convert reading to a number. If you’re using , as decimal separator try adding . to Find and , to replace. It may help fixing the issue.

Awesome!!! Thank you for your help @emre it is working perfectly!

1 Like

Great!. Can you post ss of your device settings for a final review?

ss
This is the screenshot of what worked for me.

1 Like

You can change string format to 0.#### to handle below kg weights properly. Other settings appears fine.

I’m wondering why debug mode setting doesn’t appears there?

Hi Emre,

Sorry for the delay in the reply. Everything is working 100%. The previous screenshot was of 5.2.12 as I didn’t want to upgrade and I tested the changes in there. It didn’t work so now upgraded all terminals to 5.2.13.

Untitled

This is the screenshot from 5.2.13.

1 Like