0x5e / homebridge-tuya-platform

Make homebridge-tuya-platform great again.
MIT License
222 stars 67 forks source link

Add support for Tuya Camera #48

Closed hotbird1970 closed 1 year ago

hotbird1970 commented 2 years ago

If possible, please add support for Tuya Camera with Flood light, currently it is showing as "unsupported device". Since it may not be possible to get the camera feed, please try to expose the camera as a light switch to turn on / off camera flood light or set up automations based on spotlight being triggered.

Device details { "result": { "active_time": 1667665196, "category": "sp", "category_name": "Smart Camera", "create_time": 1667665196, "gateway_id": "", "icon": "smart/icon/ay1568808812161OlPJW/e9205fad2bce1aea35ae057cd6e5c311.png", "id": "", "lat": "", "lon": "", "model": "", "name": "Wireless-IPC ", "online": true, "owner_id": "", "product_id": "5fuyai0la8slgmnj", "product_name": "Wireless-IPC ", "sub": false, "time_zone": "-04:00", "update_time": 1667665214, "uuid": "hhws91a486885c5f6caa"

Device log 2022-11-05, 12:20:56 p.m.] [@0x5e/homebridge-tuya-platform] [TuyaDeviceManager] Unhandled mqtt message: bizCode = p2pSignal, bizData = { msg: { close_reason_local: 0, close_reason: 5 }, header: { path: 'mqtt', trace_id: 'ipc_p2p_ios_ebe4878e8496df5ee8zusg_1667665211383', sub_dev_id: '', from: 'ebe4878e8496df5ee8zusg', moto_id: '', to: 'az1662311846569oo7J8', sessionid: 'ebe4878e8496df5ee8zusg16676652119M8lWySb', type: 'disconnect' } }

sadanro100 commented 1 year ago

Just tested v1.7.0-beta.9, still no doorbell notification when I press the button. Logs:

[17/12/2022, 12:22:16] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 20
message = {
  "bizCode": "online",
  "bizData": {
    "time": 1671290536
  },
  "devId": "07010311ecfabc66bfc9",
  "productKey": "cweu5xn5kod6piyo",
  "ts": 0
}
[17/12/2022, 12:22:19] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 20
message = {
  "bizCode": "online",
  "bizData": {
    "time": 1671290539
  },
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "ts": 0
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "fafc438b-a1a3-48d8-8006-334263725518",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "101": true,
      "code": "basic_indicator",
      "t": "1671290537",
      "value": true
    }
  ]
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290539
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = fafc438b-a1a3-48d8-8006-334263725518, t = 1671290537
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290540262",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "743782cb-2b90-4a9d-9916-02bdff37d0bf",
  "Signature-Headers": "client_id",
  "sign": "E10159CE4FD627BC4E20A180272A11D8B6E565E2687C6AF66ABF546C9A65F236",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "2b29b18c-e464-4fc6-a9a3-200d32736c74",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "108": "0",
      "code": "basic_nightvision",
      "t": "1671290537",
      "value": "0"
    }
  ]
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290539
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = 2b29b18c-e464-4fc6-a9a3-200d32736c74, t = 1671290537
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290540343",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "5f9b560a-1e57-472d-8036-e0f9d4442307",
  "Signature-Headers": "client_id",
  "sign": "73F2BC3DA0CF0ADD77D72FC3B6BFC2FE2DF794FF27EF31767EA8C90D5D24CAC2",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "356789f0-9043-46fe-84f1-16cb3098b5d7",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "168": true,
      "code": "motion_area_switch",
      "t": "1671290537",
      "value": true
    }
  ]
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290539
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = 356789f0-9043-46fe-84f1-16cb3098b5d7, t = 1671290537
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290540364",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "edd8631d-cad7-4105-8acf-603c6220872d",
  "Signature-Headers": "client_id",
  "sign": "6A3867B07370AE26DDDBA8C8837D6C6A6814FE898720861333FCD8CED96FC292",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "0def8cfb-46fb-41db-809f-b2c532c7fb51",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "103": false,
      "code": "basic_flip",
      "t": "1671290537",
      "value": false
    }
  ]
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290539
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = 0def8cfb-46fb-41db-809f-b2c532c7fb51, t = 1671290537
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290540384",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "bfd96414-67ec-4be4-80cb-0cea0c0e9c98",
  "Signature-Headers": "client_id",
  "sign": "89EA0E3E0D5A9AC90C2192057CB8FE24A632019D5B766B8B9B1D30858F58D867",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "8ce661ac-3ee2-4431-bb81-abfaf078919c",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "152": "1",
      "code": "pir_switch",
      "t": "1671290537",
      "value": "1"
    }
  ]
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290540406",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "0f41cfa4-9b19-4af4-bec4-01bed55b49ad",
  "Signature-Headers": "client_id",
  "sign": "15DEBFF2BA9497F7294F83481BD21CFC7C8943DC29A8ECAE34DB2EB74565A1EC",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "beddb5a9-495c-471c-a7d7-392378e79032",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "104": true,
      "code": "basic_osd",
      "t": "1671290537",
      "value": true
    }
  ]
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290539
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = 8ce661ac-3ee2-4431-bb81-abfaf078919c, t = 1671290537
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290539
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = beddb5a9-495c-471c-a7d7-392378e79032, t = 1671290537
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290540423",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "99ed89e4-5270-450f-aaa1-56c1ef2cdd5b",
  "Signature-Headers": "client_id",
  "sign": "1D37B02560640F0899B1C998C5B286D2F80516134593FF04F11FF2E685AF8687",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "cc31df84-8760-48e5-9366-1c48721b2849",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "169": "",
      "code": "motion_area",
      "t": "1671290537",
      "value": ""
    }
  ]
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290539
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = cc31df84-8760-48e5-9366-1c48721b2849, t = 1671290537
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290540440",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "a4192d46-e36a-44e2-9a97-0827312eb361",
  "Signature-Headers": "client_id",
  "sign": "00304D1832B79AD02B9BD36C95BFEFE09B606191CF65F48DE477A47003CF3205",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "85875a7d-2c97-41d9-8d06-c55d92a853b8",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "146": "0",
      "code": "wireless_powermode",
      "t": "1671290540",
      "value": "0"
    }
  ]
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "b00f6d33-b8c8-48a5-a42f-baa18b87714d",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "145": 59,
      "code": "wireless_electricity",
      "t": "1671290540",
      "value": 59
    }
  ]
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "9bd2bc17-fd63-4202-af1e-4a386afbee38",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "149": true,
      "code": "wireless_awake",
      "t": "1671290540",
      "value": true
    }
  ]
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 20
message = {
  "bizCode": "event_notify",
  "bizData": {
    "devId": "eb5cf3d97be677ad8feh9u",
    "edata": "edbc67071671290537",
    "etype": "ac_doorbell"
  },
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "ts": 1671290540413,
  "uuid": "hsljada3c4f2107552fd"
}
[17/12/2022, 12:22:20] [TuyaPlatform] [TuyaDeviceManager] Unhandled mqtt message: bizCode = event_notify, bizData = {
  devId: 'eb5cf3d97be677ad8feh9u',
  edata: 'edbc67071671290537',
  etype: 'ac_doorbell'
}
[17/12/2022, 12:22:21] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290541056,
  "tid": "99a97fe77e1e11ed8b31260268243644"
}
[17/12/2022, 12:22:21] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290541096,
  "tid": "99aefc9d7e1e11ed87ecb6f336d87174"
}
[17/12/2022, 12:22:21] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290541115,
  "tid": "99b202a67e1e11ed8b31260268243644"
}
[17/12/2022, 12:22:21] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290541281,
  "tid": "99cc0fea7e1e11ed8b31260268243644"
}
[17/12/2022, 12:22:21] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290541320,
  "tid": "99d218927e1e11ed8864c6843b9bc2ab"
}
[17/12/2022, 12:22:21] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290541341,
  "tid": "99d545227e1e11ed8864c6843b9bc2ab"
}
[17/12/2022, 12:22:21] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290541415,
  "tid": "99e01d2d7e1e11ed87ecb6f336d87174"
}
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "03045fc5-804a-41b2-9d0e-4097bdd04720",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "110": 1,
      "code": "sd_status",
      "t": "1671290542",
      "value": 1
    }
  ]
}
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290540413
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = 03045fc5-804a-41b2-9d0e-4097bdd04720, t = 1671290542
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290543023",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "86333ca6-075d-4583-a72a-974af2fe5a0c",
  "Signature-Headers": "client_id",
  "sign": "1B65AA17841984EAC1A62FAA358D9CD7CC484B22E2638971585BE36333930DF8",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "73636bb8-1f66-48e5-adbe-d0683514a568",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "109": "15540224|1523712|14016512",
      "code": "sd_storge",
      "t": "1671290542",
      "value": "15540224|1523712|14016512"
    }
  ]
}
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290540413
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = 73636bb8-1f66-48e5-adbe-d0683514a568, t = 1671290542
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290543062",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "5cbdae6c-2498-497b-b5aa-b8a6505d1a4f",
  "Signature-Headers": "client_id",
  "sign": "18D92DE3C4DBE9A810AB91EAB628B73CB6167AE0AE13702313F125AC04E57BDE",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "ae7d6fb5-d17b-4ed2-9ca2-833f74ebe2c3",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "150": true,
      "code": "record_switch",
      "t": "1671290542",
      "value": true
    }
  ]
}
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290540413
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = ae7d6fb5-d17b-4ed2-9ca2-833f74ebe2c3, t = 1671290542
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290543094",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "bf8d6d2f-dc40-458d-9f56-f21045c0b719",
  "Signature-Headers": "client_id",
  "sign": "51D6929AB35C598EA9467DD9B0BBB8914C7056F83C5BA9E1917E53D9E8B7F712",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "6d22c4eb-296f-4b4a-bcfc-eee5716361ef",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "110": 1,
      "code": "sd_status",
      "t": "1671290542",
      "value": 1
    }
  ]
}
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290540413
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = 6d22c4eb-296f-4b4a-bcfc-eee5716361ef, t = 1671290542
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290543129",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "a03879f7-6655-4eb7-bf8a-ccb1bf910843",
  "Signature-Headers": "client_id",
  "sign": "7601ECABDEBBAC3DC658ED3BD8D599ABECA02D3D6AEA75AF2EC8EDCC32DBE662",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "b9081948-b84d-4d58-8d36-e596d2e88be9",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "151": "2",
      "code": "record_mode",
      "t": "1671290542",
      "value": "2"
    }
  ]
}
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order.
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = undefined, t = 1671290540413
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = b9081948-b84d-4d58-8d36-e596d2e88be9, t = 1671290542
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
[17/12/2022, 12:22:23] [TuyaPlatform] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaus.com
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
query = undefined
headers = {
  "t": "1671290543159",
  "client_id": "dr98r5um9jeasjp378wc",
  "nonce": "b48045ba-112d-46f3-a0d5-67901f0adbe0",
  "Signature-Headers": "client_id",
  "sign": "8123A97C3888A78C0AB5775030D71052A44098416B1E983FA8CC0D2837B23054",
  "sign_method": "HMAC-SHA256",
  "access_token": "148ecfdb0102da37098adc44a16d5e6e",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.9"
}
body = null
[17/12/2022, 12:22:24] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 20
message = {
  "bizCode": "online",
  "bizData": {
    "time": 1671290543
  },
  "devId": "07010311ecfabc66bfc9",
  "productKey": "cweu5xn5kod6piyo",
  "ts": 0
}
[17/12/2022, 12:22:24] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290543972,
  "tid": "9b66cce37e1e11ed8864c6843b9bc2ab"
}
[17/12/2022, 12:22:24] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290543997,
  "tid": "9b6a1d5b7e1e11ed87ecb6f336d87174"
}
[17/12/2022, 12:22:24] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290544032,
  "tid": "9b6f80037e1e11ed8b31260268243644"
}
[17/12/2022, 12:22:24] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290544073,
  "tid": "9b7619797e1e11ed8864c6843b9bc2ab"
}
[17/12/2022, 12:22:24] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/devices/eb5cf3d97be677ad8feh9u/status
data = {
  "code": 1010,
  "msg": "token invalid",
  "success": false,
  "t": 1671290544088,
  "tid": "9b785d917e1e11ed87ecb6f336d87174"
}
[17/12/2022, 12:22:36] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "ee85f3b4-b3f3-44f2-ae2d-0517f6b20e98",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "185": "eyJ2IjoiMy4wIiwiYnVja2V0IjoidHktdXMtc3RvcmFnZTMwLXBpYyIsImNtZCI6ImlwY19kb29yYmVsbCIsInR5cGUiOiJpbWFnZSIsIndpdGgiOiJyZXNvdXJjZXMiLCJmaWxlcyI6W1siL2Y1YTk1MS03MDUwMzIyMi1oc2xqYWRhM2M0ZjIxMDc1NTJmZC9kZXRlY3QvMTY3MTI5MDU0MS5qcGVnIiwiZWIwZGQ1ZmY1ZTE3YzE4MyJdXX0=",
      "code": "alarm_message",
      "t": "1671290556",
      "value": "eyJ2IjoiMy4wIiwiZmlsZXMiOlt7ImRhdGEiOiJlZTlmNTVlZTI1ODBmYzdkY2UwZDJlNDcyMTA4MTM1Nzk3NDZkM2M5N2Q4NDY5MGViMzRmNDBhYWYxNDA1ZWY1OTNjMjlhNDk4N2FkMWY3YTU5N2Q1NzI2NDBkNGQyNWEyZjE3MjI2NmE4MTlhNzNiOTNhZGE0NWU0ZTQ0MGZiYjE4YjhkZTg1ODI0Yjc0Y2VmNzhlODMzMGNjMzMwZWZhMDg4MzQ0YmRkNDVlN2RiZmZkZDcxYWQzNGRiNmZmM2IyMzk0M2U1YTIyOTgyZTA3YTEzYTc1ZTc4NmU5NzkwMiIsImtleUlkIjoiZGVmYXVsdCIsIml2IjoiYjYyYzA1ODgzYWYzYjMxODExZGUxMGY4YTdiMDMyZTQifV0sImNtZCI6ImlwY19kb29yYmVsbCIsInR5cGUiOiJpbWFnZSJ9"
    }
  ]
}
[17/12/2022, 12:22:36] [TuyaPlatform] [Video Campainha AGL ] Unknown ProgrammableSwitchEvent status: {
  '185': 'eyJ2IjoiMy4wIiwiYnVja2V0IjoidHktdXMtc3RvcmFnZTMwLXBpYyIsImNtZCI6ImlwY19kb29yYmVsbCIsInR5cGUiOiJpbWFnZSIsIndpdGgiOiJyZXNvdXJjZXMiLCJmaWxlcyI6W1siL2Y1YTk1MS03MDUwMzIyMi1oc2xqYWRhM2M0ZjIxMDc1NTJmZC9kZXRlY3QvMTY3MTI5MDU0MS5qcGVnIiwiZWIwZGQ1ZmY1ZTE3YzE4MyJdXX0=',
  code: 'alarm_message',
  t: '1671290556',
  value: 'eyJ2IjoiMy4wIiwiZmlsZXMiOlt7ImRhdGEiOiJlZTlmNTVlZTI1ODBmYzdkY2UwZDJlNDcyMTA4MTM1Nzk3NDZkM2M5N2Q4NDY5MGViMzRmNDBhYWYxNDA1ZWY1OTNjMjlhNDk4N2FkMWY3YTU5N2Q1NzI2NDBkNGQyNWEyZjE3MjI2NmE4MTlhNzNiOTNhZGE0NWU0ZTQ0MGZiYjE4YjhkZTg1ODI0Yjc0Y2VmNzhlODMzMGNjMzMwZWZhMDg4MzQ0YmRkNDVlN2RiZmZkZDcxYWQzNGRiNmZmM2IyMzk0M2U1YTIyOTgyZTA3YTEzYTc1ZTc4NmU5NzkwMiIsImtleUlkIjoiZGVmYXVsdCIsIml2IjoiYjYyYzA1ODgzYWYzYjMxODExZGUxMGY4YTdiMDMyZTQifV0sImNtZCI6ImlwY19kb29yYmVsbCIsInR5cGUiOiJpbWFnZSJ9'
}
[17/12/2022, 12:22:36] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "d3b8ee96-e30a-4947-8357-dcefd57633f0",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "149": false,
      "code": "wireless_awake",
      "t": "1671290556",
      "value": false
    }
  ]
}
[17/12/2022, 12:22:38] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 20
message = {
  "bizCode": "online",
  "bizData": {
    "time": 1671290558
  },
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "ts": 0
}
[17/12/2022, 12:22:45] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 20
message = {
  "bizCode": "online",
  "bizData": {
    "time": 1671290565
  },
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "ts": 0
}
sadanro100 commented 1 year ago

Perhaps I should mention my doorbell model

image

and the fact that Tuya app doesn't expose the press of the button as a trigger in scenes, unlike other doorbell models apparently do (even though Tuya skill for Alexa does provide a trigger for the button in Alexa routines):

IMG_2164

IMG_2163

0x5e commented 1 year ago

@sadanro100 @Thijsjuh92 please try beta.10.

sadanro100 commented 1 year ago

@0x5e still no joy unfortunately... logs:

[17/12/2022, 15:25:57] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 20
message = {
  "bizCode": "online",
  "bizData": {
    "time": 1671301557
  },
  "devId": "07010311ecfabc66bfc9",
  "productKey": "cweu5xn5kod6piyo",
  "ts": 0
}
t = 1671301557
[17/12/2022, 15:26:01] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 20
message = {
  "bizCode": "online",
  "bizData": {
    "time": 1671301561
  },
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "ts": 0
}
t = 1671301561
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "56607ec6-d5b0-4823-90de-60bf30b543c9",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "101": true,
      "code": "basic_indicator",
      "t": "1671301561",
      "value": true
    }
  ]
}
t = 1671301561
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "498c9b5f-bb82-4791-a68c-e0e9a2ec7d07",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "103": false,
      "code": "basic_flip",
      "t": "1671301561",
      "value": false
    }
  ]
}
t = 1671301561
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "ddaba5cb-480d-427c-b6b4-cf4135f894d9",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "104": true,
      "code": "basic_osd",
      "t": "1671301561",
      "value": true
    }
  ]
}
t = 1671301561
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "d03fb78f-0f93-4b0d-a57b-daf86dcd79a2",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "168": true,
      "code": "motion_area_switch",
      "t": "1671301561",
      "value": true
    }
  ]
}
t = 1671301561
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "713b604f-80a2-434e-ab02-180281d13476",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "108": "0",
      "code": "basic_nightvision",
      "t": "1671301561",
      "value": "0"
    }
  ]
}
t = 1671301561
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "5d363df5-394c-4de1-a5fe-01ec5c07ba29",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "152": "1",
      "code": "pir_switch",
      "t": "1671301561",
      "value": "1"
    }
  ]
}
t = 1671301561
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "313c4ef7-93ef-4d80-bd6d-692138fcf00c",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "169": "",
      "code": "motion_area",
      "t": "1671301561",
      "value": ""
    }
  ]
}
t = 1671301561
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "ef3e7f48-e4aa-47b2-a3d1-c6f82e3534de",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "145": 59,
      "code": "wireless_electricity",
      "t": "1671301561",
      "value": 59
    }
  ]
}
t = 1671301561
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "f2034115-397b-4d2e-b1ce-18dde3eccf0e",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "146": "0",
      "code": "wireless_powermode",
      "t": "1671301561",
      "value": "0"
    }
  ]
}
t = 1671301561
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "5c4fbb7c-c573-4e68-a3d5-f3bfcbdade2d",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "149": true,
      "code": "wireless_awake",
      "t": "1671301561",
      "value": true
    }
  ]
}
t = 1671301561
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 20
message = {
  "bizCode": "event_notify",
  "bizData": {
    "devId": "eb5cf3d97be677ad8feh9u",
    "edata": "edbc67071671301561",
    "etype": "ac_doorbell"
  },
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "ts": 1671301562632,
  "uuid": "hsljada3c4f2107552fd"
}
t = 1671301562632
[17/12/2022, 15:26:02] [TuyaPlatform] [TuyaDeviceManager] Unhandled mqtt message: bizCode = event_notify, bizData = {
  devId: 'eb5cf3d97be677ad8feh9u',
  edata: 'edbc67071671301561',
  etype: 'ac_doorbell'
}
[17/12/2022, 15:26:03] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "683017fc-4426-42f2-a510-1bb0554a9956",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "110": 1,
      "code": "sd_status",
      "t": "1671301562",
      "value": 1
    }
  ]
}
t = 1671301562
[17/12/2022, 15:26:03] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "1027d293-aa72-4810-a205-abd6fba3a537",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "109": "15540224|1531904|14008320",
      "code": "sd_storge",
      "t": "1671301562",
      "value": "15540224|1531904|14008320"
    }
  ]
}
t = 1671301562
[17/12/2022, 15:26:03] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "79b37399-be4a-4e21-976c-462c8aff1865",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "150": true,
      "code": "record_switch",
      "t": "1671301562",
      "value": true
    }
  ]
}
t = 1671301562
[17/12/2022, 15:26:03] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "5b6f6c2f-9cd3-4f4e-b73a-2c196551fda0",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "110": 1,
      "code": "sd_status",
      "t": "1671301562",
      "value": 1
    }
  ]
}
t = 1671301562
[17/12/2022, 15:26:03] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "ae2c94f6-ecb4-449e-94c5-d7c51b1dbc02",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "151": "2",
      "code": "record_mode",
      "t": "1671301562",
      "value": "2"
    }
  ]
}
t = 1671301562
[17/12/2022, 15:26:13] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "0346e4d5-18e3-47f5-b0e8-20c71a9e3906",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "185": "eyJ2IjoiMy4wIiwiYnVja2V0IjoidHktdXMtc3RvcmFnZTMwLXBpYyIsImNtZCI6ImlwY19kb29yYmVsbCIsInR5cGUiOiJpbWFnZSIsIndpdGgiOiJyZXNvdXJjZXMiLCJmaWxlcyI6W1siL2Y1YTk1MS03MDUwMzIyMi1oc2xqYWRhM2M0ZjIxMDc1NTJmZC9kZXRlY3QvMTY3MTMwMTU2My5qcGVnIiwiYWQ3YjE1MzYwOGJkZjA2MyJdXX0=",
      "code": "alarm_message",
      "t": "1671301573",
      "value": "eyJ2IjoiMy4wIiwiZmlsZXMiOlt7ImRhdGEiOiIwMWEzZjcwYTFjOWEwZTg2YzBjMWFmZjI5YzI4ZWE1YmNiZmU1ZjQ5MTJlNTM2ZDczOTBkMmYzOWZkZTZiMjMwZTA3NTNhNDQ2NWFiZmFmM2MwNDc3Y2Y4OWM2ZmMxNGI4M2ZmOGVmYjI4MDBiNGQ5MjgxMDUzMWNmOTNkZThlNDNkM2Q3MDhjOTQ3ZDU3OGU0ZjQyN2FlNzhkN2Q0NTU5NmQ3NTFiMzUyMmE3NmIyMWI4NTFhNzczMDFjYTllNjRjNGNjYzI0ZDljZTVlN2I4MWFiNTAxMzdjMjliNTY2MyIsImtleUlkIjoiZGVmYXVsdCIsIml2IjoiYmZjNWUzMTIwMmNlODBlYTkwNTczMGQzYmQzMDY5OWMifV0sImNtZCI6ImlwY19kb29yYmVsbCIsInR5cGUiOiJpbWFnZSJ9"
    }
  ]
}
t = 1671301573
[17/12/2022, 15:26:13] [TuyaPlatform] [Video Campainha AGL ] Doorbell picture: {"v":"3.0","files":[{"data":"01a3f70a1c9a0e86c0c1aff29c28ea5bcbfe5f4912e536d7390d2f39fde6b230e0753a4465abfaf3c0477cf89c6fc14b83ff8efb2800b4d92810531cf93de8e43d3d708c947d578e4f427ae78d7d45596d751b3522a76b21b851a77301ca9e64c4ccc24d9ce5e7b81ab50137c29b5663","keyId":"default","iv":"bfc5e31202ce80ea905730d3bd30699c"}],"cmd":"ipc_doorbell","type":"image"}
[17/12/2022, 15:26:13] [TuyaPlatform] [Video Campainha AGL ] Unknown ProgrammableSwitchEvent status: {
  '185': 'eyJ2IjoiMy4wIiwiYnVja2V0IjoidHktdXMtc3RvcmFnZTMwLXBpYyIsImNtZCI6ImlwY19kb29yYmVsbCIsInR5cGUiOiJpbWFnZSIsIndpdGgiOiJyZXNvdXJjZXMiLCJmaWxlcyI6W1siL2Y1YTk1MS03MDUwMzIyMi1oc2xqYWRhM2M0ZjIxMDc1NTJmZC9kZXRlY3QvMTY3MTMwMTU2My5qcGVnIiwiYWQ3YjE1MzYwOGJkZjA2MyJdXX0=',
  code: 'alarm_message',
  t: '1671301573',
  value: 'eyJ2IjoiMy4wIiwiZmlsZXMiOlt7ImRhdGEiOiIwMWEzZjcwYTFjOWEwZTg2YzBjMWFmZjI5YzI4ZWE1YmNiZmU1ZjQ5MTJlNTM2ZDczOTBkMmYzOWZkZTZiMjMwZTA3NTNhNDQ2NWFiZmFmM2MwNDc3Y2Y4OWM2ZmMxNGI4M2ZmOGVmYjI4MDBiNGQ5MjgxMDUzMWNmOTNkZThlNDNkM2Q3MDhjOTQ3ZDU3OGU0ZjQyN2FlNzhkN2Q0NTU5NmQ3NTFiMzUyMmE3NmIyMWI4NTFhNzczMDFjYTllNjRjNGNjYzI0ZDljZTVlN2I4MWFiNTAxMzdjMjliNTY2MyIsImtleUlkIjoiZGVmYXVsdCIsIml2IjoiYmZjNWUzMTIwMmNlODBlYTkwNTczMGQzYmQzMDY5OWMifV0sImNtZCI6ImlwY19kb29yYmVsbCIsInR5cGUiOiJpbWFnZSJ9'
}
[17/12/2022, 15:26:18] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 4
message = {
  "dataId": "b3d7d71d-a4a9-4d3e-b3c1-e85f17d5e31b",
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "status": [
    {
      "149": false,
      "code": "wireless_awake",
      "t": "1671301577",
      "value": false
    }
  ]
}
t = 1671301577
[17/12/2022, 15:26:18] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/0bae77cae096a6758163ef02a3cbf1af
protocol = 20
message = {
  "bizCode": "online",
  "bizData": {
    "time": 1671301578
  },
  "devId": "eb5cf3d97be677ad8feh9u",
  "productKey": "ybrhmoymnvtdnwie",
  "ts": 0
}
t = 1671301578
ErrorErrorError commented 1 year ago

@sadanro100

Try resetting your HomeBridge and Tuya plugin and see if that fixes your issue.

sadanro100 commented 1 year ago

Do you mean this resetting? I don't feel particularly fond of having to redo all of my setup.

image

sadanro100 commented 1 year ago

I've just reinstalled the plugin (made sure to remove the directory node-modules/0x5e) and restarted homebridge to no avail.

0x5e commented 1 year ago

It's much closing now... From this log:

[17/12/2022, 15:26:13] [TuyaPlatform] [Video Campainha AGL ] Doorbell picture: {"v":"3.0","files":[{"data":"01a3f70a1c9a0e86c0c1aff29c28ea5bcbfe5f4912e536d7390d2f39fde6b230e0753a4465abfaf3c0477cf89c6fc14b83ff8efb2800b4d92810531cf93de8e43d3d708c947d578e4f427ae78d7d45596d751b3522a76b21b851a77301ca9e64c4ccc24d9ce5e7b81ab50137c29b5663","keyId":"default","iv":"bfc5e31202ce80ea905730d3bd30699c"}],"cmd":"ipc_doorbell","type":"image"}
[17/12/2022, 15:26:13] [TuyaPlatform] [Video Campainha AGL ] Unknown ProgrammableSwitchEvent status: {
  '185': 'eyJ2IjoiMy4wIiwiYnVja2V0IjoidHktdXMtc3RvcmFnZTMwLXBpYyIsImNtZCI6ImlwY19kb29yYmVsbCIsInR5cGUiOiJpbWFnZSIsIndpdGgiOiJyZXNvdXJjZXMiLCJmaWxlcyI6W1siL2Y1YTk1MS03MDUwMzIyMi1oc2xqYWRhM2M0ZjIxMDc1NTJmZC9kZXRlY3QvMTY3MTMwMTU2My5qcGVnIiwiYWQ3YjE1MzYwOGJkZjA2MyJdXX0=',
  code: 'alarm_message',
  t: '1671301573',
  value: 'eyJ2IjoiMy4wIiwiZmlsZXMiOlt7ImRhdGEiOiIwMWEzZjcwYTFjOWEwZTg2YzBjMWFmZjI5YzI4ZWE1YmNiZmU1ZjQ5MTJlNTM2ZDczOTBkMmYzOWZkZTZiMjMwZTA3NTNhNDQ2NWFiZmFmM2MwNDc3Y2Y4OWM2ZmMxNGI4M2ZmOGVmYjI4MDBiNGQ5MjgxMDUzMWNmOTNkZThlNDNkM2Q3MDhjOTQ3ZDU3OGU0ZjQyN2FlNzhkN2Q0NTU5NmQ3NTFiMzUyMmE3NmIyMWI4NTFhNzczMDFjYTllNjRjNGNjYzI0ZDljZTVlN2I4MWFiNTAxMzdjMjliNTY2MyIsImtleUlkIjoiZGVmYXVsdCIsIml2IjoiYmZjNWUzMTIwMmNlODBlYTkwNTczMGQzYmQzMDY5OWMifV0sImNtZCI6ImlwY19kb29yYmVsbCIsInR5cGUiOiJpbWFnZSJ9'
}

It already goes to: https://github.com/0x5e/homebridge-tuya-platform/blob/b5bb28fea83bfb83d572ab2b81b66bb4cd23d328/src/accessory/characteristic/ProgrammableSwitchEvent.ts#L43-L44

But still output Unknown ProgrammableSwitchEvent status... https://github.com/0x5e/homebridge-tuya-platform/blob/b5bb28fea83bfb83d572ab2b81b66bb4cd23d328/src/accessory/characteristic/ProgrammableSwitchEvent.ts#L55-L58

Actually SINGLE_PRESS is 0, should we change the conditions to if (value !== undefined)? @ErrorErrorError

ErrorErrorError commented 1 year ago

Oof, yeah we need to change that to not equals to undefined

0x5e commented 1 year ago

@sadanro100 beta.11 released, please have a try, this time should be okay, thanks for the testing 😄

sadanro100 commented 1 year ago

It worked! Kind of at least..

Fist attempt seemed to fail, but the second time I pressed the button to collect the logs, the notification came through.

I'll restart homebridge and test it again to see how it goes.

sadanro100 commented 1 year ago

It now worked perfectly first attempt! Thank you ever so much for the effort guys! I might need help with tuya door contact sensor apparently not being supported ([TuyaPlatform] Unsupported device: Porta Sala) and incorrect window cover status being reported by the plugin when controlling motors from the Tuya Alexa Skill, but I'll look for related posts to bother you there. Thank you again! This makes owning Tuya devices so much more pleasant now.

