zigbee2mqtt
zigbee2mqtt copied to clipboard
Tuya IH-K009 do not send battery information
What happened?
I paired my Tuya IH-K009 with Zigbee2MQTT and all the information appears but not the battery and voltage information
What did you expect to happen?
Be able to have the battery % information
How to reproduce it (minimal and precise)
No response
Zigbee2MQTT version
1.42.0-2
Adapter firmware version
7.4.5 [GA]
Adapter
Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2 (with last firmware)
Setup
Add-on HA on orangepi 5B. Supervised version of HA
Debug log
No response
I see the same behaviour with Tuya IH-K009 ( the rectangular ones powered by 2*AAA )
Facing the same behavior... Temp, Humidity, signal strength are ok, but the voltage and battery level..
same behaviour
I encounter the same behavior on my side
Same thing, 2 out of 3 IH-K009 sensors are not reporting battery readings.
Same problem using H-K009. Below a publish message in mqtt :
{ "battery": null, "humidity": 46.76, "last_seen": "2025-03-19T17:50:46+02:00", "linkquality": 172, "temperature": 19.23, "voltage": null }
still the same issue , and I see battery is not under device
{ "last_seen": "2025-03-27T08:53:40+01:00", "battery": null, "device": { "applicationVersion": 70, "dateCode": "", "friendlyName": "Temperature05_Disponible", "hardwareVersion": 1, "ieeeAddr": "xxxxxx, "manufacturerID": 4417, "manufacturerName": "_TZ3000_dowj6gyi", "model": "IH-K009", "networkAddress": 20640, "powerSource": "Battery", "stackVersion": 0, "type": "EndDevice", "zclVersion": 3 }, "humidity": 54.1, "linkquality": 21, "temperature": 22.6, "voltage": null }
any updates on this?
No still waiting
solved by connecting to the master ZB dongle again , then place it to the place where it send the data over the slave ZB dongle....not very convenient but worked for me now
For me there is only one router (the coordinator) in the network, still, all 15 sensors do not send battery info. Running z2m 2.3.0
This is definitely a z2m bug. I have switched to ZHA keeping the network (had to confirm that settings have changed) and waited until the sensors sent a new message to show up in ZHA and:
Looking at tuya.ts in current code, it seems that the configure function only configures the tuya magic packet for this sensor, whereas some other TS0201 fingerprints also configure the reporting of the genPowerCfg cluster. Maybe that's what missing, @Koenkk?
So I did the following binding:
and pressed the reset switch on the sensor within the 10 seconds after clicking on "connect" - the binding was successfully set up and the sensor now shows the battery information:
Usually it fails because the sensor is in sleep state so the binding request times out. In any case, it seems that the binding is required for the sensor to report battery info.
I attempted to make a custom converter and it kind of seems to be working, but it is still complaining about endpoint 19 not being available on re-configuring the device. Still, battery is now shown for those that I reconfigured. Maybe someone with more knowledge can refine this:
import {temperature, humidity, battery} from 'zigbee-herdsman-converters/lib/modernExtend';
export default {
fingerprint: [
...tuya.fingerprint("TS0201", ["_TZ3000_dowj6gyi", "_TZ3000_8ybe88nf", "_TZ3000_akqdg6g7"]),
{manufacturerName: "_TZ3000_zl1kmjqx"},
],
model: "IH-K009",
vendor: "Tuya",
description: "Temperature & humidity sensor",
fromZigbee: [fzLocal.TS0201_battery, fz.temperature, fz.humidity],
toZigbee: [],
exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
// Enables reporting of measurement state changes
await tuya.configureMagicPacket(device, coordinatorEndpoint);
await reporting.bind(endpoint, coordinatorEndpoint, [
"genBasic",
"genPowerCfg",
"msTemperatureMeasurement",
"msRelativeHumidity",
"manuSpecificTuya_2",
]);
},
whiteLabel: [tuya.whitelabel("Tuya", "RSH-HS06_1", "Temperature & humidity sensor", ["_TZ3000_zl1kmjqx"])],
};
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
Can you implement the modification of @Soukyuu in order to close the issue ?
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
Unstale
Integrated the fix.
Changes will be available in the dev branch tomorrow and in the next release which is every 1st of the month.