Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Python driver and command-line tool for Brooks Instrument mass flow controllers.
pip install brooks-mfc
This driver uses an undocumented REST API in the devices's web interface for communication. The compatibility and stability of this interface with all Brooks controllers is not guaranteed.
To test your connection and stream real-time data, use the command-line interface. You can read the flow rate with:
$ brooks-mfc 192.168.1.200
{
"Customer Flow Totalizer": 0.0,
"Flow": -0.3,
"Flow Hours": 1.0,
"Flow Totalizer": 0.0,
"Live Setpoint": 0.0,
"Operational Hours": 50.0,
"Setpoint": 0.0,
"Supply Voltage": 22.93,
"Temperature": 27.11,
"Valve Position": 0.0
}
You can optionally specify a setpoint flow with the set flag:
brooks-mfc 192.168.1.150 --set 7.5.
The units of the setpoint and return are
specified using the --units
flag. See mfc --help
for more.
This uses Python ≥3.5's async/await syntax to asynchronously communicate with the mass flow controller. For example:
import asyncio
from brooks_mfc import FlowController
async def get():
async with FlowController('the-mfc-ip-address') as fc:
print(await fc.get())
asyncio.run(get())
The API that matters is get
, set
. Optionally, units can be passed with
either command. If no units are specified the existing units configured for
the device are used.
>>> await fc.get()
>>> await fc.get('%')
{
"Customer Flow Totalizer": 0.0,
"Flow": -0.3,
"Flow Hours": 1.0,
"Flow Totalizer": 0.0,
"Live Setpoint": 0.0,
"Operational Hours": 50.0,
"Setpoint": 0.0,
"Supply Voltage": 22.93,
"Temperature": 27.11,
"Valve Position": 0.0
}
>>> await fc.set(10)
>>> await fc.set(10, 'SCCM')
There's much more that could be set or returned from the flow controllers but I haven't had a reason to flesh all the the options out. Feel free to submit an issue with requests or a PR.
FAQs
Python driver for Brooks Instrument mass flow controllers
We found that brooks-mfc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.