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

Wrong Sensor detected: Soil Moister Sensor TS0222 (_TZ3000_kky16aay) #5941

Closed
phoenixswiss opened this issue Jul 2, 2023 · 3 comments
Closed
Labels

Comments

@phoenixswiss
Copy link

phoenixswiss commented Jul 2, 2023

Issue
The Zigbee Sensor Model TS0222 (https://www.zigbee2mqtt.io/devices/TS0222_temperature_humidity.html) [Zigbee Manufacturer _TZ3000_kky16aay] is detected as TuYa QT-07S (https://www.zigbee2mqtt.io/devices/QT-07S.html) and all values are N/A.

image
image

Expected behaviour
The sensor will be detected as TS0222 (_TZ3000_kky16aay) and the values will be populated.

Related information: Koenkk/zigbee2mqtt#17568

Please let me know if I can help you troubleshooting this issue.

Debug Log:

Debug 2023-07-02 19:15:08Received Zigbee message from 'xxxxx', type 'attributeReport', cluster 'msTemperatureMeasurement', data '{"measuredValue":2600}' from endpoint 1 with groupID 0
Info 2023-07-02 19:15:08MQTT publish: topic 'zigbee2mqtt_instance_1/xxxxx', payload '{"last_seen":"2023-07-02T19:15:09+02:00","linkquality":0}'
Debug 2023-07-02 19:15:09Received Zigbee message from 'xxxxx', type 'attributeReport', cluster 'msRelativeHumidity', data '{"measuredValue":0}' from endpoint 1 with groupID 0
Info 2023-07-02 19:15:09MQTT publish: topic 'zigbee2mqtt_instance_1/xxxxx', payload '{"last_seen":"2023-07-02T19:15:09+02:00","linkquality":0}'
Debug 2023-07-02 19:15:09Received Zigbee message from 'xxxxx', type 'attributeReport', cluster 'msIlluminanceMeasurement', data '{"measuredValue":1}' from endpoint 1 with groupID 0
Info 2023-07-02 19:15:09MQTT publish: topic 'zigbee2mqtt_instance_1/xxxxx', payload '{"last_seen":"2023-07-02T19:15:09+02:00","linkquality":0}'
Debug 2023-07-02 19:15:09Received Zigbee message from 'xxxxx', type 'attributeReport', cluster 'genPowerCfg', data '{"batteryPercentageRemaining":200}' from endpoint 1 with groupID 0
Info 2023-07-02 19:15:09MQTT publish: topic 'zigbee2mqtt_instance_1/xxxxx', payload '{"last_seen":"2023-07-02T19:15:09+02:00","linkquality":0}'
@phoenixswiss
Copy link
Author

phoenixswiss commented Jul 2, 2023

update:
By configuring my "own" external converter, I was able to get the correct values:

const fz = require("zigbee-herdsman-converters/converters/fromZigbee");
const tz = require("zigbee-herdsman-converters/converters/toZigbee");
const exposes = require("zigbee-herdsman-converters/lib/exposes");
const reporting = require("zigbee-herdsman-converters/lib/reporting");
const extend = require("zigbee-herdsman-converters/lib/extend");
const tuya = require("zigbee-herdsman-converters/lib/tuya");
const e = exposes.presets;
const ea = exposes.access;
const fzLocal = {
  TS0222_humidity: {
    ...fz.humidity,
    convert: (model, msg, publish, options, meta) => {
      const result = fz.humidity.convert(model, msg, publish, options, meta);
      result.humidity *= 10;
      return result;
    },
  },
};

const definition = {
  fingerprint: tuya.fingerprint("TS0222", ["_TZ3000_kky16aay"]),
  model: "TS0601_soil",
  vendor: "TuYa",
  description: "Soil sensor fixed",
  fromZigbee: [
    fzLocal.TS0222_humidity,
    fz.battery,
    fz.temperature,
    fz.illuminance,
  ],
  toZigbee: [],
  configure: tuya.configureMagicPacket,
  exposes: [e.battery(), e.temperature(), e.humidity(), e.illuminance()],
  whiteLabel: [
    tuya.whitelabel("TuYa", "TS0222_temperature_humidity", "Soil sensor", ["_TZ3000_kky16aay"]),
  ],
};

module.exports = definition;

@Koenkk
Copy link
Owner

Koenkk commented Jul 4, 2023

The sensor will be detected as TS0222 (_TZ3000_kky16aay) and the values will be populated.

This should already be the case

fingerprint: tuya.fingerprint('TS0222', ['_TZ3000_kky16aay']),
, but I guess configure: tuya.configureMagicPacket, was missing which fixed it in your case. I've added it

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants