Sonoff Wireless Door/Window Sensor SNZB-04 problem

Hi!
I am trying to add 2 (very similar) sensors to Home Assistant. One works, one doesn’t. And I don’t understand why…
The two sensors are:

  1. The one in the title: Sonoff Wireless Door/Window Sensor SNZB-04, which doesn’t work.
  2. Sonoff Motion Sensor SNZB-03, which does work.

Both sensors were added using the Smart Life Application and both of them work as expected with it (it shows the correct state of the sensor).
I have Tuya integration in HA and both of those devices are shown.
But in HA->Settings->Devices and Services->Devices
for (1) in Device Info it says: Door Sensor (unsupported) by Tuya
for (2) in Device Info it says: PIR motion sensor (IDkXwcvanigdiTj3) by Tuya

The diagnostics’ file conternt is the following:
for (1):

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.10.5",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.5",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Bucharest",
    "os_name": "Linux",
    "os_version": "5.15.74",
    "supervisor": "2022.10.0",
    "host_os": "Home Assistant OS 9.3",
    "docker_version": "20.10.18",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "localtuya": {
      "version": "4.1.1",
      "requirements": []
    },
    "smartthinq_sensors": {
      "version": "0.24.2",
      "requirements": [
        "pycountry>=20.7.3",
        "xmltodict>=0.12.0",
        "cchardet>=2.1.7"
      ]
    },
    "hacs": {
      "version": "1.28.3",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "salusfy": {
      "version": "0.0.1",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "tuya",
    "name": "Tuya",
    "documentation": "https://www.home-assistant.io/integrations/tuya",
    "requirements": [
      "tuya-iot-py-sdk==0.6.6"
    ],
    "dependencies": [
      "ffmpeg"
    ],
    "codeowners": [
      "@Tuya",
      "@zlinoliver",
      "@frenck"
    ],
    "config_flow": true,
    "iot_class": "cloud_push",
    "dhcp": [
      {
        "macaddress": "105A17*"
      },
      {
        "macaddress": "10D561*"
      },
      {
        "macaddress": "1869D8*"
      },
      {
        "macaddress": "381F8D*"
      },
      {
        "macaddress": "508A06*"
      },
      {
        "macaddress": "68572D*"
      },
      {
        "macaddress": "708976*"
      },
      {
        "macaddress": "7CF666*"
      },
      {
        "macaddress": "84E342*"
      },
      {
        "macaddress": "D4A651*"
      },
      {
        "macaddress": "D81F12*"
      }
    ],
    "loggers": [
      "tuya_iot"
    ],
    "is_built_in": true
  },
  "data": {
    "endpoint": "https://openapi.tuyaeu.com",
    "auth_type": 0,
    "country_code": "40",
    "app_type": "smartlife",
    "mqtt_connected": null,
    "disabled_by": null,
    "disabled_polling": false,
    "name": "Door Sensor",
    "model": "",
    "category": "mcs",
    "product_id": "7jIGJAymiH8OsFFb",
    "product_name": "Door Sensor",
    "online": true,
    "sub": true,
    "time_zone": "+03:00",
    "active_time": "2022-10-30T13:38:26+00:00",
    "create_time": "2022-10-30T13:38:26+00:00",
    "update_time": "2022-10-30T13:38:26+00:00",
    "function": {},
    "status_range": {
      "switch": {
        "type": "Boolean",
        "value": {}
      },
      "battery": {
        "type": "Integer",
        "value": {
          "unit": "",
          "min": 0,
          "max": 500,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status": {
      "switch": true,
      "battery": 100
    },
    "home_assistant": {
      "name": "Door Sensor",
      "name_by_user": null,
      "disabled": false,
      "disabled_by": null,
      "entities": []
    }
  }
}

and for (2):

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.10.5",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.5",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Bucharest",
    "os_name": "Linux",
    "os_version": "5.15.74",
    "supervisor": "2022.10.0",
    "host_os": "Home Assistant OS 9.3",
    "docker_version": "20.10.18",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "localtuya": {
      "version": "4.1.1",
      "requirements": []
    },
    "smartthinq_sensors": {
      "version": "0.24.2",
      "requirements": [
        "pycountry>=20.7.3",
        "xmltodict>=0.12.0",
        "cchardet>=2.1.7"
      ]
    },
    "hacs": {
      "version": "1.28.3",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "salusfy": {
      "version": "0.0.1",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "tuya",
    "name": "Tuya",
    "documentation": "https://www.home-assistant.io/integrations/tuya",
    "requirements": [
      "tuya-iot-py-sdk==0.6.6"
    ],
    "dependencies": [
      "ffmpeg"
    ],
    "codeowners": [
      "@Tuya",
      "@zlinoliver",
      "@frenck"
    ],
    "config_flow": true,
    "iot_class": "cloud_push",
    "dhcp": [
      {
        "macaddress": "105A17*"
      },
      {
        "macaddress": "10D561*"
      },
      {
        "macaddress": "1869D8*"
      },
      {
        "macaddress": "381F8D*"
      },
      {
        "macaddress": "508A06*"
      },
      {
        "macaddress": "68572D*"
      },
      {
        "macaddress": "708976*"
      },
      {
        "macaddress": "7CF666*"
      },
      {
        "macaddress": "84E342*"
      },
      {
        "macaddress": "D4A651*"
      },
      {
        "macaddress": "D81F12*"
      }
    ],
    "loggers": [
      "tuya_iot"
    ],
    "is_built_in": true
  },
  "data": {
    "endpoint": "https://openapi.tuyaeu.com",
    "auth_type": 0,
    "country_code": "40",
    "app_type": "smartlife",
    "mqtt_connected": null,
    "disabled_by": null,
    "disabled_polling": false,
    "name": "PIR motion sensor",
    "model": "",
    "category": "pir",
    "product_id": "IDkXwcvanigdiTj3",
    "product_name": "PIR motion sensor",
    "online": true,
    "sub": true,
    "time_zone": "+03:00",
    "active_time": "2022-10-30T08:22:40+00:00",
    "create_time": "2022-10-30T08:22:40+00:00",
    "update_time": "2022-10-30T08:22:40+00:00",
    "function": {},
    "status_range": {
      "pir": {
        "type": "Enum",
        "value": {
          "range": [
            "pir",
            "none"
          ]
        }
      },
      "battery": {
        "type": "Integer",
        "value": {
          "unit": "",
          "min": 0,
          "max": 500,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status": {
      "pir": "none",
      "battery": 100
    },
    "home_assistant": {
      "name": "PIR motion sensor",
      "name_by_user": null,
      "disabled": false,
      "disabled_by": null,
      "entities": [
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": null,
          "device_class": null,
          "original_device_class": "motion",
          "icon": null,
          "original_icon": null,
          "unit_of_measurement": null,
          "state": {
            "entity_id": "binary_sensor.pir_motion_sensor",
            "state": "off",
            "attributes": {
              "device_class": "motion",
              "friendly_name": "PIR motion sensor"
            },
            "last_changed": "2022-10-30T16:12:21.153476+00:00",
            "last_updated": "2022-10-30T16:12:21.153476+00:00"
          }
        }
      ]
    }
  }
}

So, I concluded that for the Door Sensor the properties are not exposed to HA. I think this should be an easy fix. I would like to add them manually, but I don’t know how and where…

I’m having exactly the same problem, no clue where to start troubleshooting tho :thinking:

Hi!
My solution was to use ZHA integration and now both sensors work as expected.
Also:
The steps I described in my above post were wrong: those are valid only for wifi devices.
It does not apply to zigbee devices,

Hello,

Since some weeks, I have the same problem I think: I have 5 sensors and some are disconnected. I’m using ConBee2 (with the last firmware). I tried to restart them removing the battery: it’s working during some days and it’s disconnecting again after a delay.

I have the feeling the problem is coming from the sensors.

Did you find a good and real solution ?

I just bought the SBZB-04 sensor. It could be added in deconz (conbee II) .But opening and closing the sensor, it blinks red but no update is sent to deconz.

Also had issues with SNZB-04 (and to be honest most of my Sonoff sensors) and, once again, by “insisting” it did end up working!

  1. open the device, remove the battery cover, monitor for new device, starting pairing (here with pin in for 5s until red LED blinks 3 times)
  2. pair, let it interview and configure
  3. bring the magnet close and see it changes state, remove, enjoy

So… this is what “should” happen. The first time, nothing worked. I had to add a bit of tape in the sensor to make sure the battery wasn’t wiggling in the device. I then manage to start it but no pairing. Tried again, LED blinked, pairing worked!.. but interview failed. Tried again, pairing worked, interview passed, recognize properly as “eWeLink DS01” sensor with Open/Closed stated! It worked precisely once, then moving the magnet closed and far did nothing, it was always opened.

So… I did everything again, pairing, interview, configure… and voila! It worked on the 3rd time or so. I changed of course absolutely nothing.

This is not the first time that Sonoff/eWeLink Zigbee devices are a bit annoying to setup and yet I do keep on buying them because, so far, once setup does work then they keep on working reliably well.

TL;DR: don’t give up!

Thanks! Resetting with the pin was the resolution in my case.