Coder Social home page Coder Social logo

SET not workin about cli HOT 5 CLOSED

tuyaapi avatar tuyaapi commented on August 31, 2024
SET not workin

from cli.

Comments (5)

codetheweb avatar codetheweb commented on August 31, 2024

Please run setx DEBUG * in your current shell to turn on debugging output, then run the set command again and post the output.

It would also be helpful if you posted the output of the get command.

from cli.

TheItschi avatar TheItschi commented on August 31, 2024

Find below the result after "setx DEBUG *" command:

C:\Users\Yavuz>tuya-cli get --ip 192.168.100.84 --id 308xxx --key IAYxxx --dps 3
45

C:\Users\Yavuz>setx DEBUG *

ERFOLGREICH: Angegebener Wert wurde gespeichert.

C:\Users\Yavuz>tuya-cli set --ip 192.168.100.84 --id 308xxx --key IAYxxx --set 50 --dps 2
Error: Timeout waiting for response
at Timeout._sendTimeout.setTimeout [as _onTimeout] (C:\Users\Yavuz\AppData\Roaming\npm\node_modules@tuyapi\cli\node_modules\tuyapi\index.js:416:25)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)

Regards, TheItschi

from cli.

TheItschi avatar TheItschi commented on August 31, 2024

After restarting the shell I finally get the debug output:

C:\Users\Yavuz>tuya-cli get --ip 192.168.100.84 --id 30801624bcddc28dbd2c --key IAYz2WK1th0cMLmL --dps 3
TuyAPI No IPs to search for +0ms
TuyAPI Payload: { gwId: '30801624bcddc28dbd2c', devId: '30801624bcddc28dbd2c' } +16ms
TuyAPI Send attempt 1 +0ms
TuyAPI Sending this data: 000055aa000000000000000a000000467b2267774964223a223330383031363234626364646332386462643263222c226465764964223a223330383031363234626364646332386462643263227d000000000000aa55 +0ms
TuyAPI Connect 192.168.100.84 +0ms
TuyAPI Socket connected. +31ms
TuyAPI Received data back: 192.168.100.84 +0ms
TuyAPI 000055aa000000000000000a0000007a000000007b226465764964223a223330383031363234626364646332386462643263222c22647073223a7b2231223a747275652c2232223a34342c2233223a34372c2234223a2231222c2235223a66616c73652c2236223a66616c73652c22313032223a302c22313034223a747275657d7d0e66d9000000aa55 +0ms
TuyAPI Data: 192.168.100.84 { devId: '30801624bcddc28dbd2c',
dps:
{ '1': true,
'2': 44,
'3': 47,
'4': '1',
'5': false,
'6': false,
'102': 0,
'104': true } } 10 +0ms
TuyAPI Disconnect +0ms
47
TuyAPI Socket closed: 192.168.100.84 +16ms

C:\Users\Yavuz>tuya-cli set --ip 192.168.100.84 --id 30801624bcddc28dbd2c --key IAYz2WK1th0cMLmL --set 50 --dps 2
TuyAPI No IPs to search for +0ms
TuyAPI Payload: 192.168.100.84 +7ms
TuyAPI { devId: '30801624bcddc28dbd2c',
TuyAPI uid: '',
TuyAPI t: '1549307320',
TuyAPI dps: { '2': 50 } } +0ms
TuyAPI Send attempt 1 +7ms
TuyAPI Sending this data: 000055aa000000000000000700000087332e313030396564366631373738343862316165495141527a74384c4a6a4a2f7370744e6338364251476f7a5463457374664a5853482f4a4f65594b4d4c755258635945536d513930687555744a392b3034626f6a5537557a5770464f794f65566d67336c584c57764776472b6b6b4b4a475a58366c6a41763833326c453d000000000000aa55 +0ms
TuyAPI Connect 192.168.100.84 +0ms
TuyAPI Socket connected. +31ms
TuyAPI Socket closed: 192.168.100.84 +5s
TuyAPI Send attempt 2 +1s
TuyAPI Sending this data: 000055aa000000000000000700000087332e313030396564366631373738343862316165495141527a74384c4a6a4a2f7370744e6338364251476f7a5463457374664a5853482f4a4f65594b4d4c755258635945536d513930687555744a392b3034626f6a5537557a5770464f794f65566d67336c584c57764776472b6b6b4b4a475a58366c6a41763833326c453d000000000000aa55 +0ms
TuyAPI Connect 192.168.100.84 +0ms
TuyAPI Socket connected. +47ms
TuyAPI Socket closed: 192.168.100.84 +5s
TuyAPI Send attempt 3 +2s
TuyAPI Sending this data: 000055aa000000000000000700000087332e313030396564366631373738343862316165495141527a74384c4a6a4a2f7370744e6338364251476f7a5463457374664a5853482f4a4f65594b4d4c755258635945536d513930687555744a392b3034626f6a5537557a5770464f794f65566d67336c584c57764776472b6b6b4b4a475a58366c6a41763833326c453d000000000000aa55 +0ms
TuyAPI Connect 192.168.100.84 +0ms
TuyAPI Socket connected. +47ms
TuyAPI Socket closed: 192.168.100.84 +5s
TuyAPI Send attempt 4 +2s
TuyAPI Sending this data: 000055aa000000000000000700000087332e313030396564366631373738343862316165495141527a74384c4a6a4a2f7370744e6338364251476f7a5463457374664a5853482f4a4f65594b4d4c755258635945536d513930687555744a392b3034626f6a5537557a5770464f794f65566d67336c584c57764776472b6b6b4b4a475a58366c6a41763833326c453d000000000000aa55 +0ms
TuyAPI Connect 192.168.100.84 +0ms
TuyAPI Socket connected. +0ms
TuyAPI Socket closed: 192.168.100.84 +5s
TuyAPI Send attempt 5 +3s
TuyAPI Sending this data: 000055aa000000000000000700000087332e313030396564366631373738343862316165495141527a74384c4a6a4a2f7370744e6338364251476f7a5463457374664a5853482f4a4f65594b4d4c755258635945536d513930687555744a392b3034626f6a5537557a5770464f794f65566d67336c584c57764776472b6b6b4b4a475a58366c6a41763833326c453d000000000000aa55 +31ms
TuyAPI Connect 192.168.100.84 +0ms
TuyAPI Socket connected. +16ms
Error: Timeout waiting for response
at Timeout._sendTimeout.setTimeout [as _onTimeout] (C:\Users\Yavuz\AppData\Roaming\npm\node_modules@tuyapi\cli\node_modules\tuyapi\index.js:416:25)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
TuyAPI Socket closed: 192.168.100.84 +5s

from cli.

TheItschi avatar TheItschi commented on August 31, 2024

Hm, sorry. I obviously made a mistake while extracting the local key. I didn't realize that it works without the locale key. Now it works fine with the correct locale key. Sorry for the confusion...

Regards, TheItschi

from cli.

codetheweb avatar codetheweb commented on August 31, 2024

Glad you got it working.

As this seems to be a common problem, I'll add something about it to the issue template.

from cli.

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.