[RELEASE] Tuya Zigbee Metering Plug (w/ healthStatus)

The development branch was updated to version 1.6.0, timeStamp 2022/09/10 1:02 PM .

The first major change is the return of the automatic reporting configuration for energy, power, voltage and amperate readings changes. Many thanks to @guyeeba for the feedback and bug fixes! In the recent Tuya firmware updates, it seems like the automatic reporting is back for some plugs. Whether the automatic reporting (not by polling!) will work or not for your device depends on the particular model and manufacturer and most importantly - depends on the Tuya device firmware version. In the past years Tuya was periodiclaly enabling, then disabling, then again enabling the automatic reporting for power/voltaga/amperage. So there is not a 100% sure way to determine whether a Tuya metering plug requres polling or not. The only way is to test it..

image
This new option (enabled by default!) will try to configure the automatic reporting each time when the 'Save' button from the Preferences section is clicked. As mentioned, even if the device returns 'succes' code (can be seen in the debug logs), there is no guarantee that the automaic reporting will work. This can be checked by switching off the old option " Automatic polling" and observing the logs. If there are new W/V/A events in the next few hours - then the automatic reporting works, otherwise - it does not work for your device and you must continue to use the software polling option in this driver. Both the new "Automatic Reporting Configuration" and the old "Automatic polling" can be enabled at the same time.

There are also individual reporting threshold parameters for the Energy, Power, Voltage and Amperage. If any of these are not needed for your use case, the reporting can be disabled using the existing 'off or on' switches.

The second addition is the "Reset Energy" command. Unlike the zWave devices, most of the Zigbee devices do not have an explicit Reset command supported in the firmware, so resetting the energy reading is simulated by storing the actual energy reading in a state and then subtracting it from the new energy readings. The custom 'resetEnergy' command can be invoked from RM5 rule every month or every week, etc..

3 Likes