mvm-control
Script to control the Mechanical Ventilator Milano
Installation
To install
pip install mvm-control
Upgrade
To upgrade
pip install -U mvm-control
Usage
mvm-control [options] <subcommand> [sub options] ...
The following subcommands are available:
- set
- get
- load
- save
- log
- clog
- convert
Example
mvm-control -p /dev/ttyUSB0 log run_001.json
Options
-
Force the DTR bit on the serial port, if the board resets every time you issue a command, try forcing this high or low
--force-dtr [0/1] -
Increase the verbosity of output
-v / --verbose -
Specify the serial port to use
-p / --port <port> -
Print the version out and exit
--version
Set
Sets a parameter on the ESP32
mvm-control set <param> <value>
Example
mvm-control set mode 1
Get
Gets a parameter on the ESP32 and return its string value
mvm-control get <param>
Example
mvm-control get mode
Log
Logs the ESP32 response to get all to a file, hit CTRL+C to break.
mvm-control log <file>
Options
- Set the logging rate in hertz:
-r / --rate <hertz> - Setup the ESP32 using a configuration or log file:
-u / --use-cfg <file> - Use compact log format:
-c / --compact - Stop logging after X time:
-t / --time <X> - Don't do
set run 0at start or end-of-log:-o / --overide-run - Also create CSV file at end of log:
-a / --also-csv - Send data for remote monitoring:
-m / --monitor <username> <password> -mc / --monitor-config <monitor-config-file> --campaign <campaign> --run <run> - Do not print data to screen nor save to file:
-n / --no-log
Examples
mvm-control log -c -r 20 -u cfg.json run_001.json
mvm-control log -r 10 -n -m username password --monitor-config monitorconfig.json
Console_log
Sets the ESP32 into console mode, and logs the ESP32 debug messages
mvm-control clog my_log.json
Options
- Setup the ESP32 using a configuration or log file:
-u / --use-cfg <file> - Use compact log format:
-c / --compact - Stop logging after X time:
-t / --time <X> - Don't do
set run 0at start or end-of-log:-o / --overide-run - Also create CSV file at end of log:
-a / --also-csv
Example
mvm-control clog --use-cfg cfg.json run_001.json
Load
Loads a JSON configuration files settings into an ESP32.
mvm-control load <file>
Example
mvm-control load file.json
Note: This works on configuration files and log files
Save
Saves an ESP32 configuration to a JSON file
mvm-control save <file>
Example
mvm-control save file.json
Convert
Convert a compact or normal JSON log file to CSV file format
mvm-control convert <jsonfile> <csvfile>
Example
mvm-control convert mylog.json mylog.csv
Examples
log file
{
"settings": {
"warning": "0",
"assist_ptrigger": "4.00",
"run": "0",
"battery": "100.00",
"power_mode": "0",
"alarm": "0",
"backup_min_rate": "0.00",
"pressure_support": "20.00",
"rate": "15.00",
"version": "HW_V3_2020_04_15_00",
"ptarget": "20.00",
"mode": "0",
"backup_enable": "0",
"ratio": "0.61",
"backup": "0",
"assist_flow_min": "5.00"
},
"data": [{
"time": 1587000784.05,
"last_pressure": 0.00,
"flux": 239.54,
"last_o2": 21.70,
"last_bpm": 0.00,
"tidalvolume": 0.00,
"last_peep": 0.00,
"temperature": 24.00,
"battery_powered": 0,
"current_battery_charge": 100.00,
"current_p_peak": 0.00,
"current_t_visnp": 0.00,
"current_t_vesp": 0.00,
"current_vm": 0.00
},
{
"time": 1587000784.06,
"last_pressure": 0.00,
"flux": 239.54,
"last_o2": 21.70,
"last_bpm": 0.00,
"tidalvolume": 0.00,
"last_peep": 0.00,
"temperature": 24.00,
"battery_powered": 0,
"current_battery_charge": 100.00,
"current_p_peak": 0.00,
"current_t_visnp": 0.00,
"current_t_vesp": 0.00,
"current_vm": 0.00
}]
}
Metadata
Release files for mvm-control 1.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mvm-control-1.4.3.tar.gz | 24.1 kB | Without provenance | Details for mvm-control-1.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mvm_control-1.4.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for mvm_control-1.4.3-py2.py3-none-any.whl |
Total release size: 47.3 kB
Release files / mvm-control-1.4.3.tar.gz
| Download URL | mvm-control-1.4.3.tar.gz |
|---|---|
| Size | 24.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f668847d06c3703cf96c355f472e3e44a8a341a6daac992e82a4b5abb63e4122
|
|
BLAKE2b-256 checksum How to use checksums |
48f1e5974cfcb73adb054ccf825aa81ad5e278f4cc34487531e8d69ffdb9d7d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.18.4
|
Release files / mvm_control-1.4.3-py2.py3-none-any.whl
| Download URL | mvm_control-1.4.3-py2.py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c8d6c0eaf9b4d9c9e1762b29569665bc4567ee237fabcf979de70b4869fc1976
|
|
BLAKE2b-256 checksum How to use checksums |
16d4b9cfc9906fcbe8c79148404a03e6d986d210c48a53f81a87c9a5b5f95162
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.18.4
|
Security for mvm-control 1.4.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.