Skip to main content

Python driver for Sartorius and Minebea Intec scales.

Project description

sartorius

Asynchronous python ethernet interface and command-line tool for Sartorius and Minebea Intec scales.

Compatibility

This driver should work for any ethernet scale that uses the standardized communications protocol of the Scale Manufacturers Association. However, it has only been tested on the following models:

  • Minebea Intec Signum
  • Sartorius Entris
  • Sartorius Miras

Installation

uv install sartorius

Scale Setup

For Minebea scale setup, navigate to SETUP - UNICOM - DATAPROT - ETHER.

  • Make sure SRC.IP is set to a valid LAN address
  • Ensure MODE - SBI-SRV - 6.1.1 is set (manual says this should be default but it is not)
  • All other defaults are good

This driver is intended to be stable to disconnects, so operators should be able to unplug and reposition the device without affecting any long polling.

Command Line

$ sartorius scale-ip.local
{
    "mass": 0.0,
    "units": "kg",
    "stable": true,
    "info": {
        "model": "SIWADCP-1-",
        "serial": "37454321",
        "software": "00-37-09"
    }
}

If using a port other than the default of 49155 e.g. for a MODBUS gateway, use --port or a colon between the IP address and port. sartorius 192.168.1.1 --port 10000 or sartorius 192.168.1.1:12345

You can tare and zero with --zero and remove the info field with --no-info. See sartorius --help for more.

To use in shell scripts, parse the json output with something like jq. For example, sartorius scale-ip.local | jq .mass will return the mass.

Python

If you'd like to link this to more complex behavior, consider using a Python script. This driver exclusively supports asynchronous Python ≥3.7.

import asyncio
import sartorius

async def get():
    async with sartorius.Scale('scale-ip.local') as scale:
        await scale.zero()             # Zero and tare the scale
        print(await scale.get())       # Get mass, units, stability
        print(await scale.get_info())  # Get model, serial, software version

asyncio.run(get())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sartorius-0.7.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sartorius-0.7.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file sartorius-0.7.0.tar.gz.

File metadata

  • Download URL: sartorius-0.7.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sartorius-0.7.0.tar.gz
Algorithm Hash digest
SHA256 7e29b8093474402522b76af4e3bcd881fd1e10fb2718bcb984d6938ac7890a6c
MD5 7da96f4b66ba7a8e1245055df7ea6c76
BLAKE2b-256 cadd4e712880f342bfc8540447564213bdf17ff35dbbd3319b5d688a7386874c

See more details on using hashes here.

File details

Details for the file sartorius-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: sartorius-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sartorius-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65c73e8e72b0234af780334b63c0211848f9f0872394728eff6576060130d616
MD5 6435ad30c55d9aa7ab69475e40f6d828
BLAKE2b-256 186bb6d1e1345f69e3e37b317d3ef74cde6c62a6b2e10b21735a826d9076309d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page