Comments (5)
Good thought.
But how will you turn on from the off state ( physical ) . ?
from node-red-contrib-tuya-smart-device.
See also issue#429.
I found 2 ERRORs not catched:
3 Mar 18:48:14 - [error] [tuya-smart-device:12896b89.d95c84] Error: find() timed out. Is the device powered on and the ID or IP correct?
3 Mar 18:49:56 - [error] [tuya-smart-device:e543af34.b2468] Error: Error from socket
More notes on ver. 2.0.0. used in production environment tuyaDAEMON:
- New in this version is the extra infos:
3 Mar 18:56:00 - [info] [tuya-smart-device:12896b89.d95c84] Recieved the config {"id":"12896b89.d95c84","type":"tuya-smart-device","z":"173260fb.d021ff","deviceName":"siren","deviceId":"42027807d8bfc0c5831e","deviceKey":"70e17a0208ae2e5c","deviceIp":"","retryTimeout":"100279","findTimeout":"100291","tuyaVersion":"3.1","x":970,"y":460,"wires":[["2ec83963.a7d146"]],"info":"**tuya_ms_104** \n\n_tuya bridge for \"WiFi Smart Switch Module MS-104\"_\n\nAfter any command, this device sends (and this node captures) a 'status' message carring only the changed values.\n\nA command can be send by node-red, SmartLife app, Google home, Google voice: in any case this node captures the status message.\n\n_note:_\n If node-red changes the switch state, SmartLife is updated correctly, but Google Home not.\n \n_Input:_\nTo send a command via node-red. the payload structure must be:\n` multiple: true\n data: object\n 1: true\n 102: 5`\n\n_nb:_\nset **Device Virtual ID** and **Device Key** to a tuya connected and working switch, model M-104 ( see [https://it.aliexpress.com/wholesale?SearchText=smart+switch+ms+104](https://it.aliexpress.com/wholesale?SearchText=smart+switch+ms+104))."}
All stuff after "tuyaVersion":"3.1"
is not usefull.
-
User config timeouts are very useful: with prime numbers I can better distribute the load over the time. But it would be even better with the dynamic timeouts: so I can "hibernate" some devices via the program (see ISSUE#35).
-
tuyapi is now ver. 6.1.5
Best regards
m.s.
from node-red-contrib-tuya-smart-device.
Good thought.
But how will you turn on from the off state ( physical ) . ?
Hi
I have a phisical/traditional switch in wall (2-wire). So when switch is off the bulb is off. If the wall switch is off then obviously there is not way to switch on the bulb. The status of bulb in my custom app should be INACTIVE. To detect if bulb is connected I'm using status of your tuya-smart-device node. If status is connected then then in my app the bulb is accessible and you can perform operations (On/Off/Dimm/etc). In case of other status I assume the bulb is not connected and it should be inactive in my app (no operations allowed).
I hope that clarifies.
from node-red-contrib-tuya-smart-device.
The catch node fails to catch the error, for example "Error: Error from socket". I would like to request that node.error is called with a 2nd parameter to permit the catch node to catch errors it raises.
The rationale behind. When tuya-smart-device cannot connect to tuya bulb it generate error and report it to debug window. But when the bulb swith is off then it is normal situation and there is need to handle that programatically. For example catch error from the node and decide not to display in debug.
I localy modified the following:
tuya-smart-device.js:
var setStatusOnError = function (e, message = "error", msg = {}) { node.error(e, msg); return node.status({ fill: "red", shape: "ring", text: message }); };
And it is working as expected
from node-red-contrib-tuya-smart-device.
@mroziken Please check version 3.1.0
from node-red-contrib-tuya-smart-device.
Related Issues (20)
- 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 9
- 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
- Node not works if some characters in the key HOT 8
- unreadable 'data' output from node HOT 1
- tuya ir remote control with virtual device id
- Port change HOT 1
- Connecting to device through Gateway not working
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.