make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.35k stars 522 forks source link

Can't add atorch (AT2PL/GR2P) #2157

Closed BKSnake closed 3 months ago

BKSnake commented 3 months ago

Describe the bug I have problem- i cant add atorch (AT2PL/GR2P). All time tuya-local suggested anther device but not atorch_at2pl_breaker

To Reproduce Try to add atorch (AT2PL/GR2P). My env - RasberryPi 4 , home assistan run under docker container

Expected behavior Clear ability to add atorch (AT2PL/GR2P)

Additional context

    "type": "form",
    "flow_id": "cfad5df6a63dd021a4de2fc31f326c9b",
    "handler": "tuya_local",
    "data_schema": [
        {
            "type": "select",
            "options": [
                [
                    "feit_light_rgb_bulb",
                    "feit_light_rgb_bulb"
                ],
                [
                    "hoenyzy_valve_timer",
                    "hoenyzy_valve_timer"
                ],
                [
                    "inkbird_ibs_m1s",
                    "inkbird_ibs_m1s"
                ],
                [
                    "ir_remote_sensors",
                    "ir_remote_sensors"
                ],
                [
                    "peteme_smart_recessed_lighting",
                    "peteme_smart_recessed_lighting"
                ],
                [
                    "pj1103_clamp_meter",
                    "pj1103_clamp_meter"
                ],
                [
                    "simple_contact_sensor",
                    "simple_contact_sensor"
                ],
                [
                    "simple_switch",
                    "simple_switch"
                ],
                [
                    "simple_switch_timerv2",
                    "simple_switch_timerv2"
                ]
            ],
            "name": "type",
            "required": true,
            "default": "pj1103_clamp_meter"
        }
    ],
    "errors": null,
    "description_placeholders": null,
    "last_step": null,
    "preview": null,
    "step_id": "select_type"
}

Tuya give me corrrect product ID

"model": "AT2PL",
    "name": "Метод Smart Energy Meter(AT2PL/GR2P)",
    "product_id": "seqzqh45b0ggn9so",
    "product_name": "炬为电能宝远控系列(AT2PL)",

Attached scrrenshot - integration Tuya for HA correct understands device

Screenshot 2024-07-26 at 21 17 53
make-all commented 3 months ago

It is impossible to answer why your device is not being detected without the relevant log messages.

You seem to have gone to a lot of trouble to capture json data transmitted between HA and the web browser, but did not look in the log?

BKSnake commented 3 months ago

It is impossible to answer why your device is not being detected without the relevant log messages.

You seem to have gone to a lot of trouble to capture json data transmitted between HA and the web browser, but did not look in the log?

I looked to the Log and didn't find any problems. What I found it's that if try replace secondary_entities or primary_entity from pj1103_clamp_meter to atorch_at2pl_breaker - atorch_at2pl_breaker start detected. I will try find what kind of entity wrong. Also where can is read the general documentation how plugin works. Maybe i need add some debug log to plugin and look how plugin detect.

also why plugin didn't find by pruduct id seqzqh45b0ggn9so?