0.0.81 • Published 9 months ago

@falconeta/capacitor-plugin-matter v0.0.81

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@falconeta/capacitor-plugin-matter

WORK IN PROGRESS!

plugin that handle the Matter Application protocol

Make SDK from CHIP repo

by default, plugins use standard Matter SDK (v 1.1.0.1) but if possible to make your custom SDK by connectedhomeip project (https://github.com/project-chip/connectedhomeip)

Android

  1. see android_building.md guide under /docs/guides (Building Android CHIPTool from scripts step after preconfiguration)
  2. compress the content of the folder examples/android/CHIPTool/app/libs with libs.zip name.
  3. upload the zip on your google drive
  4. modify or create your custom post-install.js script with file ID and the google key

IOS

  1. bootstrap project
  2. under src/darwin/Framework folder launch xcodebuild -target "Matter" -sdk iphoneos -configuration Release OTHER_CFLAGS='${inherited} -Wno-unguarded-availability-new'
  3. compress the folder src/darwin/Framework/build/Release-iphoneos/Matter.framework with Matter.framework.zip name.
  4. upload the zip on your google drive
  5. modify or create your custom post-install.js script with file ID and the google key

Install

npm install @falconeta/capacitor-plugin-matter
npx cap sync

API

configure(...)

configure(options: { deviceControllerKey?: string; caRootCert?: string; fabricId: string; vendorId: number; }) => Promise<void>
ParamType
options{ deviceControllerKey?: string; caRootCert?: string; fabricId: string; vendorId: number; }

clear()

clear() => Promise<void>

qrCodeCommissioning(...)

qrCodeCommissioning(options: { deviceId: string; qrCodeId: string; ssid: string; ssidPassword: string; }) => Promise<{ deviceType: string; }>
ParamType
options{ deviceId: string; qrCodeId: string; ssid: string; ssidPassword: string; }

Returns: Promise<{ deviceType: string; }>


manualCodeCommissioning(...)

manualCodeCommissioning(options: { deviceId: string; manualCode: string; ssid: string; ssidPassword: string; }) => Promise<{ deviceType: string; }>
ParamType
options{ deviceId: string; manualCode: string; ssid: string; ssidPassword: string; }

Returns: Promise<{ deviceType: string; }>


getCerts()

getCerts() => Promise<{ deviceControllerKey: string; caRootCert: string; }>

Returns: Promise<{ deviceControllerKey: string; caRootCert: string; }>


commandOnOff(...)

commandOnOff(options: { deviceId: string; value: boolean; endpointId: number; }) => Promise<void>
ParamType
options{ deviceId: string; value: boolean; endpointId: number; }

getEndpoint(...)

getEndpoint<T>(options: { deviceId: string; endpointId: number; }) => Promise<{ data: T; }>
ParamType
options{ deviceId: string; endpointId: number; }

Returns: Promise<{ data: T; }>


getCluster(...)

getCluster<T>(options: { deviceId: string; endpointId: number; clusterId: number; }) => Promise<{ data: T; }>
ParamType
options{ deviceId: string; endpointId: number; clusterId: number; }

Returns: Promise<{ data: T; }>


readAttribute(...)

readAttribute(options: AttributePath) => Promise<{ value: string; }>
ParamType
optionsAttributePath

Returns: Promise<{ value: string; }>


subscribeAttribute(...)

subscribeAttribute(options: SubscriberOptions) => Promise<void>
ParamType
optionsSubscriberOptions

openCommissioningWindow(...)

openCommissioningWindow(options: { deviceId: string; discriminator: number; duration: number; setupPIN: number; }) => Promise<{ manualCode: string; }>
ParamType
options{ deviceId: string; discriminator: number; duration: number; setupPIN: number; }

Returns: Promise<{ manualCode: string; }>


removeFabric(...)

removeFabric(options: { deviceId: string; fabricId: string; }) => Promise<void>
ParamType
options{ deviceId: string; fabricId: string; }

removeAllFabric(...)

removeAllFabric(options: { deviceId: string; }) => Promise<void>
ParamType
options{ deviceId: string; }

addListener(string, ...)

addListener<T>(eventName: string, listenerFunc: AttributeChangeListener<T>) => Promise<PluginListenerHandle> & PluginListenerHandle
ParamType
eventNamestring
listenerFuncAttributeChangeListener<T>

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


Interfaces

AttributePath

PropType
deviceIdstring
endpointIdnumber
clusterIdnumber
attributeIdnumber

EventOptions

PropType
eventNamestring
minnumber
maxnumber

PluginListenerHandle

PropType
remove() => Promise<void>

Type Aliases

SubscriberOptions

EventOptions & AttributePath

AttributeChangeListener

(data: T): void

0.0.40

10 months ago

0.0.41

10 months ago

0.0.42

10 months ago

0.0.43

10 months ago

0.0.44

10 months ago

0.0.45

10 months ago

0.0.46

10 months ago

0.0.47

10 months ago

0.0.80

9 months ago

0.0.81

9 months ago

0.0.37

10 months ago

0.0.38

10 months ago

0.0.39

10 months ago

0.0.73

9 months ago

0.0.74

9 months ago

0.0.30

10 months ago

0.0.75

9 months ago

0.0.31

10 months ago

0.0.76

9 months ago

0.0.32

10 months ago

0.0.77

9 months ago

0.0.33

10 months ago

0.0.78

9 months ago

0.0.34

10 months ago

0.0.79

9 months ago

0.0.35

10 months ago

0.0.36

10 months ago

0.0.70

9 months ago

0.0.71

9 months ago

0.0.72

9 months ago

0.0.26

10 months ago

0.0.27

10 months ago

0.0.28

10 months ago

0.0.29

10 months ago

0.0.62

9 months ago

0.0.63

9 months ago

0.0.64

9 months ago

0.0.65

9 months ago

0.0.66

9 months ago

0.0.67

9 months ago

0.0.68

9 months ago

0.0.69

9 months ago

0.0.25

10 months ago

0.0.60

9 months ago

0.0.61

9 months ago

0.0.59

9 months ago

0.0.51

10 months ago

0.0.52

10 months ago

0.0.53

10 months ago

0.0.54

10 months ago

0.0.55

10 months ago

0.0.56

10 months ago

0.0.57

10 months ago

0.0.58

9 months ago

0.0.50

10 months ago

0.0.48

10 months ago

0.0.49

10 months ago

0.0.23

1 year ago

0.0.24

1 year ago

0.0.20

1 year ago

0.0.21

1 year ago

0.0.22

1 year ago

0.0.17

1 year ago

0.0.18

1 year ago

0.0.19

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago