Comments (9)
Please try the latest version of codetheweb/tuyapi and tuya-cli
And my advice is to define IP and version in the devices.conf file. It helped me.
like this:
{
name: 'ikeabulb05',
ip 'XX.XX.XX.XX',
version: '3.X'
id: 'bf541f534610c30095es6v',
key: '---------',
type: 'RGBTWLight'
},
from tuya-mqtt.
Thank you:
tuya-cli -V - 1.18.3
not sure how to check current version of tuyaapi and don't know if my tuya-mqtt uses it
from tuya-mqtt.
Execute this command:
npm view tuyapi version
Example output:
7.5.1
Yes, tuya-mqtt has a dependency on tuyapi
from tuya-mqtt.
npm view tuyapi version
7.5.1
still the same error ;(
tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/dps/20/command","message":"true"} +0ms
tuya-mqtt:command Received command for DPS20: true +0ms
tuya-mqtt:tuyapi Set device bf541f534610c30095es6v -> {"dps":"20","set":true} +43s
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> U52AhS8B +53ms
tuya-mqtt:error Timeout waiting for status response from device id: bf541f534610c30095es6v +44s
tuya-mqtt:error Error connecting to device id bf541f534610c30095es6v...retry in 10 seconds. +1s
tuya-mqtt:tuyapi Search for device id bf541f534610c30095es6v +16s
tuya-mqtt:tuyapi Found device id bf541f534610c30095es6v +0ms
^C tuya-mqtt:tuyapi Disconnected from device ikeabulb05 (bf541f534610c30095es6v, 854ea077fa8be13b) +413ms
tuya-mqtt:info Exit code: SIGINT +1m
tuya-mqtt:info Exit code: 0 +1s
from tuya-mqtt.
Is there any difference when you execute these commands?
tuya-cli get --id bf541f534610c30095es6v --key ____________ --dps 20
tuya-cli get --id bf541f534610c30095es6v --key ____________ --dps 20 --protocol-version 3.3
tuya-cli get --ip XX.XX.XX.XX --id bf541f534610c30095es6v --key ____________ --dps 20 --protocol-version 3.3
from tuya-mqtt.
tuya-cli get tuya-cli get --id bf541f534610c30095es6v --key ____________ --dps 20
TypeError: Cannot read properties of undefined (reading '20')
at Object.get (/usr/lib/node_modules/@tuyapi/cli/lib/control.js:49:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
tuya-cli get tuya-cli get --id bf541f534610c30095es6v --key 854ea077fa8be13b --dps 20 --protocol-version 3.3
TypeError: Cannot read properties of undefined (reading '20')
at Object.get (/usr/lib/node_modules/@tuyapi/cli/lib/control.js:49:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
tuya-cli get tuya-cli get --ip 192.168.0.17 --id bf541f534610c30095es6v --key _____ --dps 20 --protocol-version 3.3
TypeError: Cannot read properties of undefined (reading '20')
at Object.get (/usr/lib/node_modules/@tuyapi/cli/lib/control.js:49:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
from tuya-mqtt.
Please try my fork of tuya-mqtt: https://github.com/lehanspb/tuya-mqtt
I've made some changes such as useful dp-refresh function.
it is possible that dependencies will be updated during installation and may be this solves your problem.
from tuya-mqtt.
Using tuya app:
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33tmCokCVpqJa +10s
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33CgBkbqfIvIgNM +7s
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33tmCokCVI2pCE +4s
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33CgBk4MPK orS +3s
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33tmCokCV2N9qG +1s
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> 33CgBk4MPKwssEL +1s
using mqtt :
tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/dps/20/command","message":"true"} +0ms
tuya-mqtt:command Received command for DPS20: true +0ms
tuya-mqtt:tuyapi Set device bf541f534610c30095es6v -> {"dps":"20","set":true} +11s
tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/hsb_command","message":"309,64,43"} +39ms
tuya-mqtt:command Received MQTT command message is a text string +39ms
tuya-mqtt:command Invalid command topic tuya/ikeabulb05/hsb_command for device id: bf541f534610c30095es6v +1ms
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> U52AhS8B +43ms
tuya-mqtt:error Timeout waiting for status response from device id: bf541f534610c30095es6v +34s
tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/dps/20/command","message":"true"} +5s
tuya-mqtt:command Received command for DPS20: true +5s
tuya-mqtt:tuyapi Set device bf541f534610c30095es6v -> {"dps":"20","set":true} +5s
tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/hsb_command","message":"309,64,74"} +51ms
tuya-mqtt:command Received MQTT command message is a text string +51ms
tuya-mqtt:command Invalid command topic tuya/ikeabulb05/hsb_command for device id: bf541f534610c30095es6v +0ms
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> U52AhS8B +58ms
tuya-mqtt:error Error connecting to device id bf541f534610c30095es6v...retry in 10 seconds. +1s
tuya-mqtt:error Timeout waiting for status response from device id: bf541f534610c30095es6v +4s
tuya-mqtt:command Received MQTT message -> {"topic":"tuya/ikeabulb05/dps/20/command","message":"false"} +6s
tuya-mqtt:command Received command for DPS20: false +6s
tuya-mqtt:tuyapi Set device bf541f534610c30095es6v -> {"dps":"20","set":false} +6s
tuya-mqtt:tuyapi Received string data from device bf541f534610c30095es6v -> U52AhS8B +78ms
tuya-mqtt:tuyapi Search for device id bf541f534610c30095es6v +5s
tuya-mqtt:tuyapi Found device id bf541f534610c30095es6v +1ms
tuya-mqtt:error Timeout waiting for status response from device id: bf541f534610c30095es6v +6s
tuya-mqtt:error Error connecting to device id bf541f534610c30095es6v...retry in 10 seconds. +1s
from tuya-mqtt.
You can also enable full debug:
DEBUG=* node tuya-mqtt.js
This will give you even more debug information.
from tuya-mqtt.
Related Issues (20)
- Problem installing on Synology RS914 HOT 32
- Home Assistant integration how? HOT 2
- tuya-mqtt publishes states only when app is opened. HOT 22
- What mqtt broker HOT 3
- Disconnected from device and never connects again ... HOT 6
- Samples for nodejs script HOT 9
- New Maintainer Needed HOT 4
- Not sure when you went into Maintenance mode HOT 3
- Command Syntax for friendly topics HOT 3
- Setting switch state of a smart switch (custom template) HOT 11
- zombe state reconnecting issue? HOT 1
- Switch w/ Energy: DPS values reported only once at tuya-mqtt startup HOT 3
- Sudenly wrong responses from tuya device HOT 1
- tuya-mqtt not working (OpenHab) HOT 7
- Devices behind zigbee gateway available with tuya-cli but not tuya-mqtt HOT 1
- Different names after service restart HOT 9
- tuya-mqtt crushing HOT 1
- hsb type not suported in generic template HOT 1
- Support Smart Switch TYWB 4ch-RF HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tuya-mqtt.