smartmeterdongle
v0.1.5
Published
Interfaces with the Capacitor kotlin code for the smart meter bluetooth dongle
Downloads
7,019
Maintainers
Readme
smartmeterdongle
Interfaces with the kotlin code for the smart meter bluetooth dongle
Install
npm install smartmeterdongle
npx cap syncAPI
initialize()connect()disconnect()getDongleDetails()checkPermissions()requestPermissions()reset()connectToWifi(...)retrieveWifiNetworks()stopRetrievingWifiNetworks()- Interfaces
- Type Aliases
initialize()
initialize() => Promise<InitializationStatus>Returns: Promise<InitializationStatus>
connect()
connect() => Promise<ConnectionResult>Returns: Promise<ConnectionResult>
disconnect()
disconnect() => Promise<void>getDongleDetails()
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; }>
checkPermissions()
checkPermissions() => Promise<PermissionStatus>Returns: Promise<PermissionStatus>
requestPermissions()
requestPermissions() => Promise<PermissionStatus>Returns: Promise<PermissionStatus>
reset()
reset() => Promise<void>connectToWifi(...)
connectToWifi(opt: { ssid: string; password: string; }) => Promise<WifiConnectionResult>| Param | Type |
| --------- | ------------------------------------------------ |
| opt | { ssid: string; password: string; } |
Returns: Promise<WifiConnectionResult>
retrieveWifiNetworks()
retrieveWifiNetworks() => Promise<void>stopRetrievingWifiNetworks()
stopRetrievingWifiNetworks() => Promise<void>Interfaces
InitializationStatus
| Prop | Type |
| ----------------- | ------------------------------------------------------------- |
| enabled | boolean |
| permissions | PermissionStatus |
PermissionStatus
| Prop | Type |
| --------------- | ----------------------------------------------------------- |
| bluetooth | PermissionState |
ConnectionResult
| Prop | Type |
| -------------- | -------------------- |
| result | boolean |
| dongleId | string |
WifiConnectionResult
| Prop | Type |
| ------------------------- | ------------------- |
| wifiConnectionState | string |
Type Aliases
PermissionState
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'
