npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@rentlydev/rently-tuya

v0.2.2

Published

rently-tuya

Downloads

702

Readme

@rentlydev/rently-tuya

A React Native module for integrating the Tuya Doorbell SDK, enabling applications to interact with Tuya-compatible smart doorbells. This library provides essential functionalities such as device pairing, live preview, and push notification registration, ensuring a seamless smart home experience.

Fully compatible with TypeScript.

Supported platforms

| Platform | Support | |---|---| | iOS | ✅ | | Android | ✅ | | Web | ❌ | | Windows | ❌ | | macOS | ❌ |

Installation

npm install @rentlydev/rently-tuya

or

yarn add @rentlydev/rently-tuya

Configuration and Permissions

iOS

(Configuration details to be added)

Android

(Configuration details to be added)

Summary

Methods

Listeners


Usage

initAirbrake

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.initAirbrake({ key: '', id: '' });

Parameters:

  • key (String) - Airbrake Project Key.
  • id (String) - Airbrake Project Id.

getCurrentWifi

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.getCurrentWifi();

Response:

(String) - Current connected Wi-Fi name.

getDeviceData

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.getDeviceData({ devId: '' });

Parameters:

  • devId (String) - Doorbell Device Id.

setTuyaHome

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.setTuyaHome({ homeId: '' })

Parameters:

  • homeId (String) - Home Id associated with Doorbell.

getTokenForQRCode

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.getTokenForQRCode({ homeId: '' })

Parameters:

  • homeId (String) - Home Id associated with Doorbell.

Response:

(String) - Token required for QR code activation.

initActivatorForQRCode

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.initActivatorForQRCode({
    ssid: '',
    paasword: '',
    time: '',
    token: ''
})

Parameters:

  • ssid (String) - Wi-Fi name.
  • password (String) - Wi-Fi Password.
  • time (String) - Timeout for activation.
  • token (String) - Token from getTokenForQRCode.

loginWithUid

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.loginWithUid({
    uid: '',
    paasword: '',
    countryCode: ''
})

Parameters:

  • uid (String) - Login Uid.
  • password (String) - Login Password.
  • countryCode (String) - Login Country code.

logout

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.logout()

openCameraLivePreview

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.openCameraLivePreview({
    id: '',
    countryCode: '',
    uid: '',
    passwd: '',
    devId: '',
    homeId: '',
    last_moveout_at: '',
    resetRequired: true,
    isResident: true,
    display_remove_doorbell_button: true,
    propertyCredentialUsername: '',
    propertyCredentialPassword: '',
    tuya_product_name: '',
    device_uuid: '',
    serial_no: '',
    flavour: '',
    doorbell_default_settings_updated: true,
    motion_detection: true,
    continuous_recording: true,
    event_recording: true,
    set_sensitivity_low: true
})

Parameters:

  • id (String) - Unique identifier for the user.
  • countryCode (String) - The country code associated with the user.
  • uid (String) - Unique user identifier used for authentication.
  • passwd (String) - Password for the user account.
  • devId (String) - Unique identifier for the Tuya doorbell device.
  • homeId (String) - Identifier for the home where the Tuya doorbell is registered.
  • last_moveout_at (String) - Timestamp of the last move-out event for the asset.
  • resetRequired (String) - Indicates whether a reset is required for the device.
  • isResident (String) - Specifies if the user is a resident of the associated home.
  • display_remove_doorbell_button (String) - Determines if the option to remove the doorbell should be shown.
  • propertyCredentialUsername (String) - Username for property authentication.
  • propertyCredentialPassword (String) - Password for property management system authentication.
  • tuya_product_name (String) - Name of the Tuya doorbell product.
  • device_uuid (String) - UUID of the device.
  • serial_no (String) - Serial number of the doorbell device.
  • flavour (String) - Theme for the UI.
  • doorbell_default_settings_updated (String) - Specifies whether the default doorbell settings should be updated.
  • motion_detection (String) - Indicates if motion detection should be enabled.
  • continuous_recording (String) - Indicates if continuous recording should be enabled.
  • event_recording (String) - Indicates if evet recording should be enabled.
  • set_sensitivity_low (String) - Indicates if sensitivity should be set to low.

registerForPushNotification

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.registerForPushNotification({ token: '' })

Parameters:

  • token (String) - FCM Token.

renameDevice

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.renameDevice({ deviceId: '', name: '' })

Parameters:

  • deviceId (String) - Device Id.
  • name (String) - New device name.

resetDevice

import RentlyTuya from '@rentlydev/rently-tuya';

const response = await RentlyTuya.resetDevice({ 
    devId: '',
    homeId: '',
    username: '',
    password: '',
    countryCode: ''
})

Parameters:

  • devId (String) - Doorbell Device Id.
  • homeId (String) - Home Id associated with Doorbell.
  • username (String) - User ID.
  • password (String) - Password.
  • countryCode (String) - Country Code.

Listeners

[!IMPORTANT] After processing, a success or failure event should be sent.

Android

import RentlyTuya from '@rentlydev/rently-tuya';

export class ExposedToJava {
  removeCamera(devId: string) {}

  navigateToAddDoorbell(devId: string) {}

  resetDoorbellDefaultSettingsFlag(id: string) {}
}

iOS

  React.useEffect(() => {
      const data = new NativeEventEmitter(NativeModules.KeylessListener);
      data.addListener('REMOVE_CAMERA', (data: any) => {});
      data.addListener('RESET_WIFI', (data: any) => {});
      data.addListener('RESET_DEFAULT_SETTINGS_FLAG', (data: any) => {});
  }, []);

How To Run Example App ?

To run example app, follow the below steps

  1. Clone the repository
  2. Run yarn install
  3. Navigate to example/ios folder i.e cd example/ios and do pod install, then cd ..
  4. For android run yarn example android
  5. For ios run yarn example ios

Demo Video

Android & iOS