Coder Social home page Coder Social logo

Comments (12)

thirug010 avatar thirug010 commented on July 4, 2024

@mobamoba,

Thanks for letting me know the template is missing, Template is upload.

  1. Use the template to add new devices ( JSon array format) update the deviceId, local key , friendly name , topic
    or
  2. In the home page click on the [+] icon to add new device
    image

Thanks
Thiru

from virtual-tasmota-for-tuya-api-devices.

thirug010 avatar thirug010 commented on July 4, 2024

tuya-api-template.js

{"tam_app_001":{"deviceConfig":[{"topic":"nodeId","devId":"xxxxxxxxxxxxx","key":"xxxxxxxxxxxxx","friendlyName":"xxxxxxxxxxxxxx","nodeId":"xxxxxxxxxxxxxxx","name":"Tuya Swtich 3 CH","id":"tuya_switch_ch3","template":"shd_s3c_template.htm","isDimmer":false,"powers":[1,2,3],"dimmerId":0,"rangeFactor":-1,"minDimValue":1,"telePeriod":{"time":"15","factor":"s"},"pulsePeriod":{"1":{"time":-1,"factor":"n"},"2":{"time":-1,"factor":"n"},"3":{"time":-1,"factor":"n"},"4":{"time":-1,"factor":"n"}},"deviceType":"tuya_switch_ch3"} , {repeat for second device } .... ]
}}

Update and save it as "Tuya-Api-Tasmota.rs"

if you are not comfortable using json template use the [+] icon from the home page http://127.0.0.1:8082 to add new devices

Thanks
Thiru

from virtual-tasmota-for-tuya-api-devices.

thirug010 avatar thirug010 commented on July 4, 2024

@mobamoba,
Please let me know if you need any help .. ?

from virtual-tasmota-for-tuya-api-devices.

mobamoba avatar mobamoba commented on July 4, 2024

Thanks that solved it. I have a question though (sorry for the noobiness :)): is there a way to use a command line with the app rather than the gui? Thanks.

from virtual-tasmota-for-tuya-api-devices.

thirug010 avatar thirug010 commented on July 4, 2024

@mobamoba , Thanks for the confirmation, Will add CLI and Mqtt option to added / manage device .

from virtual-tasmota-for-tuya-api-devices.

mobamoba avatar mobamoba commented on July 4, 2024

Great thanks.

from virtual-tasmota-for-tuya-api-devices.

thirug010 avatar thirug010 commented on July 4, 2024

@mobamoba,
CLI option is added follow the steps,

  1. Get latest code from the github
  2. Navigate to the code path and run "npm install"
  3. Run the Main with nodemon and run the CLI in separate instance "node tuya_api_mqtt_cli.js"
  4. New device will be added and will start sending mqtt

Check and let me know
image

from virtual-tasmota-for-tuya-api-devices.

mobamoba avatar mobamoba commented on July 4, 2024

npm install is throwing this error:

npm ERR! file C:\npmnodes\Virtual-Tasmota-for-Tuya-api-devices\package.json
npm ERR! code EJSONPARSE
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected number in JSON at position 331 while parsing '{
npm ERR! JSON.parse "name": "tuya-api-mqtt",
npm ERR! JSON.parse "descri'
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

from virtual-tasmota-for-tuya-api-devices.

thirug010 avatar thirug010 commented on July 4, 2024

@mobamoba, issue fixed check now

from virtual-tasmota-for-tuya-api-devices.

mobamoba avatar mobamoba commented on July 4, 2024

Yes that worked. Is there a way to use the CLI to manipulate the device (like toggling it on or off)? Thanks

from virtual-tasmota-for-tuya-api-devices.

thirug010 avatar thirug010 commented on July 4, 2024

I am not getting it. can you give me example of what you are looking for.
You can use mqtt command to achieve it

from virtual-tasmota-for-tuya-api-devices.

mobamoba avatar mobamoba commented on July 4, 2024

Yes I realized that like 2 minutes after I typed my question - ignore :), thanks!

from virtual-tasmota-for-tuya-api-devices.

Related Issues (8)

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.