sadanro100 commented 1 year ago

Just another thing, I remember seeing another attempt to deliver doorbell notifications with camera preview in the past, for EZVIZ doorbells if I'm not mistaken. I recall they had a bug report regarding the notification delivered on Apple TVs, they did come through, but with no camera snapshot, so I thought of testing it. It seems like it also happens with this plugin.

IMG_2169

0x5e commented 1 year ago

@sadanro100 Thanks for testing too, welcome to create new issues, this issue is too long, I'm gonna closing later...

@Thijsjuh92 @hotbird1970 if still not working, please reply.

And floodlight is also supported, but @hotbird1970 your device's light schema didn't show up, which means you need to change the control mode to "DP Instruction", and do some advanced configs, the detail can be found in the latest readme - faq/troubleshooting.

0x5e commented 1 year ago

@sadanro100 I didn't see your last reply... let's create a new issue instead.

Thijsjuh92 commented 1 year ago

@0x5e @ErrorErrorError It seems all working now. Great work and thank you for all the efforts till now!

I will test in the upcoming days and will revert (in a new threat) my findings and maybe possibilities for fine tuning updates.

Have a great day, speak to you soon.

sadanro100 commented 1 year ago

Hi, just for the record, I just had my doorbell pressed by a visitor now, absolutely nothing came through in the logs, no homekit notification, but tuya app did receive the notification. Pressed it again, same behaviour.

Reset homebridge, tried once more, it worked. Seems rather unreliable atm.

ErrorErrorError commented 1 year ago

Hi, just for the record, I just had my doorbell pressed by a visitor now, absolutely nothing came through in the logs, no homekit notification, but tuya app did receive the notification. Pressed it again, same behaviour.

Reset homebridge, tried once more, it worked. Seems rather unreliable atm.

Well, it is a beta. You should make a new issue request since this thread is quite long.

costingheonea commented 1 year ago

Hello! I have a Tuya doorbell, Hello by Homeflow, that is showing in Homekit, but I can't see the live stream and the screen capture when someone rings. The chime is working on my 2 homepods mini and also I get a notification in Homekit when someone rings. When I try to see the live feed, I get this in Homebridge:

[08/04/2023, 22:39:30] [@0x5e/homebridge-tuya-platform] [Hello by Homeflow] rtsps://bf0911f0d22cdb1680mjzy:H0JO2D11P2CO5EE0@aws-tractor1.tuyaeu.com:443/v1/proxy/echo_show/13401d84f1d542b2a1dafe7a74631da2445e6dbd4d3e7009: Invalid data found when processing input Hello by Homeflow Homebridge [08/04/2023, 22:39:32] [@0x5e/homebridge-tuya-platform] [Hello by Homeflow] FFmpeg exited with code: 1 and signal: null (Error) Hello by Homeflow

