Skip to content
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

Getting an AES error #50

Closed
S-K-Lieren opened this issue Aug 10, 2018 · 6 comments
Closed

Getting an AES error #50

S-K-Lieren opened this issue Aug 10, 2018 · 6 comments

Comments

@S-K-Lieren
Copy link

S-K-Lieren commented Aug 10, 2018

Hey guys,

I'm not able to get it running. It throws the following error:

/node_modules/node-forge/lib/aes.js:203
    var len = tmp.length();
                  ^

TypeError: tmp.length is not a function
    at forge.aes.Algorithm.initialize (/node_modules/node-forge/lib/aes.js:203:19)
    at new forge.cipher.BlockCipher (/node_modules/node-forge/lib/cipher.js:118:18)
    at Object.forge.cipher.createCipher (/node_modules/node-forge/lib/cipher.js:42:10)
    at new TuyaCipher (/node_modules/tuyapi/lib/cipher.js:13:30)
    at new TuyaDevice (/node_modules/tuyapi/index.js:42:24)
    at /app.js:28:13
    at Array.forEach (native)
    at initDevices (/app.js:26:18)
    at Object.<anonymous> (/app.js:36:1)
    at Module._compile (module.js:577:32)

Any ideas?

@codetheweb
Copy link
Owner

codetheweb commented Aug 10, 2018 via email

@S-K-Lieren
Copy link
Author

Actually, I started from scratch. Now I can't even run tuya-cli link-wizard anymore, it throws the following error:

:~$ tuya-cli link-wizard
/usr/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/link/index.js:79
TuyaLinkWizard.prototype.linkDevice = async function (options) {
                                            ^^^^^^^^


SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/@tuyapi/cli/lib/link.js:3:41)

@codetheweb
Copy link
Owner

What's the output of node -v?

@S-K-Lieren
Copy link
Author

6.14.3

@codetheweb
Copy link
Owner

Looks like you need to update your Node version. Please update to ≥8.x.x and try again.

I would recommend using NVM if you're not already.

@S-K-Lieren
Copy link
Author

S-K-Lieren commented Aug 16, 2018

Thanks for your help.

I tried setting everything up on another machine. The wizard is running now, but it's not able to find my device(s), even though they are connected and the LED is flashing. I'm able to use my devices via Smart Life App.
Btw: What exactly does the Link Wizard do? You're asking for a SSID and even my WiFi key, for what? As I mentioned, the devices are already working in my network.

Any ideas?

Edit: Closing this, see #65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants