vinodsr / node-red-contrib-tuya-smart-device

a node-red module for managing tuya smart devices
https://flows.nodered.org/node/node-red-contrib-tuya-smart-device
MIT License
43 stars 15 forks source link

ver 5.0.0 - credentials #92

Closed msillano closed 1 year ago

msillano commented 1 year ago

The solution of using credentials is very interesting. Unfortunately I can't use it, because I have a problem:

In the Android-Termux environment (linux 4.19, Nj 18.7, NR 3.0.2) at startup (but also if I reload node-red in the browser) the tuya-device nodes that use the credentials are marked in 'error' (red triangle).

Just click on the node to open the properties (the values are ok) and close immediately to make the error disappear. I am not a Linux expert (in Windows 11 the problem does not arise, everything is ok) but it is a small but annoying issue: it inhibits any possibility of automatic startup.

Of course the solution is not to use the credentials .... :)

Can someone help me? Regards SM.

vinodsr commented 1 year ago

its interesting. I had test the same setup in windows and linux but cannot replicate the issue.

can you check the logs and see if you find anything fishy ?

also can you tell me the message shown when you hover on the triangle error icon.

vinodsr commented 1 year ago

Got the error while refreshing the page.

Working on the fix.. will update

vinodsr commented 1 year ago

It looks like the credentials is not part of the validate mode.

https://github.com/node-red/node-red/issues/3420

I am writing logic to bypass the validation if credentials is not available. So errors if any will be shown only when you edit the node. not in the view. Once you do a edit, then the credentials will be available in the view mode.

vinodsr commented 1 year ago

@msillano can you please check the issue in version 5.0.1 ?

msillano commented 1 year ago

Thanks vinodsr, i will do it ASAP.

msillano commented 1 year ago

Done, tested on WIN11 and Android-Termux. The problem has disappeared and the operation is as expected in both environments. Thank you.