Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.8k stars 1.64k forks source link

[New device support]: Zigbee Computer Power - model 'TS0601' and manufacturer name '_TZE204_6fk3gewc' #19147

Open LuizizM opened 11 months ago

LuizizM commented 11 months ago

Link

https://vi.aliexpress.com/item/1005002776442806.html?spm=a2g0o.order_list.order_list_main.11.6daccaa4F9lIDH&gatewayAdapt=glo2vnm

Database entry

{"id":17,"type":"Router","ieeeAddr":"0xa4c1382e33144c13","nwkAddr":22241,"manufId":4417,"manufName":"_TZE204_6fk3gewc","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"\u000e\u0000\u0000\u0000e\u000f\u0000\u0000\u0000\u0012#,\u0017$ ,\u0013h\u0007\u0000\u0000ei\u0007\u0000\u0000\u0012 ,f ,\u0012","65506":56,"65508":0,"stackVersion":0,"dateCode":"","appVersion":74}}},"binds":[{"cluster":61184,"type":"endpoint","deviceIeeeAddress":"0x040d84fffe512f0c","endpointID":1},{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x040d84fffe512f0c","endpointID":1},{"cluster":7,"type":"endpoint","deviceIeeeAddress":"0x040d84fffe512f0c","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":74,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"intervewCompleted":true,"meta":{},"lastSeen":1696294086650,"defaultSendRequestWhen":"immediate"}

Comments

i tried to add this Zigbee adapter but im new and dont know how to get the data from the device and need help with it , is a power switch that allows you to turn on you PC remotely using zigbee, has child lock that dont allow it to be turned on/off from the computer switch only allowing to be turned remotely, also has a feature to bind a 433mhz remote to turn on and off the computer by pressing the remote as well.

External converter

No response

Supported color modes

No response

Color temperature range

No response

Fenixekb commented 11 months ago

Yes, I really need this converter too

LuizizM commented 10 months ago

up

phoenixckua commented 10 months ago

I need too

Evililim commented 10 months ago

I have one too :)

In TUYA IoT Platform I have extracted this information :

{"1":"Switch","101":"ModeReset","102":"RF remote control","103":"RF study","104":"buzzer","105":"Relay Status","106":"Child Lock","209":"Cycle Timing","210":"Random Timing"}

What other info can i provide to help ?

alex-shl commented 9 months ago

i need too

Bildas commented 9 months ago

Please, i need it too

Bildas commented 9 months ago

Hi, please those who understand it, if you could take a look at it and write at least a converter for zigbee2mqtt, it would certainly make us all very happy :-) And thanks in advance

Bildas commented 9 months ago

"Hey guys, I finally did it myself. Main functions such as turning on the PC, child lock, on/off beeper are implemented. Finish the rest, it seems useless to me :-) PS: you know everything is for the zigbee2mqtt converter" 6FK3GEWC.txt

Fenixekb commented 9 months ago

"Hey guys, I finally did it myself. Main functions such as turning on the PC, child lock, on/off beeper are implemented. Finish the rest, it seems useless to me :-) PS: you know everything is for the zigbee2mqtt converter" 6FK3GEWC.txt

Thank you very much!

BenJamesAndo commented 8 months ago

Thank you @Bildas for the code. I've expanded upon it to allow for pairing and using the RF remote that ships with the device. Needs a bit more testing but I was able to pair the remote. 6FK3GEWC.txt For those unaware, rename it to 6FK3GEWC.js and then upload it to be in the same folder as the configuration.yaml file for zigbee2mqtt. Then restart zigbee2mqtt and it should work.

If I get time I'll see if I can create a pull request so we can get official support for this.

BenJamesAndo commented 8 months ago

Hey everyone, the PR I made is coming together. Hoping to finalise it soon. But I need a bit of testing done. I'm not sure what Mode Reset or Relay Status does. Also setting RF remote control to off doesn't disable the RF remote from still working. Below is an updated external converter that you can use to test. Perhaps I wired up my device wrong but if in fact these functions don't do anything then I'll remove them. I didn't add in Cycle Timing or Random Timing as that would probably involve putting in a number value and I'm not sure how to do that. Similar outcomes could likely be achieved with an automation anyway.

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 e = exposes.presets;
const ea = exposes.access;
const tuya = require('zigbee-herdsman-converters/lib/tuya');

