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 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-tuya-devices

v1.3.7

Published

Use Tuya devices local in NodeRed

Downloads

711

Readme

node-red-contrib-tuya-devices

Support for Tuya devices in SmartHome projects using Node-RED.
The goal of the project is to allow using local devices supports Tuya in Node-Red

Getting Started

Prerequisites: Node-RED installation. For details see here.

Install via npm

$ cd ~/.node-red
$ npm install node-red-contrib-tuya-devices

then restart node-red

The Tuya devices are represented by config Nodes (single Node per device). The flow Nodes references a device node and can exists multiple times in different flows. It can be defined a project object to group and control all Tuya devices in the local network. The IP addresses of the devices will be detect automaticaly. If configured a cloud access the device capabilities will be downloded and cached localy.

First steps

Insert Tuya manager node. In the manager config form:

  • Add new tuya-project. In the project config form:
    • set the name for the project
    • Add new tuya-cloud. In the cloud config form:
      • set the AccessID, AccessKey and Any deviceId (needed to recognise the userId and all devices mapped to the same user account)
      • optional can be set the Tuya cloud userId if known and a name for the config node
    • Optional can be added new MQTT broker. It will be used for all Tuya devices in the project. The device data can be accessed in the broker with MQTT topic "tuya/(deviceId)/tele/(dp)"

Usage

If the cloud configuration is correct and the manager node has received at least once a message with topic 'updateDevices' all mapped devices will be listed in the config. The device capabilities will be cached localy. With the plus button can be added a config node for every local device. This config nodes contains all setting nedded to use the device localy and can be selected in the configuration of the Tuya device nodes. The device nodes can be easy connected to dashboard ui nodes (see example below). For this the single DP must be selected or a topic must be used to select a rigth DP, e.g by using of switch node. If device capabilites exists in local cache (e.g. after once successfully loaded from cloud) the device commands can be requestet by message usung topic 'dispatchCommands' (as in examle). A whole data model for the device can be requested by message with topic 'getDataModel'.

Examples

Changelog

Disclaimer

The software is provided as-is under the MIT license. The author cannot be held responsible for any unintended behaviours.

Thanks

If you like our ideas and want to support further development, you can donate here:
Donate Donate
Please understand that requests from those who support us will be given priority

Screenshots

manager_flow cloud project manager_devices manager_models