instrutech-gauges
Python drivers for InstruTech gauges over serial or TCP serial gateways.
Install
uv add instrutech-gauges
Or for local development:
uv sync
Available drivers
VGC301HornetIGM402- Public base class for custom devices:
InstruTechAsciiGauge
Quick start (VGC301)
from instrutech_gauges import SerialTransport, VGC301
t = SerialTransport(port="/dev/ttyUSB0", baudrate=19200, timeout_s=0.3)
g = VGC301(t, address=1)
with g:
print(g.read_sw_version())
print(g.read_pressure_torr())
g.set_trip_point(1, "on_below", 4.00e2)
print(g.read_trip_point(1, "on_below"))
Quick start (Hornet IGM402)
from instrutech_gauges import HornetIGM402, SerialTransport
t = SerialTransport(port="/dev/ttyUSB0", baudrate=19200, timeout_s=0.3)
g = HornetIGM402(t, address=1)
with g:
print(g.read_sw_version())
print(g.read_system_pressure_torr())
print(g.read_pressure_unit())
Firmware notes for HornetIGM402:
SESemission setting responses like0.1MA_EM/4.0MA_EMare parsed.RUaccepts long unit tokens (TORR,MBAR,PASCAL).- Optional command families (
RU/SU,RDIG*) raiseInstruTechUnsupportedCommandErroron firmware that returnsSYNTX ER. - Socket transport defaults to
\rcommand termination.
Without context manager (with)
Use explicit open() / close() with try/finally:
from instrutech_gauges import SerialTransport, VGC301
t = SerialTransport(port="/dev/ttyUSB0", baudrate=19200, timeout_s=0.3)
g = VGC301(t, address=1)
g.open(probe=True)
try:
print(g.read_sw_version())
print(g.read_pressure_torr())
finally:
g.close()
from instrutech_gauges import HornetIGM402, SerialTransport
t = SerialTransport(port="/dev/ttyUSB0", baudrate=19200, timeout_s=0.3)
g = HornetIGM402(t, address=1)
g.open(probe=True)
try:
print(g.read_sw_version())
print(g.read_system_pressure_torr())
finally:
g.close()
Public base class
InstruTechAsciiGauge exposes shared protocol and transport helpers for building new drivers:
- framing/parsing (
#xx...<CR>,*xx...<CR>) query()/query_float()/command_prog_ok()- serial reconfiguration (
set_baud,set_parity,set_serial_comm) - common Mini-Convectron-style commands (
VER,RD,TS,TZ,SL/SH,RL/RH,FAC,RST)
Minimal custom driver:
from instrutech_gauges import InstruTechAsciiGauge
class MyGauge(InstruTechAsciiGauge):
def read_custom_value(self) -> float:
return self.query_float("RDCUSTOM")
Transport
SerialTransport: local serial viapyserialSocketTransport: TCP serial gateways (raw TCP)
SocketTransport defaults to CR (\r) command termination. If your gateway expects
CRLF, override it:
from instrutech_gauges import SocketTransport
t = SocketTransport("192.168.1.50", 4001, timeout_s=1.0, write_terminator=b"\r\n")
Runtime serial reconfiguration (set_baud, set_parity) is supported only with SerialTransport.
VGC301 serial notes
Per the VGC301 manual, SB* / SP* / SA* / FAC require RST before they take effect.
VGC301.set_baud(...)defaults toreset_after=TrueVGC301.set_parity(...)defaults toreset_after=True- For ODD/EVEN parity, data bits default to 7; for NO parity, data bits default to 8
Error handling
Typical exceptions:
InstruTechTimeoutErrorInstruTechProtocolErrorInstruTechDeviceErrorInstruTechUnsupportedTransportOperationError
Release flow
- CI runs on every push and PR (
.github/workflows/ci.yml). - PyPI publish runs only on tags that start with
v(.github/workflows/publish.yml). - Publish is blocked unless tag version matches
pyproject.tomlversion exactly.
Example release:
git tag v0.1.1
git push origin v0.1.1
Configure PyPI Trusted Publisher for this repository so the publish workflow can upload without storing an API token.
Release files for instrutech-gauges 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| instrutech_gauges-0.3.2.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| instrutech_gauges-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:23.7 kB
Release files / instrutech_gauges-0.3.2.tar.gz
| Download URL | instrutech_gauges-0.3.2.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa28d403583363e38176f4f3c0e8c8978080f6237ae682002c7a18c1f262c097
|
|
BLAKE2b-256 checksum How to use checksums |
43d2a43df7a9236dc9eb567b79b405b2a55dcbc03ec99e269bb9d0ab8ed6aff8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency logRelease files / instrutech_gauges-0.3.2-py3-none-any.whl
| Download URL | instrutech_gauges-0.3.2-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b5ecafb55af3f6f4dbe8c88138489555c4c699a9875ee435fe643dd37c5cff7
|
|
BLAKE2b-256 checksum How to use checksums |
7ea33ff1f4676997d2f07ff02e57dd7c06f74ddc42f477bb156ac7069100a550
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency log