Z2M can'f find new TuYa devices

Dear HA friends,

My problem:
Since yesterday I am trying to pair this TuYa plug with Z2M without success. Logs dont even show an attempt to interview.

What I have tried so far:

  • I have 5 of these plugs and tested with all of them. Z2M wont find any of them when in pairing mode.
  • I paired and unpaired on IKEA air quality monitor and it worked without flaws.
  • I worked through the Zigbee FAQ on pairing issues (incl. Z2M restart and re-flashing coordinator)
  • Pairing through one of the routers in my network istead of the coordinator.

My hardware:

My Z2M config.yaml:

homeassistant: true
advanced:
  network_key:
    - 109
    - 121
    - 144
    - 49
    - 252
    - 163
    - 109
    - 70
    - 116
    - 39
    - 253
    - 68
    - 21
    - 247
    - 51
    - 115
  pan_id: 34643
  ext_pan_id:
    - 130
    - 194
    - 88
    - 137
    - 94
    - 123
    - 89
    - 100
  homeassistant_legacy_entity_attributes: false
  legacy_api: false
  legacy_availability_payload: false
  log_syslog:
    app_name: Zigbee2MQTT
    eol: /n
    host: localhost
    localhost: localhost
    path: /dev/log
    pid: process.pid
    port: 514
    protocol: udp4
    type: '5424'
  last_seen: ISO_8601_local
  log_level: info
mqtt:
  server: mqtt://core-mosquitto:1883
  user: mqttuser
  password: ****
serial:
  port: >-
    /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231101190152-if00
  adapter: ezsp
frontend:
  port: 8099
device_options:
  legacy: false
devices:
  '0x0cae5ffffeb01178':
    friendly_name: Termostat rechts
  '0xa4c138cb08ef3c7d':
    friendly_name: Steckdose Screen Bar
  '0xa4c138deba68d263':
    friendly_name: Steckdose Licht Couch
  '0x38398ffffe039781':
    friendly_name: Termostat links
  '0x0cae5ffffebc0088':
    friendly_name: Heizung Wohnzimmer klein
  '0x0cae5ffffebba424':
    friendly_name: Heizung Wohnzimmer groĂź
  '0x38398ffffe016eb4':
    friendly_name: Luftqualitätssensor Arbeitszimmer
  '0xa4c1382f9d2dca8b':
    friendly_name: Steckdose Home Assistant
  '0xa4c138f735af23ae':
    friendly_name: Steckdose Schreibtisch
  '0x287681fffe9d0b61':
    friendly_name: Luftqualitätssensor Wohnzimmer
availability: true

Any ideas what to try next?

Best
Julz

Did you restart Zigbee2MQTT ?

1 Like

As part of the Zigbee FAQ I restarted Z2M including disconnecting the coordinator for 10 seconds before restarting Z2M.

Do the Zigbee2MQTT logs show something ?

1 Like

Logs show that new devices can join, however, interview never starts. Example below:

Info 2024-03-12 17:39:23Zigbee: allowing new devices to join.
Info 2024-03-12 17:39:23MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"ovvi3-7"}'
Info 2024-03-12 17:39:27MQTT publish: topic 'zigbee2mqtt/Steckdose Schreibtisch neu', payload '{"child_lock":"UNLOCK","current":0.47,"energy":1.81,"indicator_mode":"off/on","last_seen":"2024-03-12T17:39:27+01:00","linkquality":244,"power":72,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":229}'
Info 2024-03-12 17:39:27MQTT publish: topic 'zigbee2mqtt/Steckdose Schreibtisch neu', payload '{"child_lock":"UNLOCK","current":0.45,"energy":1.81,"indicator_mode":"off/on","last_seen":"2024-03-12T17:39:27+01:00","linkquality":244,"power":68,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":230}'
Info 2024-03-12 17:39:27MQTT publish: topic 'zigbee2mqtt/Steckdose Schreibtisch neu', payload '{"child_lock":"UNLOCK","current":0.45,"energy":1.81,"indicator_mode":"off/on","last_seen":"2024-03-12T17:39:27+01:00","linkquality":248,"power":68,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":230}'

after the “allowing new devices to join” message no interview is initiated

Are you sure the plugs are in pairing mode?

Is “Steckdose Schreibtisch neu” the name of your Tuya plug?

1 Like

Yes, absolutely sure. The plugs go to pairing automatically when you plug them in and they have not been paired before. Also tried it with 3 different tuya plugs. none of them shows up in the devices list of Z2M.

It is the name of one of the tuya plugs. I have 4 up and running:

Wait, what am I missing? If you can see them in the device page, it means they paired correctly.

If you’re talking about the 5th missing plug, try to force it into pairing mode by following the instructions in the Z2MQTT page (or the link in my previous post)

1 Like

Wow, it hardly can get any more random…Today, just out of curiosity, I tried pairing a 4th and 5th TuYa plug (same make and brand) and they were able to pair. I thought I am going nuts and tried the other 3 devices which I was talking about earlier: all 3 of them cant pair. For now my hypothesis is that all 3 of them are from a bad batch. Cant explain it otherwise.

thanks @francisp and @ShadowFist for your replies!

1 Like

Sure, it was about adding an additional plug. And yes, I forced it into pairing mode many times. However, seems to be solved now.

I have several Tuya devices active. After upgrading to Z2M v 2.0.0 the devices were not available anymore. I deleted one of the device definitions from Z2M and tried to pair the device. I have exactly the same problem with that device as Julian Lejouz.
After upgrading Z2M v 2.0.1 my system found my old devices again exept for the before deleted device.
I understand from KoenKK that a lot of legacy is removed from the code and that Tuya is not following the Zigbee 3.0 standard. That might cause the problem.
Therefor I bought a tuya hub and will try to connect the Tuya devices with the local tuya integration instead of with Z2M. I hope that will work. Next week I’ll try.

Great, let us know how I went!