Interfaces with the Capacitor kotlin code for the smart meter bluetooth dongle
npm install smartmeterdongleInterfaces with the kotlin code for the smart meter bluetooth dongle
``bash`
npm install smartmeterdongle
npx cap sync
* initialize()
* connect()
* disconnect()
* getDongleDetails()
* checkPermissions()
* requestPermissions()
* reset()
* connectToWifi(...)
* retrieveWifiNetworks()
* stopRetrievingWifiNetworks()
* Interfaces
* Type Aliases
`typescript`
initialize() => Promise
Returns: Promise<InitializationStatus>
--------------------
`typescript`
connect() => Promise
Returns: Promise<ConnectionResult>
--------------------
`typescript`
disconnect() => Promise
--------------------
`typescript`
getDongleDetails() => Promise<{ id: string | undefined; mf: string | undefined; model: string | undefined; fw: string | undefined; hw: number | undefined; batch: string | undefined; }>
Returns: Promise<{ id: string; mf: string; model: string; fw: string; hw: number; batch: string; }>
--------------------
`typescript`
checkPermissions() => Promise
Returns: Promise<PermissionStatus>
--------------------
`typescript`
requestPermissions() => Promise
Returns: Promise<PermissionStatus>
--------------------
`typescript`
reset() => Promise
--------------------
`typescript`
connectToWifi(opt: { ssid: string; password: string; }) => Promise
| Param | Type |
| --------- | ------------------------------------------------ |
| opt | { ssid: string; password: string; } |
Returns: Promise<WifiConnectionResult>
--------------------
`typescript`
retrieveWifiNetworks() => Promise
--------------------
`typescript`
stopRetrievingWifiNetworks() => Promise
--------------------
#### InitializationStatus
| Prop | Type |
| ----------------- | ------------------------------------------------------------- |
| enabled | boolean |
| permissions | PermissionStatus |
#### PermissionStatus
| Prop | Type |
| --------------- | ----------------------------------------------------------- |
| bluetooth | PermissionState |
#### ConnectionResult
| Prop | Type |
| -------------- | -------------------- |
| result | boolean |
| dongleId | string |
#### WifiConnectionResult
| Prop | Type |
| ------------------------- | ------------------- |
| wifiConnectionState` | string |
#### PermissionState
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'