lyric-access
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

lyric-access

A package to integrate the access solution from Lyric into a React Native application.

Installation

npm install lyric-access

In addition, you need to follow the installation instructions for react-native-ble-plx here.

Usage

This package provides a modal component that handles connecting to a particular lock and sending a code to it. Here's how to use it:

import LyricAccess from 'lyric-access';

const [modalVisible, setModalVisible] = useState(false);
return (
  // ...
  <LyricAccessModal
    modalVisible={modalVisible}
    setModalVisible={setModalVisible}
    lockName={'Lyric-B10AF'} // get this from a custom field in your PMS
    keypadCode={'1234'} // get this from a custom field in your PMS
  />
);

When this modal becomes visible, the app will connect to the lock via Bluetooth LE. Upon a successful connection, the spinner will turn into an "Unlock" button. When the user taps the unlock button, the associated keypad code will be sent to the lock.

Package Sidebar

Install

npm i lyric-access

Weekly Downloads

1

Version

0.3.0

License

MIT

Unpacked Size

50.9 kB

Total Files

9

Last publish

Collaborators

  • zainer