semvec/pypi-packages huggingface dataset:
p2plant-ioc 1.0.1
Access to process variable of a P2Plant
Requires Python: >=3.7

# EPICS softIocPVA for P2Plant devices

# Example
Start P2Plant of simulated 8-channel ADC as described in [P2Plant](https://github.com/ASukhanov/P2Plant).

Run softIocPVA:<br>
```
python -m p2plant_ioc -l -k
```
The P2Plant should start streaming data:
```
ADC:rps=10 reqs:81, trig:69021 client:1, DBG:0
...
```
Open another terminal to control P2Plant.<br>
Change debugging level of the P2Plant:
```
python -m p4p.client.cli put p2p:debug=1
# disable debugging:
python -m p4p.client.cli put p2p:debug=0
```
Change streaming rate of the P2Plant to 1000 Hz (sleep time = 1 ms):<br>
```
python -m p4p.client.cli put p2p:sleep=1
```
The P2Plot should indicate the rps (rounds per seconds) change to ~920.<br>
Monitor ADC channel 0:<br>
```
python -m p4p.client.cli monitor p2p:adc0
p2p:adc0 Sun Mar  9 11:29:44 2025 ntnumericarray([457, 458, 459, ..., 454, 455, 456], dtype=uint16)
```
Plot ADC0 samples using pvplot:<br>
```
python -m pvplot V:p2p:adc0
```
p2plantaccess 1.0.4
Access to process variable of a P2Plant
Requires Python: >=3.7

# P2PlantAccess
Access to process variable of a [P2Plant](https://github.com/ASukhanov/P2Plant).

## Demo
Start simulatedADCs plant as discribed in the P2Plant module:<br>
Start the client:<br>
``` python3 -m p2plantaccess.simulatedADCs -k -g```<br>
A dynamic plot should appear with 8 sawtooth curves.

### Example of Python interaction with simulatedADCs
Have the simulatedADCs plant running.
```python
from p2plantaccess import Access as pa
pa.init()
pa.start()

pa.request(["info", ["*"]])
{'*': {'version': 'MCU and software version, system clock', 'debug': 'Show debugging messages', 'run': 'For experts. Start/Stop board peripherals except ADCs', 'sleep': 'Sleep in the program loop', 'perf': 'Performance counters. TrigCount, RPS in main loop', 'adc_offsets': 'Offsets of all ADC channels', 'adc_reclen': 'Record length. Number of samples of each ADC', 'adc_srate': 'Sampling rate of ADCs', 'adc': 'Two-dimentional array[adc#][samples] of ADC samples'}}

pa.request(["get", ["version"]])
{'version': {'v': 'MCU: STM32G431, soft:0.2.0 2025-02-02, clock:170000000,baudrate:7372800', 't': (1738803674, 976149845)}}

# Get info on run and sleep PVs:
pa.request(['info', ['run','sleep']])
{'run': {'desc': 'For experts. Start/Stop board peripherals except ADCs', 'type': 'char*', 'shape': [1], 'fbits': 'WRDsrE', 'legalValues': 'start,stop'}, 'sleep': {'desc': 'Sleep in the program loop', 'type': 'uint32', 'shape': [1], 'fbits': 'R', 'units': 'ms', 'opLow': 0, 'opHigh': 10000}}

pa.request(["get", ["run"]])
{'run': {'v': 'start', 't': (1738803674, 976150227)}}

pa.request(['set', [('run','stop')]])
{}

pa.request(["get", ["run"]])
{'run': {'v': 'stop', 't': (1738803674, 976150227)}}

pa.request(['get', ['adc']])
{'adc': {'shape': [8, 80], 'v': array([[
        10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
        26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
...
         1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16]],
      dtype=uint16), 't': (1738803674, 976151047)}}
vehiclepass 0.3.0
A Python API to manage your FordPass-enabled vehicle.
Requires Python: >=3.9

# vehiclepass

A Python 3.9+ API to manage your FordPass-enabled vehicle. Requires a FordPass account and a vehicle registered to it.

**NOTE**: This project is in early development. The API may change significantly before reaching v1.0.0.

Reads many status values, such as outside temperature, engine RPM, and door lock status. Full documentation pending.

Currently supports these commands:

* Remote start
* Cancel remote start
* Lock
* Unlock

## Install

```sh
pip install vehiclepass
```

## Quickstart

```python
import vehiclepass

with vehiclepass.vehicle(
    username="you@example.com",
    password="s3cr3t",
    vin="YOURVIN12345"
) as v:
    print(v.doors.are_locked)  # False
    # By default, this issues the unlock command, waits 30s, and verifies it took effect.
    # Pass verify=False to skip this check.
    v.doors.unlock()
    print(v.doors.are_locked)  # True

    # Most status values return a unit object that makes converting and printing the
    # value convenient.
    print(v.engine_coolant_temp.f)  # 55.4
    print(v.engine_coolant_temp.c)  # 13.0
    
    # When casting to string, uses the unit defined in env var VEHICLEPASS_DEFAULT_TEMP_UNIT.
    print(v.engine_coolant_temp)  # 55.4°F

    # Request a remote start. By default, the vehicle will automatically shut off after 15 minutes. Pass extend_shutoff=True to add another 15 minutes (30 minutes total).
    v.start()
    print(v.is_running)  # True
    print(v.is_remotely_started)  # True
    # Remotely started isn't the same as starting manually from the ignition in the vehicle.
    print(v.is_ignition_started)  # False
    print(v.shutoff_countdown)  # 14m 58s
    print(v.shutoff_countdown.s)  # 898.0
    print(v.shutoff_time)  # 2025-04-02 10:41:53.175933
```

## Contributing

Contributions welcome! Please [open an issue](https://github.com/austind/vehiclepass/issues/new) to discuss what you'd like to do first.

### Development

#### Prerequisites

* [uv](https://docs.astral.sh/uv/getting-started/installation/)

#### Environment

1. [Fork this repo](https://github.com/austind/vehiclepass/fork) to your personal GitHub account
1. Clone the repo locally
    ```sh
    USERNAME=<your-github-username>
    git clone https://github.com/$USERNAME/vehiclepass.git
    cd vehiclepass
    ```
1. Create a feature branch off of the `develop` branch
    ```sh
    git checkout develop
    git checkout -b 1234-short-description  # 1234 is the issue number you opened
1. Make your changes
1. Add at least one new test that covers your code, but as many as necessary
1. Ensure all tests pass
    ```sh
    nox -r  # The -r flag re-uses virtualenvs for faster re-runs
    ```
1. [Open a pull request](https://github.com/austind/vehiclepass/compare)