mirror of
https://github.com/lehanspb/tuya-mqtt.git
synced 2025-12-16 17:54:36 +00:00
v3.0.4
* Fix reconnect failure for some error cases * Bump tuyapi version to latest
This commit is contained in:
@@ -601,9 +601,7 @@ class TuyaDevice {
|
|||||||
this.reconnecting = true
|
this.reconnecting = true
|
||||||
debugError('Error connecting to device id '+this.options.id+'...retry in 10 seconds.')
|
debugError('Error connecting to device id '+this.options.id+'...retry in 10 seconds.')
|
||||||
await utils.sleep(10)
|
await utils.sleep(10)
|
||||||
if (!this.device.isConnected) {
|
this.connectDevice()
|
||||||
this.connectDevice()
|
|
||||||
}
|
|
||||||
this.reconnecting = false
|
this.reconnecting = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -626,7 +624,7 @@ class TuyaDevice {
|
|||||||
await utils.sleep(1)
|
await utils.sleep(1)
|
||||||
this.connectDevice()
|
this.connectDevice()
|
||||||
} else if (this.heartbeatsMissed > 0) {
|
} else if (this.heartbeatsMissed > 0) {
|
||||||
const errMessage = this.heartbeatsMissed > 1 ? " consecutive heartbeats" : " heartbeat"
|
const errMessage = this.heartbeatsMissed > 1 ? " heartbeats" : " heartbeat"
|
||||||
debugError('Device id '+this.options.id+' has missed '+this.heartbeatsMissed+errMessage)
|
debugError('Device id '+this.options.id+' has missed '+this.heartbeatsMissed+errMessage)
|
||||||
}
|
}
|
||||||
this.heartbeatsMissed++
|
this.heartbeatsMissed++
|
||||||
|
|||||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tuya-mqtt",
|
"name": "tuya-mqtt",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -2302,9 +2302,9 @@
|
|||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
||||||
},
|
},
|
||||||
"tuyapi": {
|
"tuyapi": {
|
||||||
"version": "6.1.3",
|
"version": "6.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/tuyapi/-/tuyapi-6.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/tuyapi/-/tuyapi-6.1.4.tgz",
|
||||||
"integrity": "sha512-/7nI3Dr3NwWMDnrz7MSRQw9lW3R5i6lnRStIjPgybZ1Wj1jL/PHuRfeNBPAb8ocNbLQN6JqxbefY4awXmp+LqQ==",
|
"integrity": "sha512-aE1ctVaF1fXUbwMatQvr6GuE1kmVD0QdIIm/9AUJW+mOCOg5SSt2XyTmKc8qirJ6iQ3lZcTnHp9xK6gRAzrOLA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "4.1.1",
|
"debug": "4.1.1",
|
||||||
"p-queue": "6.6.1",
|
"p-queue": "6.6.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tuya-mqtt",
|
"name": "tuya-mqtt",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"description": "Control Tuya devices locally via MQTT",
|
"description": "Control Tuya devices locally via MQTT",
|
||||||
"homepage": "https://github.com/TheAgentK/tuya-mqtt#readme",
|
"homepage": "https://github.com/TheAgentK/tuya-mqtt#readme",
|
||||||
"main": "tuya-mqtt.js",
|
"main": "tuya-mqtt.js",
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
"json5": "^2.1.3",
|
"json5": "^2.1.3",
|
||||||
"mqtt": "^4.2.6",
|
"mqtt": "^4.2.6",
|
||||||
"supports-color": "^8.1.0",
|
"supports-color": "^8.1.0",
|
||||||
"tuyapi": "^6.1.3",
|
"tuyapi": "^6.1.4",
|
||||||
"mathjs": "8.1.1"
|
"mathjs": "8.1.1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Reference in New Issue
Block a user