Comments (3)
The tuyapi ver. "6.1.1" introduces two new options:
options.nullPayloadOnJSONError = false
options.issueGetOnConnect = true
Putting both to false is a partial solution to commands (like 'GET' and 'schema') not handled by some devices and occasionally reported by the device using the misunderstandly "json obj data invalid".
The only open issue is the 'ERROR' level in case of connection loss: using retry
this event is not an ERROR requiring programmer intervention, better if it becomes a 'warning' (errors: "Error from socket", "find() timed out. Is the device powered on and the ID or IP correct?").
But I'm using the "node-red-contrib-tuya-smart-device" ver. 1.2.1, which uses tuyapi 5.3.1.
While waiting for an update, my personal solution is to modify "node_modules / tuyapi / index.js" (5.3.1) so:
- comment out lines 317-332: the complete block: for (const packet of packets).
- comment out line 404: this.get ();
- changed line 623 to: throw new Error (` Retry connection: ID $ {this.device.id} `); more informative.
Best regards
m.s.
from node-red-contrib-tuya-smart-device.
Will update the latest version #33
from node-red-contrib-tuya-smart-device.
Updated to latest 6.1.1 with the following options
options.nullPayloadOnJSONError = false
options.issueGetOnConnect = false
Please update to the 2.0.0 version of tuya-smart-device .
Hope this fixes the issues.
from node-red-contrib-tuya-smart-device.
Related Issues (20)
- Cannot install HOT 1
- Device not connected HOT 2
- Gateway connection glitch causes restart of Node-Red (uncaught) HOT 4
- Weird key format? HOT 3
- Tuya protocol 3.4, 3.5 support missed HOT 1
- An unusual response - 2 HOT 1
- Node does not work in conjunction with Http in node HOT 1
- how to connect to sub-devices that are managed by a tuya gateway? HOT 2
- Bi-Meter disconnects from node red HOT 5
- GET response the same for schema and DPS ID HOT 3
- unreadable 'data' output from node HOT 2
- Device not connected. Can't send the SET commmand HOT 1
- where do i set the api credentials HOT 1
- [announce] nr_Tuya_OpenAPI_2.0, a node_red flow to access Tuya Cloud HOT 1
- Manage all Tuya devices with node-red HOT 1
- Cluttered log file HOT 5
- Problem with Error code "Payload must be a number in range 0-100" HOT 1
- Error in tuyapi
- More finner log info control
- Data refresh very Slow 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 node-red-contrib-tuya-smart-device.