Open wormpy001 opened 1 year ago
Are you using HOOBS? If so,
/var/lib/hoobs/tuyalanbridge/node_modules/homebridge-tuya-lan
if (!/^[0-9a-f]+$/i.test(device.key)) return this.log.error('%s, key for %s (%s), is not a valid key.', device.key.replace(/.{4}$/, '****'), device.name || 'unnamed device', device.id);
by putting a //
in front of the line.Or you could use this solution if you're running homebridge: https://github.com/iRayanKhan/homebridge-tuya/issues/409
Thanks It works again
@Akury83 , the homebridge solution link is broken, can you tell me what is the solution for homebridge?
@Akury83 , the homebridge solution link is broken, can you tell me what is the solution for homebridge?
I think you have to copy the link and paste it in the browser address. Because when i tried to click the link above it goes into a different page.
Another Tuya Lan plugin has the same issue with the new key formats. Commenting out the line that checks for the invalid key character errors lets the plugin continue processing the command, but fails silently as it can't understand certain characters in the key e.g. '
Here was jconsolatti's finding, quoted:
"Little python debugging and it seems to confirm the parsing issue..
Orginal and broken:
d = tinytuya.OutletDevice('12345eb1f71e050cetfww', '100.88.55.77', '12345%$A'hACm:ts')
Working: local_key = "12345%$A'hACm:ts"
d = tinytuya.OutletDevice('12345eb1f71e050cetfww', '100.88.55.77', str(local_key))"
Basically creating a string that contains the key and then calling that. Could this be rolled out or tested on this plugin?
link to other thread:
When I try to add the pasword for a tuna device I get an error about that the key is not valid Previosly I get a key like "397a16f2689cf1f6" and now the key is like "ylAf_1TD'r44@&?>" but homebridge gives an error "[25/6/2023 09:43:58] [TuyaLan] ylAf_1TD'r44****, key for Lightstrip Radio (bf8ee5bf9391cbcab8og8s), is not a valid key." I tried to delete the device and install the device again but it always gives a pasword with strange combinations. Is there a work-around?