Pointers for developing Zigbee Driver - Hobeian ZG-303Z - Soil Sensor

Hi,

I’m about to try to develop my first Zigbee driver to enable a soil sensor from Hobeian (Purchased from AliExpress).

The device synks up with Homey Pro 2013 as an unknown device.

After an interview I get these values;

"ids": {
    "modelId": "ZG-303Z",
    "manufacturerName": "HOBEIAN"
  },
  "endpoints": {
    "ieeeAddress": "a4:c1:38:6e:cc:98:be:0d",
    "networkAddress": 38982,
    "modelId": "ZG-303Z",
    "manufacturerName": "HOBEIAN",
    "endpointDescriptors": [
      {
        "status": "SUCCESS",
        "nwkAddrOfInterest": 38982,
        "_reserved": 22,
        "endpointId": 1,
        "applicationProfileId": 260,
        "applicationDeviceId": 770,
        "applicationDeviceVersion": 0,
        "_reserved1": 1,
        "inputClusters": [
          0,
          3,
          61184,
          1026,
          1029,
          1
        ],
        "outputClusters": [
          3
        ]
      }
    ],
    "deviceType": "enddevice",
    "receiveWhenIdle": false,
    "swBuildId": "0126082025",
    "capabilities": {
      "alternatePANCoordinator": false,
      "deviceType": false,
      "powerSourceMains": false,
      "receiveWhenIdle": false,
      "security": false,
      "allocateAddress": true
    },
    "extendedEndpointDescriptors": {
      "1": {
        "clusters": {
          "basic": {},
          "identify": {},
          "temperatureMeasurement": {},
          "relativeHumidity": {
            "commandsReceived": "UNSUP_GENERAL_COMMAND"
          },
          "powerConfiguration": {
            "attributes": [
              {
                "acl": [
                  "readable",
                  "reportable"
                ],
                "id": 32,
                "name": "batteryVoltage",
                "value": 30,
                "reportingConfiguration": {
                  "status": "NOT_FOUND",
                  "direction": "reported"
                }
              },
              {
                "acl": [
                  "readable",
                  "reportable"
                ],
                "id": 33,
                "name": "batteryPercentageRemaining",
                "value": 200,
                "reportingConfiguration": {
                  "status": "NOT_FOUND",
                  "direction": "reported"
                }
              },
              {
                "acl": [
                  "readable"
                ],
                "id": 65533,
                "name": "clusterRevision",
                "value": 1
              }
            ],
            "commandsGenerated": "UNSUP_GENERAL_COMMAND",
            "commandsReceived": "UNSUP_GENERAL_COMMAND"
          }
        },
        "bindings": {
          "identify": {}
        }
      }
    }
  }

When looking at zigbee2mtt homepage the device is there an a spec can be found for attributes (which does not seem to show up on the interview) HOBEIAN ZG-303Z control via MQTT | Zigbee2MQTT

Can someone please point me to next steps, driver templates etc on how to proceed in the smartest way.

All the best.

//Michael

Start here?

Also, the Universal TUYA Zigbee app supposedly already supports this device.

Thanks Robert.

I will try to continue reading up on how to proceed.
I have checked the Universal TUYA Zigbee App but the device is not included there. There are four other Hobeian devices included but not the Soil Meter.

//Michael

Asking the developer in the community thread will most probably help soon.

Please read the start-post.

1 Like

Yes I can add it with interview of all your devices

1 Like

It was added previously: https://github.com/dlnraja/com.tuya.zigbee/blob/21555d5ad06d4138d7156fd424108acdf91f0011/docs/support/PR47_GITHUB_RESPONSE.txt#L23

I guess your LLM has removed it again?

Okay I will check

From what I can read in the code you are still waiting for;
Next Action: Awaiting manufacturer ID confirmation

"modelId": "ZG-303Z",
"manufacturerName": "HOBEIAN"

//Michael

Ref com.tuya.zigbee/docs/support/PR47_SOIL_MOISTURE_REVIEW.md at 21555d5ad06d4138d7156fd424108acdf91f0011 · dlnraja/com.tuya.zigbee · GitHub

The HOBEIAN ZG-303Z has 2 AAA batteries. Not CR2032.

I found a scan made for the implementation in Home Assistant if it help;

  "data": {
    "version": 1,
    "ieee": "**REDACTED**",
    "nwk": "0xFDCA",
    "manufacturer": "HOBEIAN",
    "model": "ZG-303Z",
    "friendly_manufacturer": "HOBEIAN",
    "friendly_model": "ZG-303Z",
    "name": "HOBEIAN ZG-303Z",
    "quirk_applied": true,
    "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2",
    "quirk_id": null,
    "manufacturer_code": 4742,

Ref: Add HOBEIAN ZG-303Z and Tuya soil sensor _TZE200_npj9bug3 by nschimme · Pull Request #4536 · zigpy/zha-device-handlers · GitHub

I can see that the code is checked in the main branch any my Homey has the 5.5.153 version installed so it should work but it is still identified as unknown.
Please tell me what I can do to support you with finding out what could be wrong. I have tested with two different units.

it’s better to do an new interview to be sure that we have the good device to implement . go on Homey Developer Tools and on your device clique on 3 dot and the interview button

The interview is in my first post.

Hi Michael,

The HOBEIAN ZG-303Z is fully supported in the latest version (v5.5.162). The device is in the soil_sensor driver with:

  • manufacturerName: HOBEIAN
  • productId: ZG-303Z

To fix the “unknown device” issue:

  1. Make sure you have the latest app version installed (v5.5.162)
  2. Remove the device from Homey
  3. Re-pair the device - this is required because Homey caches the driver match at pairing time

The driver also includes:

  • Soil moisture (displayed as humidity %)
  • Temperature
  • Battery level
  • Flow triggers for moisture/temperature thresholds

The battery type has been updated to include AAA (as you mentioned, 2x AAA).

Let me know if it works after re-pairing!

Hi Michael,

The HOBEIAN ZG-303Z is fully supported in the latest version (v5.5.162). The device is in the soil_sensor driver with:

  • manufacturerName: HOBEIAN
  • productId: ZG-303Z

To fix the “unknown device” issue:

  1. Make sure you have the latest app version installed (v5.5.162)
  2. Remove the device from Homey
  3. Re-pair the device - this is required because Homey caches the driver match at pairing time

The driver also includes:

  • Soil moisture (displayed as humidity %)
  • Temperature
  • Battery level
  • Flow triggers for moisture/temperature thresholds

The battery type has been updated to include AAA (as you mentioned, 2x AAA).

Let me know if it works after re-pairing!

It’s a no-go still :frowning:

Confirm version 5.5.163
Removed it via Developer Tools
Re-paired via regular app

Still Unknown. What’s the easiest way to get a loggfile from the Homey so I can see what is actually happening behind the scenes?

I paired it with my Home Assistant where it showed up nicely.

I have the logfile if it can help in the details on how it present itself.

Hi Michael, v5.5.164 just published - fixed the issue where HOBEIAN ZG-303Z wasn’t being matched to the soil_sensor driver. Please update and re-pair the device.

Confirm it’s working.

Thank you for your support and help. Please tell me if I can assist you in any way.

1 Like