GithubHelp home page GithubHelp logo

marcopollacci / tuyasmartnodejs-2.0 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3.02 MB

This project consent to deploy a http server to remotely manage the home automation sockets compatible with the Tuya and Smart Life apps.

License: MIT License

JavaScript 3.76% Dockerfile 0.96% TypeScript 95.28%

tuyasmartnodejs-2.0's Introduction

TuyaSmartNodejs 2.0 based on Tuyapi ( https://codetheweb.github.io/tuyapi/index.html )

Build Status Total alerts Language grade: JavaScript

Refactor of the tuyaSmartNodejs repository from express to nestjs for future implementations

Information

The project born to create a http server for manage the home automation sockets compatible with the Tuya and Smart Life apps. Currently, single sockets and multiple sockets are managed and recently compatibility with Nooie bulbs and Lifx white bulb has also been implemented.

Install

Just clone repository, run npm install

Build

run npm run build

Supported Device

  • Bulb and Socker compatible with Tuya and SmartLife app
  • Nooie Bulb
  • Lifx Bulb (no color version)

Call Example

In order to work, you need both the id and the key of the device.

  • Turn On multiple socket
http://127.0.0.1:8081/tuya/multiple?id=<id_device>&key=<key_device>&use=accendi&subdevice=<id_sub_socket>
  • Turn On single socket
http://127.0.0.1:8081/tuya/single?id=<id_device>&key=<key_device>&use=accendi
  • Turn On nooie bulb
http://127.0.0.1:8081/nooie/bulb?id=<id_device>&key=<key_device>&use=accendi
  • Turn On lifx bulb
http://127.0.0.1:8081/lifx/bulb?light=<id_light>&state=ON

For each call, there are many options (especially for nooie bulbs). The system exposes its api and all the options provided through the url http://127.0.0.1:8081/swagger which is available after the project has been started. You can find project documentation schema here: https://marcopollacci.github.io/tuyaSmartNodejs-2.0/

Pm2

Use Pm2 with ecosystem.config.js file include in this project!

Docker Package

You can find Docker package here https://hub.docker.com/repository/docker/marcopollacci/tuya-smart-nodejs-2.0

RoadMap

  • Implement service to control and learn with BroadlinkIR

tuyasmartnodejs-2.0's People

Contributors

marcopollacci avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.