node-red-contrib-tuya-local
node-red-contrib-tuya-local copied to clipboard
Receiving "TypeError: Cannot use 'in' operator to search for '1' in undefined"
Hi, I know you are not using this much anymore but i keep getting this error from the last function. From what I can tell it is saying that 'dps' is undefined but i'm not sure why. Thanks DC
Is it a frequent error? do you get any output at all?
Also you mention the 'last function', are you referring to a function node?
I see the error in the debug window everytime i turn the switch on or off.
Yes i'm referring to a funtion node.
Is code in the function node doesn’t work for your current tuya output.
Is this your first node-red flow? If so try to put a debug node after the tuya node.
Hi, Yes it is my first node-red flow.
When i have the debug node there, it shows a string and I have not been able to work out the data in the string.
One of the things that does not make sense is that I thought there would be a topic shown under the object.
Thanks for your help so far. Do you think i could have misconfigured something in one of the other switch nodes to cause this error?
That looks wrong. This looks like you have not obtained the proper decryption key. Have you been through tuyaapi docs on that matter ?
Thanks again for your help. Your comment about the decryption key got me thinking so i tried protocol version 3.1 and it started working. I thought my switches were updated to 3.3 but they must be 3.1 because i can now see the payload correctly. Cheers
Do you know if anyone has used the same concept to control light bulbs with RGB colours etc?