-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More device control #57
Comments
Cool 👍 .. Nice suggestions. Added this to 5.0 milestone. (May -31 ) |
@msillano I am planning to make changes which gives you better control on the tuya-smart-device-node.
I am checking if it is possible for a node to update the configuration . ? so that if you send a control message with a new findTimeout , it is also updated in the node 's config. Next time when we open the node using the editor, we can see the udpated value. This helps in easy debugging. ( else inside the runtime it will have a different value compared to those in the editor) For generic node , since we are not maintaining the values at the node properties this is not an issue. Do you have any idea on how to update the node's properties dynamically. ? |
@msillano I had released a new version 4.1.0 with some more control on state and timeouts. . It will be good if you can do a test run |
Ok, asap. |
Production scenario:
node-red-contrib-tuya-smart-device
.The problem
It is better to have a fast (2-10 s) timeout when the device is working (to reconnect it soon in case of any problem) and a very slow (60-600 s) timeout when the device is OFF (so we polling it, and auto-reconnect when turned on).
The proposed solution
findTimeout
, in millisecond.Syntax:
msg ={"findTimeout": 10000}.
It can be sent alone or with standard SET/GET/MULTIPLE/SCHEMA commands.
Example: look at IR #1, default timeout 10 s.
Here the code used: tuya-smart-device.js, line 43
Syntax:
msg ={"standby": true|false}.
It can be sent alone or with standard SET/GET/MULTIPLE/SCHEMA commands.
Example: look at IR #1, default timeout 10+10 s.
Here the code used: tuya-smart-device.js, after the 'findTimeout ' code:
(updated: now standby, if the device is connected, does
disconnect()
)The proposed enhancements are backward compatible with ver 4.0.1
I'm using this code on my project, for now without problems.
Best regards
m.s.
The text was updated successfully, but these errors were encountered: