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

Revisions history:

  • ver. 1.0.0 2021-11-09 - first version: - reads Power, Energy, Voltage, Amperage once every 60 seconds
  • ver. 1.0.1 2021-11-10 - added 'pollingInterval' preference; 'amperage' attribute name bug fix;
  • ver. 1.1.0 2021-11-12 - added 'PresenceSensor' capability; the automatic polling can be switched off.
  • ver. 1.1.1 2021-11-25 - added Tuya Outlet TS011F fingerprint
  • ver. 1.1.2 2021-12-24 - added Tuya / Neo NAS-WR01 fingerprint; fingerprint inClusters correction
  • ver. 1.2.0 2021-12-29 - major refactoring and optimizations
  • ver. 1.2.1 2021-12-29 - added AlwaysOn option
  • ver. 1.3.0 2022-01-01 - added 'HIKING TOMZN DDS238-2 TS0601 (DIN rail)' support'; 'Optimizations' option.
  • ver. 1.4.0 2022-01-23 - debug & trace logging cleanup; initialize switch and energy automatic reporting mode; energy and switch are excluded from polling; default debug logging is disabled, optimizations are enabled by default; switch digital/physical bug fixed; added driver version check
  • ver. 1.4.1 2022-01-27 - added XH-002P Outlet TS011F fingerprint (no power monitoring!)
  • ver. 1.4.2 2022-02-20 - missing Switch capability bug fix
  • ver. 1.4.3 2022-02-15 - added 'Tuya RC-RCBO Circuit Breaker'
  • ver. 1.4.4 2022-05-08 - added new fingerprints; [overwrite: true] explicit option for runIn timers; settings reset bug fix;
  • ver. 1.4.5 2022-05-24
    • added _TZ3000_5f43h46b XUELILI 16A UK; _TZ3000_r6buo8ba; _TZ3000_ksw8qtmt NOUS A1Z; _TZ3000_1h2x4akh Ajax/Zignito; _TZ3000_ky0fq4ho DIN Relay;
    • GreenPower cluster 0xF2 fix
    • added childLock, ledMode, powerOnState configuration commands;
    • importURL is the development branch
  • ver. 1.4.6 2022-06-02 - added on/off switches for power, amperage, voltage, and energy reporting (logs+Events); added device display name in all logs
  • ver. 1.5.0 2022-06-05 - Bug fix - all settings were reset back in to the defaults on hub reboot; parsing 'other Tuya oddities..'; over current alarm 0x8003; 'Freeze' LED mode (sets the backlight to the current state);
  • ver. 1.5.1 2022-06-12 - ChildLock bug fix
  • ver. 1.6.0 2022-09-11 :
    • removed 'Health Check' and 'Polling' capabilities (ping and poll buttons);
    • added _TZ3000_okaz9tjs fingerprint for tests; automatic reporting configuration bug fixes;
    • added individual thresholds for W,A,V; added autoReportingEnabled switch(default:false);
    • added resetEnergy command; disabled attributes states are now deleted; added energyPrice (decimal) preference;
    • added setEnergyPrice command; added energyCost calculation and event
  • ver. 1.6.1 : added html attribute; added energyDuration; added hourlyEnergy; energy and energyCosts are reset when Initialize button is clicked; fixed autoPoll bug
  • ver 1.6.2 (2022/09/28) : added NON-Tuya plugs fingerprints; removed hardcoded EPVA dividers; SmartThings outlet power and voltage correction; added warning for _TZ3000_okaz9tjs'; removed lastAmperage, lastVoltage, lastPower states; negative energy automatic correction; * ignoring false zero W,A,V values from Tuya devices automatic reports; Frient A/S SPLZB-131 voltage correction; added processing for power Instantaneous Demand
  • ver. 1.6.3 2022-11-24 : * added OSRAM 'Plug 01'; maximum power cap set to 13KW; added 'Develco Products A/S' as Frient manufacturer; fixed power events when on/off; added lastHour energy in HTML; added _TZ3000_zloso4jk; 'not present' bug fix when polling is disabled; removed lastPresenceState; added SiHAS products; * added frequency; added powerFactor; fixOtherTuyaOddities() and extendedTuyaMagic() for _TZ3000_okaz9tjs
  • ver. 1.6.4 2022-11-26 : added Frient Energy Monitor (ZHEMI101); pulseConfiguration; energyMeterMode; removed fixed destEndpoint; isRefreshRequest fix; added rejoinCounter; fixed null Zigbee commands bug;
  • ver. 1.6.5 2022-12-19 - added _TZE204_cjbofhxw Smart Meter w/ Current Transformer ; fixed bug in html for Power attribute; added new models HIKING TOMZN DDS238-2 _TZE200_bkkmqmyo; added MatSee _TZE200_eaac7dkw
  • ver. 1.6.6 2023-01-20 - Zigbee 3.0 incompatible with HE _TZ3000_r6buo8ba and _TZ3000_okaz9tjs fingerprints commented out; added SONOFF Z111PL0H-1JX to the isHEProblematic() list; added _TZ3000_7dndcnnb
  • ver. 1.7.0 2023-01-29 - added healthStatus;
  • ver. 1.7.1 2023-02-02 - added capability 'Health Check'
  • ver. 1.7.2 2023-02-16 - IntelliJ lint +bug fixes; added ThirdReality 3RSP02028BZ metering plug; powerOnState for non-Tuya plugs
  • ver. 1.7.3 2023-03-28 - Third Reality amperage divisor fix; added frequency polling; completely removed presence capability; improved logging for disabled attributes; hourlyEnergy is not sent of disabled or the deviceHealth is offline; dummy ping; Frient freq. divisor fix; added Instantaneous Demand (power) configuration;
  • ver. 1.7.4 2023-04-22 kkossev - added TS011F _TZ3000_1hwjutgo _TZ3000_lnggrqqi Tuya Circuit Breaker 2P; TS0601 _TZE200_hkdl5fmv circuit breaker w/ energy: power, energy, voltage, amperage; polling and energyMode are set automatically depending on the device type; automatic reporting configuration thresholds bug fix;
  • ver. 1.7.5 2023-05-12 kkossev - (dev. branch) added Tongou TO-Q-SY1-JZT DIN Rail Switch TS011F _TZ3000_qeuvnohg; added toggles for enabling Frequency, Power Factor and temperature (if device supports it); added _TZE200_fsb6zw01;
  • ver. 1.7.6 2023-05-13 - added partial support for TS0601 _TZE200_abatw3kj RTX Circuit Breaker 4x25A ZCB25-4P; added Tongou SY2 TZ3000_cayepv1a; thresholds decoding for RTX
  • ver. 1.7.7 2023-06-10 - isTuyaE00xCluster procesing of known attributes; Tongou SY2 over/under V/A/P protection parameters decoding and encoding; moved TS011F non-power-reporting plugs to Zemismart driver
  • ver. 1.7.8 2023-07-29 kkossev - added TS0001 _TZ3000_kqvb5akv; bug fix: report containing multiple 0x0006 attributes was not processed correctly; added setSwitchType configuration command; suppressed some warning logs;
  • ver. 1.8.0 2023-09-03 kkossev - added TS011F _TZ3000_qystbcjg Somgoms ZigBee MCB Circuit Breaker DIN Rail; added TS0601 _TZE200_bcusnqt8 (matches partially the RTXCircuitBreaker)
  • ver. 1.9.0 2024-01-18 - Groovy Linting; added TS0601 _TZE204_81yrt3lo Bidirectional energy meter with 80A current clamp (PJ-1203A); added TS0601 _TZE200_rks0sgb7 (one channel only!)
  • ver. 1.9.1 2024-03-02 - currentEvent bug fix; reduced debug logging; debug logs raw value bug fixes;
  • ver. 1.9.2 2024-03-30 - more Groovy Linting; added TS0001 _TZ3000_mkhkxx1p _TZ3000_tgddllx4 _TZ3000_x3ewpzyr _TZ3000_qnejhcsu _TZ3000_xkap8wtb Tuya switch modules w/ power monitoring;
  • ver. 1.9.3 2024-04-07 - setEnergyPrice() bug fix;
  • ver. 1.9.4 2024-04-14 - added for tests: TS0601 _TZE204_ves1ycwx _TZE200_ves1ycwx _TZE200_v9hkz2yn Zemismart Real-time Smart Energy Monitors - ONE CHANNEL ONLY!
  • ver. 1.9.5 2024-05-16 - (dev. branch) - added ThirdReality 3RSPE01044BZ Smart Plug E2 (European socket!)

The latest fingerprints for new models (manufacturers) and new features or bug fixes are available in the development branch: https://raw.githubusercontent.com/kkossev/Hubitat/development/Drivers/Tuya%20Zigbee%20Metering%20Plug/Tuya%20Zigbee%20Metering%20Plug

The development branch is not pushed to HPM, so you need to manually copy and paste the code from the link above.

If you were using another driver, make sure you press once the 'Initialize' button. Initialize button will load the default settings depending on your plug model and manufacturer!

If you have any issues or suggestions for improvements - please comment in this thread.

4 Likes