const tzDatapoints = {
    ...tuya.tz.datapoints,
        key: ['switch', 'mode_reset', 'buzzer', 'child_lock', 'rf_remote_control', 'rf_study', 'relay_status']
}

const definition = {
    fingerprint: [
        {
            modelID: 'TS0601',
            manufacturerName: '_TZE204_6fk3gewc',
        },
    ],
    model: 'PCI E',
    vendor: 'WETEN',
    description: 'PC SWITCH',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tzDatapoints],
    exposes: [
        e.binary('switch', ea.STATE_SET, 'ON', 'OFF').withDescription('PC Power'),      
        e.binary('mode_reset', ea.STATE_SET, 'ON', 'OFF').withDescription('Perhaps changes between Shutdown or Restart, does not seem to actually do anything'),
        e.binary('relay_status', ea.STATE_SET, 'ON', 'OFF').withDescription('Not sure what this does'),
        e.binary('buzzer', ea.STATE_SET, 'ON', 'OFF').withDescription('Buzzer on means no buzzer noise'),
    e.binary('child_lock', ea.STATE_SET, 'LOCK', 'UNLOCK').withDescription('Child safety lock'),
    e.binary('rf_remote_control', ea.STATE_SET, 'ON', 'OFF').withDescription('To enable or disable the use of RF remote control, does not seem to actually work'),
    e.binary('rf_study', ea.STATE_SET, 'ON', 'OFF').withDescription('To pair a RF 433 remote, such as the one supplied')
        ],
    meta: {
        tuyaDatapoints: [
            [1, 'switch', tuya.valueConverter.onOff],
            [101, 'mode_reset', tuya.valueConverter.onOff],
            [105, 'relay_status', tuya.valueConverter.onOff],
            [104, 'buzzer', tuya.valueConverter.onOff],
            [106, 'child_lock', tuya.valueConverter.lockUnlock],
            [102, 'rf_remote_control', tuya.valueConverter.onOff],
            [103, 'rf_study', tuya.valueConverter.onOff],
        ],
    },
};

module.exports = definition;
kshexe commented 7 months ago

How do I get into zigbee connection mode?

BenJamesAndo commented 7 months ago

How do I get into zigbee connection mode?

Long press the reset button for 5s until the LED indicator flashes three times, which means the device has entered pairing mode. If buzzer feedback is on then you'll also hear 3 short beeps. The reset button can be found on the PCIe card.

I'll add the pairing instructions to the device page.

This device has now been officially added so there's no need to use the external converter file and this issue can be closed.

kshexe commented 6 months ago

This is my device, but it doesn't stick to z2m after pairing mode.

Tuya PRO Long Zigbee. The seller said they don't support z2m. Would it be a different product?

ZenoBell commented 6 months ago

There are only two devices that are Zigbee compatibles and there are the same. The difference is one with a long plate for normal pc cases and the other with a short plate for mini atx builds. Seller i guess has outdated info and doesnt still know that i works with z2mqtt. I still although dont see it on the supported devices page.

BenJamesAndo commented 6 months ago

This is my device, but it doesn't stick to z2m after pairing mode.

What do you mean it doesn't stick to z2m? Who is the seller? I did inform one of the sellers on Aliexpress that this device was now supported.

I still although dont see it on the supported devices page.

This is the supported devices page: https://www.zigbee2mqtt.io/devices/PCI_E.html

kshexe commented 6 months ago

Tuya PRO Long Zigbee model pairing is not possible. Is there a way to check?

BenJamesAndo commented 6 months ago

I also have the Tuya PRO Long Zigbee model. You have to press and hold the little black button on the PCIe card itself for 5 seconds. At which point it should go beep-beep-beep and a little blue light should flash. It will then be in pairing mode. If it's still not working try power cycling it by either unplugging it and putting it back in again or completely removing power from your PC.

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days