imTigger / webapp-hardware-bridge

Silent print and serial ports for web!
MIT License
139 stars 74 forks source link

Weight receiving problem #4

Open tasselchof opened 5 years ago

tasselchof commented 5 years ago

Am I doing everything right?

I attached weights to USB, they are appeared on COM6 port.

After I assigned this to weights in configurator: https://monosnap.com/file/sWkGuIgZgoTzdkAD5qYBhpHh05nCMw

And started server: https://monosnap.com/file/Tl8YjpCYwtRHhHMTMvjygq6ToFyNZs

But when I put something on weights, no messages in web service: https://monosnap.com/file/qTdgWV5cGqCwC83tLyqFs8esTiB7Cx

tasselchof commented 5 years ago

After restart of weights and service something is coming in: https://monosnap.com/file/orpmcFdgF7JxfGnJopA23EuceLiykK

imTigger commented 5 years ago

Current default setting adapts AWH-SA30 (A Chinese weigh scale model) Any COM port weight scale should works with similar concept. Please check regex in websocket-weigh.js and set regex which fit the output of your scale.

tasselchof commented 5 years ago

On my weights I am receiving symbols: https://monosnap.com/file/De6U7Gtj0btsGBFXts2Yqph9o0kOAd

You know how to handle them?

imTigger commented 5 years ago

Please use putty or other serial terminal to collect the output of your scale, and then make a regex to match the output pattern.

For example, my scale output "ST,NT,+ 1.234kg" + line break in every single output, therefore: weightRegex is "([0-9]{1,2}\.[0-9]{3})kg" stableRegex is a regex boolean test to indicate if reading is stable

tasselchof commented 5 years ago

The case is that the scale I tested returning this on serial port:

https://monosnap.com/file/dc8z6ZfY0RYzYpSJMWj3ImGZyU6nCi

Your's as I understand returning exact numbers?