Skip to content

Comments

add dimmer 3 gangs#1204

Open
gpmachado wants to merge 16 commits intoJohanBendz:SDK3from
gpmachado:SDK3
Open

add dimmer 3 gangs#1204
gpmachado wants to merge 16 commits intoJohanBendz:SDK3from
gpmachado:SDK3

Conversation

@gpmachado
Copy link

add dimmer 3 gangs, a smartplug and a switch 1 gang

add support to dimmer 3 gangs - create V2_MULTI_GANG_DIMMER_SWITCH_DATA_POINTS to add 3 gangs.
3 gang Dimmer Moes- TS0601 _TZE204_1v1dxkck JohanBendz#1055
add _TZ3000_88iqnhvd to driver.compose.json
add "_TZE204_q76rtoa9" to driver.compose.json
add "_TZ3000_4rbqgcuv" to driver.compose.json
@gpmachado gpmachado requested a review from JohanBendz as a code owner April 12, 2025 03:37
Gabriel Pedrosa Machado and others added 11 commits April 14, 2025 22:41
Compatibility Report – Zemismart & Nova Digital 1-Gang Wall Switch (Model: TS0001)
This driver has been tested and confirmed working with the following Tuya-based Zigbee wall switches:

Zemismart 1 Gang Wall Switch
Nova Digital 1 Gang Wall Switch
Identifiers:

Model: TS0001
Manufacturers:
_TZ3000_ovyaisip
_TZ3000_pk8tgtdb
 Supported Features:

 On/Off capability: fully functional, handles commands and Zigbee reports properly.
 Power-On Behavior:
Controlled via the relayStatus attribute.
Supported modes:
0 – Always Off
1 – Always On
2 – Restore Previous State
Indicator Mode:
Exposed in the Homey app.
Triggers internal logic and debug logs on change.
 Limitation: The physical LED behavior does not change, due to device firmware constraints.
Blue LED = switch ON
Red LED = switch OFF
 Test Summary:

Driver initializes correctly and reads cluster attributes.
onOff reports are received and interpreted as expected.
Settings changes (indicator_mode, power_on_behavior) are applied and logged successfully.
Device behavior is stable under repeated control and power cycles.
 Known Limitations:

This driver version includes only the tested manufacturers listed above.
Other TS0001 variants or manufacturers may not be fully compatible, and are not yet supported.
This project delivers enhanced Zigbee drivers for Zemismart wall switches, developed as improvements over the original com.tuya.zigbee drivers by JohanBendz. The drivers have been thoroughly tested and debugged using real hardware and Zigbee protocol analysis.
Device Coverage
ZCL-Based Devices (1-3 Gang)

Zemismart 1-Gang Wall Switch - Single endpoint, simplified architecture
Zemismart 2-Gang Wall Switch - Main device + sub-device pattern
Zemismart 3-Gang Wall Switch - Main device + two sub-devices

Tuya-Specific Devices (4-6 Gang)

Zemismart 4-Gang Wall Switch - Full power-on behavior configuration
Zemismart 6-Gang Wall Switch - Always-off firmware variant

Key Enhancements
1. BoundCluster Implementation

ZCL Devices (1-3 Gang): Implemented OnOffBoundCluster for reliable physical button detection
Tuya Devices (4-6 Gang): Enhanced TuyaSpecificBoundCluster for complex datapoint handling
Improved responsiveness to physical button presses
Better state synchronization between app and device

2. Robust Retry System
Two retry implementations based on device type:
ZCL Devices (1-3 Gang)
javascript// Simple retry in onCapabilityOnoff
retryConfig = {
  maxRetries: 2,
  baseDelay: 300ms
}
Tuya Devices (4-6 Gang)
javascript// Enhanced retry in TuyaSpecificClusterDevice
// Conservative approach inspired by TS000x reliability
maxRetries: 2,
baseDelay: 300ms,
backoffType: 'linear'
3. Comprehensive Testing & Debugging

Hardware Testing: All devices physically tested and verified
Protocol Analysis: Used CC2531 sniffer with Tuya platform for traffic analysis
Separate Device IDs: Created unique identifiers for tested variants to ensure reliability
Production Logging: Clean, informative logs for troubleshooting

Technical Architecture
ZCL-Based Architecture (1-3 Gang)
ZigBeeDevice + OnOffCluster + OnOffBoundCluster
├── Simple registerCapability
├── Endpoint-based switching  
├── Physical command handling
└── Retry on command failure
Tuya-Specific Architecture (4-6 Gang)
TuyaSpecificClusterDevice + TuyaSpecificCluster
├── Datapoint-based communication
├── Power recovery system
├── Settings management (4-gang only)
└── Enhanced retry with bulk commands
# ZigBee Gas Detector Driver for Homey

**Compatible Device:** Heiman HS1CG-N AC Powered Gas Detector (Model: TS0204)

## Overview

This driver provides full integration of AC-powered ZigBee gas detectors with Homey Pro. Designed specifically for the Heiman HS1CG-N (TS0204) model, it delivers reliable gas leak detection with automatic enrollment and native Homey flow integration.

## Features

- **Automatic Device Enrollment** - Seamless ZigBee IAS Zone setup
- **Real-time Gas Detection** - Instant alerts via `alarm_gas` capability
- **Malfunction Monitoring** - Device health tracking via `alarm_problem` capability  
- **Native Homey Flows** - Full integration with Homey's built-in flow cards
- **AC Powered Reliability** - No battery concerns, always-on monitoring
- **Passive Health Monitoring** - Efficient connectivity tracking
- **Test Button Support** - Hardware test button functionality

## Supported Models

| Brand | Model | ZigBee ID | Type |
|-------|-------|-----------|------|
| Heiman | HS1CG-N | _TYZB01_0w3d5uw3 / TS0204 | AC Powered Gas Detector |
dlnraja added a commit to dlnraja/com.tuya.zigbee that referenced this pull request Jan 27, 2026
dlnraja added a commit to dlnraja/com.tuya.zigbee that referenced this pull request Jan 31, 2026
…4_Pete, Peter-Celica)

## Deep Investigation Summary (70+ changelog entries analyzed)

### Peter_van_Werkhoven (20+ fixes, v5.5.841-v5.5.987)
- Device: HOBEIAN ZG-204ZV (5-in-1 Multisensor)
- Forum Posts: JohanBendz#1203, JohanBendz#1204, JohanBendz#1211, JohanBendz#1225, JohanBendz#1253, JohanBendz#1265, JohanBendz#1282
- Key Issues: Humidity multiplier, Lux disco lights, missing temp/humidity,
  distance divisor, SOS button, ZCL clusters, battery auto-add
- Cross-ref: Z2M docs, ZHA #4452, #4517, #4268

### 4x4_Pete (10+ fixes, v5.5.329-v5.5.983)
- Devices: HOBEIAN ZG-204ZM (PIR+24GHz Radar), ZG-204ZL (PIR-only)
- Forum Posts: JohanBendz#788, JohanBendz#810, JohanBendz#848, JohanBendz#851
- Key Issues: Wrong driver pairing, battery spam, false temp/humidity,
  ZCL+Tuya hybrid detection, PIR+Radar settings
- Cross-ref: SmartHomeScene review, Z2M Discussion #28529

### Peter-Celica
- Credited contributor in v5.5.931

## Files Updated:
- DEVICE_INTERVIEWS.json: +INT-145 ZG-204ZM, updated INT-144, recurringPatterns
- USER_DEVICE_EXPECTATIONS.md: +4x4_Pete section, +Peter-Celica

## Internet Sources Cross-Referenced (12+):
- SmartHomeScene: ZG-204ZM battery presence sensor review
- Z2M: ZG-204ZV docs, #12364, Discussion #28529
- ZHA: #4452, #4517, #4268, #1599
- HA Community: ZG-204ZM issues, custom quirks
- Blakadder database
@dlnraja
Copy link

dlnraja commented Feb 18, 2026

Hi! 👋

Thank you for this contribution! The fingerprint(s) from this PR have been integrated into dlnraja/com.tuya.zigbee (Universal Tuya Zigbee fork) as of v5.11.14.

Install the latest test version:
https://homey.app/a/com.dlnraja.tuya.zigbee/test/

Community forum:
https://community.homey.app/t/app-pro-universal-tuya-zigbee-device-app-test/140352

This PR can be closed. Thanks for contributing! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants