| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 1445 |
| Technical Name |
grev_od_scale_reader |
| License | OPL-1 |
| Website | https://grevlin.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 1445 |
| Technical Name |
grev_od_scale_reader |
| License | OPL-1 |
| Website | https://grevlin.com |
Grevlin Scale ReaderRead live weight from USB, Bluetooth and IP scales directly from the browser. No IoT box. No Enterprise dependency. No Python hardware library. ✓ Odoo 19 Community & Enterprise compatible |
|
|
|
|
|
Need help?Email odoo@grevlin.com · X: @GrevlinGlobal 30 days free support included |
Grevlin Scale Reader - Documentation
Read live weight from USB, Bluetooth and IP scales directly from the Odoo web client using browser-native hardware APIs. No IoT box, no Python hardware library, no Enterprise dependency.
Overview
Grevlin Scale Reader interfaces real weighing scales with Odoo over the three common hardware interface families - USB/serial, Bluetooth Low Energy and TCP/IP - using WebSerial, Web Bluetooth, WebUSB and WebSocket inside the browser. Scales are plugged into the operator's machine, not the server.
Key Features
- Device registry with per-interface connection parameters
- Pluggable protocol parsers (ASCII Continuous, Mettler-Toledo SICS, Generic JSON)
- Live OWL reader widget with stable-frame detection and Capture button
- Append-only scale.reading audit log with daily retention cron
- Token-authenticated HTTP push endpoint for headless agents
- Multi-company isolation through standard Odoo record rules
- Reusable scale_reader OWL service for downstream modules
Installation
- Copy the grev_od_scale_reader folder into your Odoo addons path.
- Restart the Odoo server.
- Go to :menuselection:`Apps`, click :guilabel:`Update Apps List`, search for Grevlin Scale Reader and click :guilabel:`Install`.
Note
The module declares no Python external dependency. The browser must be Chromium-based (Chrome, Edge, Brave, Opera) - Firefox does not implement WebSerial / Web Bluetooth / WebUSB.
Configuration
Register a Scale Device
- Go to :menuselection:`Scale Reader --> Scales` and click :guilabel:`New`.
- Fill in the :guilabel:`Name` of the device.
- Pick the :guilabel:`Interface Type`:
- Web Serial for USB / RS-232 bench scales
- Web Bluetooth for Bluetooth Low Energy scales
- Web USB for raw USB devices
- WebSocket for IP-attached scales
- Pick the :guilabel:`Protocol` (ASCII Continuous, Mettler-Toledo SICS or Generic JSON).
- Fill in the interface-specific parameters (baudrate, service UUID, vendor/product id, or WebSocket URL).
- Set :guilabel:`Unit of Measure` and :guilabel:`Stable Only` if you want to reject unstable frames.
- Save and click :guilabel:`Read Now` to test.
Important
The first time you click :guilabel:`Read Now` the browser asks the operator to grant access to the hardware. This permission is per-origin and per-device.
Retention
Open :menuselection:`Scale Reader --> Configuration --> Settings` and set :guilabel:`Reading Retention (days)` (default: 90). A daily cron deletes readings older than this threshold.
Usage
Capturing a Reading from the UI
- Open the device form.
- Click :guilabel:`Read Now` - the live reader widget opens.
- Watch the live weight stream until the stability indicator turns green.
- Click :guilabel:`Capture` - a scale.reading is persisted and the dialog closes.
Tip
Hold :guilabel:`Stable Only` enabled in production - it forces the Capture button to remain disabled until the device reports a stable frame.
HTTP Push from a Headless Agent
A Raspberry Pi or industrial PC can post readings without opening a browser.
curl -X POST https://your-odoo/scale/reading \ -H "Content-Type: application/json" \ -H "X-Scale-Token: <auth_token>" \ -d '{"weight": 12.34, "uom": "kg", "stable": true, "raw": "ST,GS,12.34kg"}'
The endpoint validates the token against scale.device.auth_token, resolves the UoM, persists the reading and returns {"reading_id": <id>, "device_id": <id>}.
Use the :guilabel:`Rotate Token` action on the device form to invalidate the old token.
Integration for Downstream Modules
Other Odoo modules consume the same drivers via the scale_reader OWL service:
import { useService } from "@web/core/utils/hooks"; const reader = useService("scale_reader"); const session = await reader.openSession(deviceId); for await (const frame of session.frames()) { // frame = { weight, uom, stable, raw } } await reader.recordReading(deviceId, capturedFrame);
This is exactly how :doc:`grev_od_pos_scale_reader </../grev_od_pos_scale_reader/doc/index>` plugs into Odoo POS without rewriting the Scale Screen.
Security
Two groups ship with the module:
- Scale User (group_scale_user) - read devices, create readings.
- Scale Manager (group_scale_manager) - full CRUD, settings, token rotation.
Both scale.device and scale.reading carry company_id with record rules following the parent_of pattern. Users in company A never see company B's hardware.
Compatibility
- Odoo 19 Community and Enterprise.
- Browser: Chromium 89+ (WebSerial), 70+ (Web Bluetooth), 56+ (WebUSB).
- Python: none.
- Enterprise iot addon: not required, not used.
See also
- Grevlin website
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module