Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Light and Doorbell #68

Open
fratton opened this issue Nov 29, 2023 · 10 comments
Open

Error Light and Doorbell #68

fratton opened this issue Nov 29, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@fratton
Copy link
Contributor

fratton commented Nov 29, 2023

Thanks you for your job.

I have an errors in log with 2 devices.

Doorbell:

2023-11-29 17:59:31.126 TinyTUYA: Device name=Visiophone id=xxxxxxxxxx46f2tuk4 category=doorbell
2023-11-29 17:59:31.271 Error: TinyTUYA: Device read failed: xxxxxxxxxx46f2tuk4 
2023-11-29 17:59:35.057 Error: TinyTUYA: handleThread: Device not found in Domoticz! Device is removed or Accept New Hardware not enabled?
{
    "name": "Visiophone",
    "id": "xxxxxxxxxx",
    "key": "Deleted",
    "mac": "xx:xx:xx:xx:xx:xx",
    "uuid": "xxxxxxxxxx",
    "category": "sp",
    "product_name": "Wifi video doorbell",
    "product_id": "xxxxxxxxxx",
    "biz_type": 0,
    "model": "",
    "sub": false,
    "icon": "https://images.tuyaeu.com/smart/icon/ay1541056239985fDGjj/01360e7cf7e030a03621c689ea1bf593.png"
  },
Properties of device: xxxxxxxxxx
{
  "result": {
    "category": "sp",
    "functions": [
      {
        "code": "basic_indicator",
        "desc": "{}",
        "name": "\u72b6\u6001\u6307\u793a\u706f",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "basic_flip",
        "desc": "{}",
        "name": "\u53cd\u9762\u7ffb\u8f6c",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "basic_osd",
        "desc": "{}",
        "name": "\u65f6\u95f4\u6c34\u5370",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "motion_sensitivity",
        "desc": "{\"range\":[\"0\",\"1\",\"2\"]}",
        "name": "\u79fb\u52a8\u4fa6\u6d4b\u7075\u654f\u5ea6",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\"]}"
      },
      {
        "code": "basic_nightvision",
        "desc": "{\"range\":[\"0\",\"1\",\"2\"]}",
        "name": "\u7ea2\u5916\u591c\u89c6",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\"]}"
      },
      {
        "code": "sd_format",
        "desc": "{}",
        "name": "\u5b58\u50a8\u5361\u683c\u5f0f\u5316",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "motion_switch",
        "desc": "{}",
        "name": "\u79fb\u52a8\u62a5\u8b66\u5f00\u5173",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "record_switch",
        "desc": "{}",
        "name": "SD\u5361\u5f55\u50cf\u5f00\u5173",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "record_mode",
        "desc": "{\"range\":[\"1\",\"2\"]}",
        "name": "\u5f55\u50cf\u6a21\u5f0f",
        "type": "Enum",
        "values": "{\"range\":[\"1\",\"2\"]}"
      },
      {
        "code": "basic_device_volume",
        "desc": "{\"min\":1,\"max\":10,\"scale\":0,\"step\":1}",
        "name": "\u97f3\u91cf\u63a7\u5236",
        "type": "Integer",
        "values": "{\"min\":1,\"max\":10,\"scale\":0,\"step\":1}"
      }
    ],
    "status": [
      {
        "code": "basic_indicator",
        "name": "\u72b6\u6001\u6307\u793a\u706f",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "basic_flip",
        "name": "\u53cd\u9762\u7ffb\u8f6c",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "basic_osd",
        "name": "\u65f6\u95f4\u6c34\u5370",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "motion_sensitivity",
        "name": "\u79fb\u52a8\u4fa6\u6d4b\u7075\u654f\u5ea6",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\"]}"
      },
      {
        "code": "basic_nightvision",
        "name": "\u7ea2\u5916\u591c\u89c6",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\"]}"
      },
      {
        "code": "sd_storge",
        "name": "\u83b7\u53d6\u5b58\u50a8\u5361\u5bb9\u91cf",
        "type": "String",
        "values": "{\"maxlen\":255}"
      },
      {
        "code": "sd_status",
        "name": "\u5b58\u50a8\u5361\u72b6\u6001",
        "type": "Integer",
        "values": "{\"unit\":\"\",\"min\":1,\"max\":5,\"scale\":1,\"step\":1}"
      },
      {
        "code": "sd_format",
        "name": "\u5b58\u50a8\u5361\u683c\u5f0f\u5316",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "movement_detect_pic",
        "name": "\u79fb\u52a8\u68c0\u6d4b",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "sd_format_state",
        "name": "\u683c\u5f0f\u5316\u72b6\u6001",
        "type": "Integer",
        "values": "{\"unit\":\"\",\"min\":-20000,\"max\":20000,\"scale\":1,\"step\":1}"
      },
      {
        "code": "motion_switch",
        "name": "\u79fb\u52a8\u62a5\u8b66\u5f00\u5173",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "doorbell_active",
        "name": "\u95e8\u94c3-\u547c\u53eb",
        "type": "String",
        "values": "{\"maxlen\":255}"
      },
      {
        "code": "record_switch",
        "name": "SD\u5361\u5f55\u50cf\u5f00\u5173",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "record_mode",
        "name": "\u5f55\u50cf\u6a21\u5f0f",
        "type": "Enum",
        "values": "{\"range\":[\"1\",\"2\"]}"
      },
      {
        "code": "doorbell_pic",
        "name": "\u95e8\u94c3\u56fe\u7247",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "basic_device_volume",
        "name": "\u97f3\u91cf\u63a7\u5236",
        "type": "Integer",
        "values": "{\"min\":1,\"max\":10,\"scale\":0,\"step\":1}"
      }
    ]
  },
  "success": true,
  "t": xxxxxxxxxx,
  "tid": "xxxxxxxxxx"
}
Status of device: xxxxxxxxxx
{
  "result": [
    {
      "code": "basic_indicator",
      "value": true
    },
    {
      "code": "basic_flip",
      "value": false
    },
    {
      "code": "basic_osd",
      "value": true
    },
    {
      "code": "motion_sensitivity",
      "value": "1"
    },
    {
      "code": "basic_nightvision",
      "value": "0"
    },
    {
      "code": "sd_storge",
      "value": "14757|14150|607"
    },
    {
      "code": "sd_status",
      "value": 1
    },
    {
      "code": "sd_format",
      "value": false
    },
    {
      "code": "movement_detect_pic",
      "value": "$"
    },
    {
      "code": "sd_format_state",
      "value": -20000
    },
    {
      "code": "motion_switch",
      "value": false
    },
    {
      "code": "doorbell_active",
      "value": ""
    },
    {
      "code": "record_switch",
      "value": true
    },
    {
      "code": "record_mode",
      "value": "1"
    },
    {
      "code": "doorbell_pic",
      "value": ""
    },
    {
      "code": "basic_device_volume",
      "value": 10
    }
  ],
  "success": true,
  "t": xxxxxxxxxx,
  "tid": "xxxxxxxxxx"
}

