HI
We have a tuya curtain switch (model sc400w-eu)
I followed the instructions found here: https://community.openhab.org/t/step-by-step-guide-for-adding-tuya-bulbs-wi-fi-smart-led-smart-life-app-to-oh2-using-tuya-mqtt-js-by-agentk
I think everything is correctly installed but I can’t get the blinds to move.
I defined the thing with a channel as a Rollershutter with the command
tuya/tuyaIDTuyaKeyf/IP/command
But i don’t know how to define the Open/Close/Stop Commands
and the tuya-mqtt debug output is
TuyAPI:device Connected to device. undefined (192.168.1.153, bf21e25641ab7da07cydnr, xxxxxxx) +91ms
TuyAPI:device GET Payload: +3ms
TuyAPI:device { gwId: ‘bf21e25641ab7da07cydnr’, devId: ‘bf21e25641ab7da07cydnr’ } +1ms
TuyAPI:mqtt command is JSON +158ms
TuyAPI:mqtt receive command 2 +0ms
TuyAPI:device set: 2 +47ms
(node:4259) UnhandledPromiseRejectionWarning: TypeError: No arguments were passed.
at CustomTuyAPI.set (/etc/openhab2/scripts/tuya-mqtt/node_modules/tuyapi/index.js:159:13)
at /etc/openhab2/scripts/tuya-mqtt/tuya-device.js:215:25
at new Promise ()
at TuyaDevice.set (/etc/openhab2/scripts/tuya-mqtt/tuya-device.js:214:16)
at /etc/openhab2/scripts/tuya-mqtt/tuya-mqtt.js:194:32
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:4259) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see Command-line API | Node.js v21.7.1 Documentation). (rejection id: 2)
(node:4259) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
TuyAPI Received response +78ms
TuyAPI 000055aa000000000000000a0000002c00000001a90f48bdd0339942fa3bc1f7488dadbdfdc0ad399612a65b72bf5253b2731ae38a9005dd0000aa55 +2ms
Cleanup Uncaught Exception… Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
at Decipheriv.final (internal/crypto/cipher.js:172:29)
at TuyaCipher.decrypt (/etc/openhab2/scripts/tuya-mqtt/node_modules/tuyapi/lib/cipher.js:65:24)
at Socket. (/etc/openhab2/scripts/tuya-mqtt/node_modules/tuyapi/index.js:345:39)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:271:9)
at Socket.Readable.push (_stream_readable.js:212:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23) +0ms
TuyAPI:device Disconnect from TuyAPI Device +50ms
TuyAPI Disconnect +25ms
and the process dies
So… I don’t know what to do! Is a problem of the tuya-api, or the tuya-mqtt integration or is just a problem of configuration?
Can someone help me!
Thanks