Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7061 committed Sep 26, 2024
1 parent a99a909 commit aaed5fa
Showing 1 changed file with 66 additions and 3 deletions.
69 changes: 66 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,78 @@
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/evva-sfw/abrevva-capacitor">
<a href="https://github.com/evva-sfw/abrevva-capacitor/actions"><img alt="GitHub branch check runs" src="https://img.shields.io/github/check-runs/evva-sfw/abrevva-capacitor/main"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-EVVA_License-yellow.svg?color=fce500&logo=data:image/svg+xml;base64,PCEtLSBHZW5lcmF0ZWQgYnkgSWNvTW9vbi5pbyAtLT4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjY0MCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgNjQwIDEwMjQiPgo8ZyBpZD0iaWNvbW9vbi1pZ25vcmUiPgo8L2c+CjxwYXRoIGZpbGw9IiNmY2U1MDAiIGQ9Ik02MjIuNDIzIDUxMS40NDhsLTMzMS43NDYtNDY0LjU1MmgtMjg4LjE1N2wzMjkuODI1IDQ2NC41NTItMzI5LjgyNSA0NjYuNjY0aDI3NS42MTJ6Ij48L3BhdGg+Cjwvc3ZnPgo=" alt="EVVA License"></a>

</p>

## Install
The EVVA Capacitor Plugin is a collection of tools to work with electronical EVVA access components. It allows for scanning and connecting via BLE.

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Examples](#examples)

## Features

- BLE Scanner for EVVA components in range
- Localize EVVA components encountered by a scan
- Disengage EVVA components encountered by a scan
- Read / Write data via BLE

## Requirements

- Capacitor >= 5.0.0
- Java 17+ (Android)
- Android SDK (Android)
- Android 10+ (API level 29) (Android)
- Xcode 15.4 (iOS)
- iOS 15.0+ (iOS)

## Installation

```bash
npm install @evva-sfw/abrevva-capacitor
npm install @evva-sfw/abrevva-capacitor@1.0.0
npx cap sync
```
## Examples

### Initialize and scan for EVVA components

```typescript
import { AbrevvaBLEClient, ScanResult } from "@evva-sfw/abrevva-capacitor";

class ExampleClass {
private results: ScanResult[];

async startScan(event: any) {
this.results = [];

await AbrevvaBLEClient.requestLEScan({ timeout: 5_000 }, (result: ScanResult) => {
this.results.push(result);
});
}
}
```

### Localize EVVA component

With the signalize method you can localize EVVA components. On a successful signalization the component will emit a melody indicating its location.

```typescript
const success = await AbrevvaBLEClient.signalize('deviceId');
```

### Perform disengage on EVVA components

For the component disengage you have to provide access credentials to the EVVA component. Those are generally acquired in the form of access media metadata from the Xesar software.

```typescript
const status = await AbrevvaBLEClient.disengage(
'mobileId',
'mobileDeviceKey',
'mobileGroupId',
'mobileAccessData',
false,
);
```

## API

Expand Down

0 comments on commit aaed5fa

Please sign in to comment.