Giter Site home page Giter Site logo

Comments (9)

lehanspb avatar lehanspb commented on June 20, 2024

Please try the latest version of codetheweb/tuyapi and tuya-cli

And my advice is to define IP and version in the devices.conf file. It helped me.

like this:
{
name: 'ikeabulb05',
ip 'XX.XX.XX.XX',
version: '3.X'
id: 'bf541f534610c30095es6v',
key: '---------',
type: 'RGBTWLight'
},

from tuya-mqtt.

JacekKac avatar JacekKac commented on June 20, 2024

Thank you:
tuya-cli -V - 1.18.3
not sure how to check current version of tuyaapi and don't know if my tuya-mqtt uses it

from tuya-mqtt.

lehanspb avatar lehanspb commented on June 20, 2024

Execute this command:
npm view tuyapi version

Example output:
7.5.1

Yes, tuya-mqtt has a dependency on tuyapi

from tuya-mqtt.

JacekKac avatar JacekKac commented on June 20, 2024

npm view tuyapi version
7.5.1
still the same error ;(

tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/dps/20/command","message":"true"} +0ms
tuya-mqtt:command Received command for DPS20: true +0ms
tuya-mqtt:tuyapi Set device bf541f534610c30095es6v -> {"dps":"20","set":true} +43s
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> U52AhS8B +53ms
tuya-mqtt:error Timeout waiting for status response from device id: bf541f534610c30095es6v +44s
tuya-mqtt:error Error connecting to device id bf541f534610c30095es6v...retry in 10 seconds. +1s
tuya-mqtt:tuyapi Search for device id bf541f534610c30095es6v +16s
tuya-mqtt:tuyapi Found device id bf541f534610c30095es6v +0ms
^C tuya-mqtt:tuyapi Disconnected from device ikeabulb05 (bf541f534610c30095es6v, 854ea077fa8be13b) +413ms
tuya-mqtt:info Exit code: SIGINT +1m
tuya-mqtt:info Exit code: 0 +1s

from tuya-mqtt.

lehanspb avatar lehanspb commented on June 20, 2024

Is there any difference when you execute these commands?

tuya-cli get --id bf541f534610c30095es6v --key ____________ --dps 20
tuya-cli get --id bf541f534610c30095es6v --key ____________ --dps 20 --protocol-version 3.3
tuya-cli get --ip XX.XX.XX.XX --id bf541f534610c30095es6v --key ____________ --dps 20 --protocol-version 3.3

from tuya-mqtt.

JacekKac avatar JacekKac commented on June 20, 2024

tuya-cli get tuya-cli get --id bf541f534610c30095es6v --key ____________ --dps 20
TypeError: Cannot read properties of undefined (reading '20')
at Object.get (/usr/lib/node_modules/@tuyapi/cli/lib/control.js:49:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

tuya-cli get tuya-cli get --id bf541f534610c30095es6v --key 854ea077fa8be13b --dps 20 --protocol-version 3.3
TypeError: Cannot read properties of undefined (reading '20')
at Object.get (/usr/lib/node_modules/@tuyapi/cli/lib/control.js:49:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

tuya-cli get tuya-cli get --ip 192.168.0.17 --id bf541f534610c30095es6v --key _____ --dps 20 --protocol-version 3.3
TypeError: Cannot read properties of undefined (reading '20')
at Object.get (/usr/lib/node_modules/@tuyapi/cli/lib/control.js:49:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

from tuya-mqtt.

lehanspb avatar lehanspb commented on June 20, 2024

Please try my fork of tuya-mqtt: https://github.com/lehanspb/tuya-mqtt
I've made some changes such as useful dp-refresh function.
it is possible that dependencies will be updated during installation and may be this solves your problem.

from tuya-mqtt.

JacekKac avatar JacekKac commented on June 20, 2024

Using tuya app:

tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33tmCokCVpqJa +10s
  tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33CgBkbqfIvIgNM +7s
  tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33tmCokCVI2pCE +4s
  tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33CgBk4MPK orS +3s
  tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33tmCokCV2N9qG +1s
  tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33CgBk4MPKwssEL +1s

using mqtt :

tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/dps/20/command","message":"true"} +0ms
tuya-mqtt:command Received command for DPS20: true +0ms
tuya-mqtt:tuyapi Set device bf541f534610c30095es6v -> {"dps":"20","set":true} +11s
tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/hsb_command","message":"309,64,43"} +39ms
tuya-mqtt:command Received MQTT command message is a text string +39ms
tuya-mqtt:command Invalid command topic tuya/ikeabulb05/hsb_command for device id: bf541f534610c30095es6v +1ms
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> U52AhS8B +43ms
tuya-mqtt:error Timeout waiting for status response from device id: bf541f534610c30095es6v +34s
tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/dps/20/command","message":"true"} +5s
tuya-mqtt:command Received command for DPS20: true +5s
tuya-mqtt:tuyapi Set device bf541f534610c30095es6v -> {"dps":"20","set":true} +5s
tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/hsb_command","message":"309,64,74"} +51ms
tuya-mqtt:command Received MQTT command message is a text string +51ms
tuya-mqtt:command Invalid command topic tuya/ikeabulb05/hsb_command for device id: bf541f534610c30095es6v +0ms
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> U52AhS8B +58ms
tuya-mqtt:error Error connecting to device id bf541f534610c30095es6v...retry in 10 seconds. +1s
tuya-mqtt:error Timeout waiting for status response from device id: bf541f534610c30095es6v +4s
tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/dps/20/command","message":"false"} +6s
tuya-mqtt:command Received command for DPS20: false +6s
tuya-mqtt:tuyapi Set device bf541f534610c30095es6v -> {"dps":"20","set":false} +6s
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> U52AhS8B +78ms
tuya-mqtt:tuyapi Search for device id bf541f534610c30095es6v +5s
tuya-mqtt:tuyapi Found device id bf541f534610c30095es6v +1ms
tuya-mqtt:error Timeout waiting for status response from device id: bf541f534610c30095es6v +6s
tuya-mqtt:error Error connecting to device id bf541f534610c30095es6v...retry in 10 seconds. +1s

from tuya-mqtt.

lehanspb avatar lehanspb commented on June 20, 2024

You can also enable full debug:
DEBUG=* node tuya-mqtt.js
This will give you even more debug information.

from tuya-mqtt.

Related Issues (20)

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.