Light :

2023-11-29 18:01:50.008 TinyTUYA: Device name=Lampadaire id=xxxxxxxxxxcategory=light
2023-11-29 18:01:51.125 TinyTUYA: Update device value: xxxxxxxxxxUnit: 1 sValue: 100 nValue: 1 TimedOut=0
2023-11-29 18:01:51.126 TinyTUYA: handleThread: unexpected EOF while parsing (<unknown>, line 0) line 1365
2023-11-29 18:01:51.126 Error: TinyTUYA: Device read failed: xxxxxxxxxx
  {
    "name": "Lampadaire",
    "id": "xxxxxxxxxx",
    "key": "Deleted",
    "mac": "xx:xx:xx:xx:xx:xx",
    "uuid": "xxxxxxxxxx",
    "category": "dj",
    "product_name": "Smart Bulb",
    "product_id": "xxxxxxxxxx",
    "biz_type": 0,
    "model": "",
    "sub": false,
    "icon": "https://images.tuyaeu.com/smart/product_icon/dj.png"
  },
Properties of device: xxxxxxxxxx
{
  "result": {
    "category": "dj",
    "functions": [
      {
        "code": "switch_led",
        "desc": "{}",
        "name": "\u5f00\u5173",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "bright_value",
        "desc": "{\"min\":25,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}",
        "name": "\u4eae\u5ea6",
        "type": "Integer",
        "values": "{\"min\":25,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"
      },
      {
        "code": "work_mode",
        "desc": "{\"range\":[\"white\",\"colour\"]}",
        "name": "\u5de5\u4f5c\u6a21\u5f0f",
        "type": "Enum",
        "values": "{\"range\":[\"white\",\"colour\"]}"
      },
      {
        "code": "temp_value",
        "desc": "{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}",
        "name": "\u8272\u6e29",
        "type": "Integer",
        "values": "{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"
      },
      {
        "code": "colour_data",
        "desc": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}",
        "name": "\u5f69\u5149\u6a21\u5f0f\u6570",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      },
      {
        "code": "scene_data",
        "desc": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}",
        "name": "\u60c5\u666f\u6a21\u5f0f\u6570",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      },
      {
        "code": "flash_scene_1",
        "desc": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}",
        "name": "\u67d4\u5149\u6a21\u5f0f",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      },
      {
        "code": "flash_scene_2",
        "desc": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}",
        "name": "\u7f24\u7eb7\u6a21\u5f0f",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      },
      {
        "code": "flash_scene_3",
        "desc": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}",
        "name": "\u70ab\u5f69\u6a21\u5f0f",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      },
      {
        "code": "flash_scene_4",
        "desc": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}",
        "name": "\u6591\u6593\u6a21\u5f0f",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      }
    ],
    "status": [
      {
        "code": "switch_led",
        "name": "\u5f00\u5173",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "work_mode",
        "name": "\u5de5\u4f5c\u6a21\u5f0f",
        "type": "Enum",
        "values": "{\"range\":[\"white\",\"colour\"]}"
      },
      {
        "code": "bright_value",
        "name": "\u4eae\u5ea6\u503c",
        "type": "Integer",
        "values": "{\"min\":25,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"
      },
      {
        "code": "colour_data",
        "name": "\u5f69\u5149\u6a21\u5f0f\u6570",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      },
      {
        "code": "scene_data",
        "name": "\u60c5\u666f\u6a21\u5f0f\u6570",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      },
      {
        "code": "flash_scene_1",
        "name": "\u67d4\u5149\u6a21\u5f0f",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      },
      {
        "code": "flash_scene_2",
        "name": "\u7f24\u7eb7\u6a21\u5f0f",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      },
      {
        "code": "flash_scene_3",
        "name": "\u70ab\u5f69\u6a21\u5f0f",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      },
      {
        "code": "flash_scene_4",
        "name": "\u6591\u6593\u6a21\u5f0f",
        "type": "Json",
        "values": "{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
      },
      {
        "code": "temp_value",
        "name": "\u51b7\u6696\u503c",
        "type": "Integer",
        "values": "{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"
      }
    ]
  },
  "success": true,
  "t": xxxxxxxxxx,
  "tid": "xxxxxxxxxx"
}
Status of device: xxxxxxxxxx
{
  "result": [
    {
      "code": "switch_led",
      "value": true
    },
    {
      "code": "work_mode",
      "value": "white"
    },
    {
      "code": "bright_value",
      "value": 255
    },
    {
      "code": "temp_value",
      "value": 127
    },
    {
      "code": "colour_data",
      "value": "{\"h\":0.0,\"s\":255.0,\"v\":255.0}"
    },
    {
      "code": "scene_data",
      "value": "{\"h\":0.0,\"s\":0.0,\"v\":0.0}"
    },
    {
      "code": "flash_scene_1",
      "value": "{\"bright\":255,\"frequency\":80,\"hsv\":[{\"h\":120.0,\"s\":255.0,\"v\":255.0}],\"temperature\":255}"
    },
    {
      "code": "flash_scene_2",
      "value": "{\"bright\":255,\"frequency\":128,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0},{\"h\":120.0,\"s\":255.0,\"v\":255.0},{\"h\":240.0,\"s\":255.0,\"v\":255.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0}],\"temperature\":255}"
    },
    {
      "code": "flash_scene_3",
      "value": "{\"bright\":255,\"frequency\":80,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0}],\"temperature\":255}"
    },
    {
      "code": "flash_scene_4",
      "value": "{\"bright\":255,\"frequency\":5,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0},{\"h\":120.0,\"s\":255.0,\"v\":255.0},{\"h\":60.0,\"s\":255.0,\"v\":255.0},{\"h\":300.0,\"s\":255.0,\"v\":255.0},{\"h\":240.0,\"s\":255.0,\"v\":255.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0}],\"temperature\":255}"
    }
  ],
  "success": true,
  "t": xxxxxxxxxx,
  "tid": "xxxxxxxxxx"
}
@Xenomes
Copy link
Owner