Can you help me?

0x5e commented 1 year ago

Hello! I have a Tuya doorbell, Hello by Homeflow, that is showing in Homekit, but I can't see the live stream and the screen capture when someone rings. The chime is working on my 2 homepods mini and also I get a notification in Homekit when someone rings. When I try to see the live feed, I get this in Homebridge:

[08/04/2023, 22:39:30] [@0x5e/homebridge-tuya-platform] [Hello by Homeflow] rtsps://bf0911f0d22cdb1680mjzy:H0JO2D11P2CO5EE0@aws-tractor1.tuyaeu.com:443/v1/proxy/echo_show/13401d84f1d542b2a1dafe7a74631da2445e6dbd4d3e7009: Invalid data found when processing input Hello by Homeflow Homebridge [08/04/2023, 22:39:32] [@0x5e/homebridge-tuya-platform] [Hello by Homeflow] FFmpeg exited with code: 1 and signal: null (Error) Hello by Homeflow

Can you help me?

Same with #240 #255

costingheonea commented 1 year ago

Hello! I have a Tuya doorbell, Hello by Homeflow, that is showing in Homekit, but I can't see the live stream and the screen capture when someone rings. The chime is working on my 2 homepods mini and also I get a notification in Homekit when someone rings. When I try to see the live feed, I get this in Homebridge: [08/04/2023, 22:39:30] [@0x5e/homebridge-tuya-platform] [Hello by Homeflow] rtsps://bf0911f0d22cdb1680mjzy:H0JO2D11P2CO5EE0@aws-tractor1.tuyaeu.com:443/v1/proxy/echo_show/13401d84f1d542b2a1dafe7a74631da2445e6dbd4d3e7009: Invalid data found when processing input Hello by Homeflow Homebridge [08/04/2023, 22:39:32] [@0x5e/homebridge-tuya-platform] [Hello by Homeflow] FFmpeg exited with code: 1 and signal: null (Error) Hello by Homeflow Can you help me?

Same with #240 #255

So there is no solution to make this work?

0x5e commented 1 year ago

@costingheonea Yes, I don't know how to fix this :( the firmware upgrade works on me, if you have the newer firmware notification, have a try.