Comments (11)
Please run with "DEBUG=Tuyapi* node ..." and provide a full log
from tuyapi.
Sure thing @Apollon77
Here are the logs. It's interesting to see that the payload.version
is 3.3 even though I'm feeding it version 3.4
TuyAPI Finding missing IP undefined or ID abc +0ms
TuyAPI Received UDP message. +1s
TuyAPI UDP data: +7ms
TuyAPI {
TuyAPI payload: {
TuyAPI ip: '192.168.999.999',
TuyAPI gwId: 'abc',
TuyAPI active: 2,
TuyAPI ablilty: 0,
TuyAPI encrypt: true,
TuyAPI productKey: 'xyz',
TuyAPI version: '3.3',
TuyAPI token: true
TuyAPI },
TuyAPI leftover: false,
TuyAPI commandByte: 19,
TuyAPI sequenceN: 0
TuyAPI } +1ms
TuyAPI Connecting to 192.168.999.999... +18ms
TuyAPI Socket connected. +11ms
Connected to Silvercrest
TuyAPI GET Payload: +4ms
TuyAPI {
TuyAPI gwId: 'abc',
TuyAPI devId: 'abc',
TuyAPI t: '1669285486',
TuyAPI dps: {},
TuyAPI uid: 'abc'
TuyAPI } +0ms
TuyAPI Received data: XXX +13ms
TuyAPI Parsed: +2ms
TuyAPI {
TuyAPI payload: 'devid not found',
TuyAPI leftover: false,
TuyAPI commandByte: 10,
TuyAPI sequenceN: 1
TuyAPI } +2ms
TuyAPI Received DATA packet +3ms
TuyAPI data: 10 : "devid not found" +1ms
The log is obfuscations are:
- abc = device ID
- xyz = device key
- 192.168.999.999 = gateway IP
- XXX = data
from tuyapi.
Cna you show your code please?
from tuyapi.
BTW: In fcat the version tag from the UDP message wins against whatever you initially set in the constructor because UDP is "devicee self declaration".
Do you have the localkey ?
from tuyapi.
Cna you show your code please?
I am using the boilerplate Asynchronous Basic Usage example code and, yes, I'm using the local device key (xyz
in my obfuscated example). I am able to get the childIDs from the gateway as a result. I just thought it would be useful to know about this error message being returned in the data.
from tuyapi.
I guess the error goes away if you use issueGetOnConnect = false in the constructor options. By default 8as per docs) it tries to issue a get after connect biut if this is a gateway then mpst likel ythere are no data to get on the gateway.
from tuyapi.
Yes, if I specify issueGetOnConnect: false
then the error goes away but I don't get the child data that I get otherwise (because it is not listening for data because of the flag).
I have no problem but the devid not found
message will be confusing to others as it makes it sound as if the gateway could not be found when in fact it is connected and supplying child data.
from tuyapi.
What you mean with "getting child data"? I do not see anything in the debug log above and the error is the respinse to the GET call
from tuyapi.
What you mean with "getting child data"? I do not see anything in the debug log above and the error is the respinse to the GET call
I was referring to being able to get the data from the child devices using a gateway.get
(despite the devid not found
message).
from tuyapi.
The topic is the following: the "default get" can only use the main device id and sets that as gwid and as devId as it is in defaulz.
If you do a manual get you are free to set gwId and devId differently to get the real data - but the "automatic get on connect" can not handle that because it do not have the information. So simply use that flag and do a manual get after connect ith the correct parameters
from tuyapi.
Yes, I get (pardon the pun!) this. The topic of this issue is simply the confusing devid not found
message that is returned as data. It did not phase me but others might find it confusing and so either documenting it or handling it for them (as you were previously) may be helpful.
index.js:171
data === 'json obj data unvalid' || data === 'data format error' /* || data === 'devid not found' */
from tuyapi.
Related Issues (20)
- Some of my localtuya devices periodically become unavailable HOT 2
- App show "no access". I turn on all permissions when creating new Cloud Project. And I cheched my region. All right. HOT 1
- Implement 3.5 protocol HOT 37
- Setting brightness overrides color / set multiple properties only applies last HOT 2
- Weird encrypted response from tuya bulb ? HOT 6
- Philips Avent Baby Monitor uses Tuya HOT 4
- Virtual device timed out HOT 1
- Tuya IOT Platform error 1106: permission deny HOT 4
- Cannot install with "npm install codetheweb/tuyapi" HOT 1
- device.get() never returns HOT 11
- Not being able to connect using device.connect() HOT 7
- tuya-cli get does not work, ECONNRESET error. HOT 1
- 302 status on my TuyaPlatform plugin HOT 1
- `dp-refresh` fire for all devices of the gateway instead of the only one concerned HOT 1
- is there a breaking change at tuya ? HOT 6
- Use Insecure Algorithm AES-ECB as Default Encryption Method HOT 1
- npm install codetheweb/tuyapi Infinite loading occurs during installation.
- virtual ID HOT 2
- Just lost all my Local Tuya devices HOT 1
- Smart plug doesn't return Received data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tuyapi.