Xenomes commented Nov 29, 2023

Thanks for the Jsons, it looks like there are other names used i will check them.

@Xenomes Xenomes added the bug Something isn't working label Nov 29, 2023
@Xenomes
Copy link
Owner

Xenomes commented Dec 3, 2023

Hi, I pushed an update to the master branch to address the light issue. Regarding the doorbell, your device is now generating an output different from the previous JSON code I received.

{
  "code": "doorbell_active",
  "value": ""
},

I will create a dedicated branch with a text device to capture the output when the bell is pressed. We can then use this information to determine what to incorporate into the regular script.

cd ~/domoticz/plugins/Domoticz-TinyTUYA-Plugin
git pull
git checkout Doorbell
sudo systemctl restart domoticz.service

@fratton
Copy link
Contributor Author

fratton commented Dec 4, 2023

ok, I will test as soon as possible

@fratton
Copy link
Contributor Author

fratton commented Dec 10, 2023

I install doorbell branch, but i have an error : Error: TinyTUYA hardware (21) thread seems to have ended unexpectedly

@Xenomes
Copy link
Owner

Xenomes commented Dec 10, 2023

Ha i think you have to delete the old doorbell device.

@Xenomes
Copy link
Owner

Xenomes commented Dec 29, 2023

Hi,
Did you gather any data about the doorbell?

@fratton
Copy link
Contributor Author

fratton commented Dec 29, 2023

Sorry, I forgot

@Xenomes
Copy link
Owner

Xenomes commented Dec 29, 2023

That can happen!

@fratton
Copy link
Contributor Author

fratton commented Feb 6, 2024

Error Doorbell with last 1.7.4

Error: TinyTUYA: Device read failed: bf51c751bbddedxxxxxxxx

Same Dump before

@Xenomes
Copy link
Owner

Xenomes commented Feb 20, 2024

Can you test version 1.7.9, with the debug file it works, if you still got error delete the device and restart the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants