-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Feature request]: Avatto 3G Switch with Neutral backlight mode #15970
Comments
I'v tested the 6 gang version of the same switch and have the same issue, not exposing the backlight_mode nor the power_on_state entities |
by the way, for those who are interested, even though I was not able to add the backclight entity for the switches in HA I can use script to publish in their individual topics to turn on/off their bacligkts This way ("tuyaBacklightSwitch":1 to rurn on and tuyaBacklightSwitch":0 to rurn 0ff, example below I"m turning on topic: zigbee2mqtt/AVATTO 3GN/1/set |
This is the database entry: {"id":2,"type":"Router","ieeeAddr":"0xa4c138dc20a0578a","nwkAddr":62540,"manufId":4417,"manufName":"_TZ3000_pv4puuxi","powerSource":"Mains (single phase)","modelId":"TS0003","epList":[1,2,3,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":256,"inClusterList":[3,4,5,6,57344,57345,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"\u000f@T+\u0012","65506":54,"65508":0,"65534":0,"modelId":"TS0003","manufacturerName":"_TZ3000_pv4puuxi","powerSource":1,"zclVersion":3,"appVersion":82,"stackVersion":0,"hwVersion":1,"dateCode":""}},"manuSpecificBosch":{"attributes":{"53251":"AAAAAgAABAAA"}},"genOnOff":{"attributes":{"32768":0,"onOff":1,"onTime":0,"offWaitTime":0,"tuyaBacklightMode":5,"moesStartUpOnOff":1,"tuyaBacklightSwitch":1}},"manuSpecificTuya_3":{"attributes":{"powerOnBehavior":1,"switchType":1}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00256c31a3","endpointID":242},{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00256c31a3","endpointID":1}],"configuredReportings":[],"meta":{"scenes":{}}},"2":{"profId":260,"epId":2,"devId":256,"inClusterList":[4,5,6,57345],"outClusterList":[],"clusters":{"genOnOff":{"attributes":{"onOff":1,"onTime":0,"offWaitTime":0}},"manuSpecificTuya_3":{"attributes":{"powerOnBehavior":1}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00256c31a3","endpointID":242},{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00256c31a3","endpointID":1}],"configuredReportings":[],"meta":{"scenes":{"0_2":{"name":"Scene 0","state":{"color_mode":"xy"}}}}},"3":{"profId":260,"epId":3,"devId":256,"inClusterList":[4,5,6,57345],"outClusterList":[],"clusters":{"genOnOff":{"attributes":{"onOff":1,"onTime":0,"offWaitTime":0}},"manuSpecificTuya_3":{"attributes":{"powerOnBehavior":1}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00256c31a3","endpointID":242},{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00256c31a3","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":82,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":-150731130},"lastSeen":1675368644813,"defaultSendRequestWhen":"immediate"} |
Could you check if the issue is fixed with the following external converter: 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 ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
fingerprint: tuya.fingerprint('TS0003', ['_TZ3000_vsasbzkf', '_TZ3000_odzoiovu', '_TZ3000_4o16jdca', '_TZ3000_pv4puuxi']),
model: 'TS0003_switch_module',
vendor: 'TuYa',
description: '3 gang switch module',
whiteLabel: [{vendor: 'OXT', model: 'SWTZ23'}],
extend: tuya.extend.switch({switchType: true, backlightModeOffNormalInverted: true,endpoints: ['l1', 'l2', 'l3']}),
endpoint: (device) => {
return {'l1': 1, 'l2': 2, 'l3': 3};
},
meta: {multiEndpoint: true},
configure: async (device, coordinatorEndpoint, logger) => {
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
},
};
module.exports = definition;
external_converters:
- ext_converter.js
|
Thanks a lot for responding Did as suggested, It exposes power on behaviour and the switch type (used for internal micro modules not for wall mounted switches) But the important Backlight is not exposed |
Updated #15970 (comment) to add backlight. |
However, if I publish this I can get on/off on the backlight Debug 2023-02-05 13:32:25Received MQTT message on 'zigbee2mqtt/Avatto 3GN/1/set' with data '{"write":{"cluster":"genOnOff","options":{},"payload":{"tuyaBacklightSwitch":0}}}' |
What are the possible values and what to they do? e.g. |
0 = off |
Thanks, I've added it! Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html) |
Is your feature request related to a problem? Please describe
Currently Z2M Detects this device as a Zemismart one, that seems not to have backlight and power_on_behaviour exposed. But with the Tuya gateway I can control both entities (the datapoints are: backlight = 16 and relay = 14)
This is the actual device
https://pt.aliexpress.com/item/1005001947460842.html
This is how it looks in Z2M
Describe the solution you'd like
Include both entities Power_on_behaviour and backlight
Describe alternatives you've considered
Tried using some external converters but no success
Additional context
I have another model, the version without neutral also from the same supplier that exposes both entities but they don't respond
The text was updated successfully, but these errors were encountered: