I’m having such a headache with all this… I’ve tried all the other methods for getting these keys and hit a dead end and now I’m getting the same thing here.
I’ve followed the steps up to and including installing Root Certificate Manager, but I can’t figure out where the QR code is coming from. All I can see in RCM is a list of 150-odd certs, all of which I can view or download to SD card, but no QR codes to be found anywhere. What am I missing??
EDIT Scratch that, I was able to locate the keys using a different root folder explorer. Phew!
Has anyone managed to get this working on a Synology NAS, by any chance? I’m a bit of a noob at this Linux thing, but I’ve tried to follow the process (the 2.4x option, as I’m running 2.5) and the MQTT broker just seems to stay offline, meaning the thing I added won’t connect either.
When I was installing the various elements (the “npm” commands) I saw a lot of WARN messages come through which, as a Windows person made me think, “Hmm, that can’t be good.” This is an example of what I mean:
And when I try to run node tuya-mqtt.js, I get this output:
root@SERVER1:/volume1/public/openHAB/scripts/tuya-mqtt# node tuya-mqtt.js
/volume1/public/openHAB/scripts/tuya-mqtt/tuya-mqtt.js:2
const mqtt = require('mqtt');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
I using OpenHabian
OH 2.5
MQTT binding
Mosquitto 3.1 (do not use embeded MQTT from Openhab, please install from openhabian-config. )
Tuya-mqtt version3.3 (run on node.js, see more on GitHub)
Make MQTT Generic Topic for each physical switch box and channel/item for each button. On/Off custom vale should be { “dps” : 1, “set” : 1 } (dps for a button eg. 1,2,3. set is 1 for on 0 for off.)
Hi - I’m trying to use the BlueStacks approach to get the outlined at the start of this thread, having failed with TuyaConvert or other methods to get the LocalKey. However the only Wifi network BlueStacks can see is one it’s created itself - strangely enough named “BlueStacks” !
How do I either (a) obtain the password for this wifi network (which SmartLife needs), or add the wifi network on which the windows PC hosting BlueStack is running?
Hi NarathornBanvorn
I am trying to configure it on RPi4 also,
could you tell me if I set the parameters correctly? I am not able to set the configuration to work correctly maybe you can give me some hints.
Phew - fixed it. Added the device through SmartLife on my phone, and was then able to get the un-encrypted details through a rooted Bluestacks (with a previous version of Smartlife from the apk repo). After then tussling with the right version of tuya-mqtt (needed the more recent version for MQTT 3.3) all is working. Thanks to all the great work and pointed from @HolgiHab, @tsightler, and @Fiftiz
Looking for some help getting my Tuya sockets to work properly. Been through most of the thread here trying to understand and have reached the following point:
OH 2.5 on a raspberry pi4
Got the Local key for my socket
Installed the tsightler version of Tuya-MQTT
Setup the Openhab MQTT binding / broker / things
Set up a switch channel for command and state elements with
Tuya/socket/device ID/local key/IP address
Left the custom on/off values blank.
What happens is once I start the script, I can turn the socket on, but then not off.
If I re-start the script with the socket on, I can turn it off, but not on again!
I’ve run the script with debug and it looks like the script just doesn’t send the second command for some reason.
I also can control the socket reliably with the tuyaapi cli commands on dps 1
Has anyone encountered this before?
I’ve tried the version 3.3 format and it doesn’t seem to work for these sockets, although I may be formulating something wrong as I get ”bad format” reports in the debug.
The sockets are Teckin energy monitoring ones. The square version.
Also running into issues trying to start the script as a service, but I’ll leave that question until I can get the sockets switching reliably
I used the rooted Bluestacks method. Took me a while though, first time I’d encountered it.
Had to use the apk mirror to get an old version of the SmartLife app (3.6.1 I think… picked as someone further up the thread mentioned it) to get the right data in the file. Also tried the Packet Capture method, but just got gunk.
If you’re having a specific issue, try me. I’m no expert, but had to jump through a lot of hoops to get the numbers out!
Interesting… I only did it last week. Has it changed over the weekend? Or perhaps it relates to how long you’ve had an account? I’ve had the account since November.