dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 502 forks source link

Aqara Single Switch Module T1 (with Neutral) #3380

Closed spn91 closed 3 years ago

spn91 commented 4 years ago

Device

https://www.aqara.cn/en/single_switch_T1_with-neutral.html

Screenshots

image image image image

aqara-t1-single-switch-connecting-and-triggering.pcapng.zip

zigbee_pc_keys.txt

MiAutomations commented 3 years ago

you please give information about your deconz version? An

Helo, the version is now Current version: 6.6.2, and in my case appears on the web interface deconz when i search for new device and also in the Home Assistant entities but obly as a switch not the information about the electricity data

SwoopX commented 3 years ago

Ok, I've taken another look at the sniffer log initially provided. The switch definititely seems to send attribute reports from the on/off cluster and reacts on those commands...

grafik

Question now is why deconz doesn't pick this up or doesn't represent that cluster in the GUI respectively.

Smanar commented 3 years ago

IDk, realy strange, manup have said me tha same thing than ebaauw, and was correctly recently in core from my memory (have same problem for invisible tuya cluster). From manup if the cluster is known (in the general.xml file) it can be added itself when deconz see it.

SwoopX commented 3 years ago

Can anybody please read the attributes from the lumi specific cluster in deconz GUI and share a screenshot? I might have stumbled upon something accidentally I'd like to verify.

Smanar commented 3 years ago

Oups, I totaly forget this issue. I m trying a hack for the invisible cluster https://github.com/Smanar/deconz-rest-plugin/commit/5f6acaf24350e65ac807d32ee4d4dbdd1447bc9b#diff-d0aaee66bc2f60fdd243c0e5b86aebca01fa3eb36c7ec39578d5beeca47078ab

Do you think it can work ?

SwoopX commented 3 years ago

No need to do any magic if my theory is right. It is probably related to attribute 0x0009 on that cluster. When it is set to 0, it seems to supress a significant amount of reporting messages, including on/off

Smanar commented 3 years ago

Ha ? can be realy nice information.

spn91 commented 3 years ago

Can anybody please read the attributes from the lumi specific cluster in deconz GUI and share a screenshot? I might have stumbled upon something accidentally I'd like to verify.

@SwoopX What do you mean with "lumi specific cluster"?

SwoopX commented 3 years ago

When viewing the node in deconz GUI, there is a cluster called like that. I need a screenshot with the attributes being read

spn91 commented 3 years ago

@SwoopX image

SwoopX commented 3 years ago

Yeees :)

Now double click on the value of attribute 0x0009 and set it to 1 and cross fingers to let some magic happen. You might need to discinnect the device from power for it to work afterwards.

spn91 commented 3 years ago

Now double click on the value of attribute 0x0009 and set it to 1 and cross fingers to let some magic happen. You might need to discinnect the device from power for it to work afterwards.

Ok, i have set it to 1. It was really strange, have tried it two times and every time it told me that the writing has failed after about 30 seconds. Now I had another look at it and recognized that it is set to 1. But now I am not at home anymore, so I have to check it in the evening, and also to disconnect the power from it. Should it appear automatically, or do I have to do something more?

Smanar commented 3 years ago

But if you disconnect the device, it was reseted, so the setting is loose ?

spn91 commented 3 years ago

What do you mean? I have not disconnected the power yet.

Smanar commented 3 years ago

You might need to discinnect the device from power for it to work afterwards.

My question was for Swoops ^^.

MiAutomations commented 3 years ago

Yeees :)

Now double click on the value of attribute 0x0009 and set it to 1 and cross fingers to let some magic happen. You might need to discinnect the device from power for it to work afterwards.

Hello and thank you for your support .

I have a different values in the attribute 0x0009 ... is this normal our do I have to perform other task?

image

spn91 commented 3 years ago

@MiAutomations

you are looking at the wrong place. This is the basic cluster.

EDIT: and I think this has nothing to do with your problem. You are already able to switch on/off.

MiAutomations commented 3 years ago

@MiAutomations

you are looking at the wrong place. This is the basic cluster.

EDIT: and I think this has nothing to do with your problem. You are already able to switch on/off.

Ok thank you, yes my problem is related to the electricity data or measuring information on this module

Thank you and best regards

spn91 commented 3 years ago

@SwoopX The switch was now disconnected from power, but nothing has changed. Also the value of 0x0009 is not changing back to 0.

SwoopX commented 3 years ago

Hm, never getting boring with Xiaomi...

The last thing I can think of is: ensure attribute 0x0009 is set to 1 and then re-read the node descriptor, followed by the active endpoints and the simple descriptors.

spn91 commented 3 years ago

Sry, this is also not working. But what should be the result of executing this steps? Should the switch appear in the light section of phoscon?

MiAutomations commented 3 years ago

Any news regarding the power consuming information get from this device anyone have success to get this info over the deconz and conbee II ?

Thank you and best regards

SwoopX commented 3 years ago

At least got an idea what could be checked... Need to dig a little bit into this

spn91 commented 3 years ago

Any news for us?

Mimiix commented 3 years ago

@SwoopX ^

MiAutomations commented 3 years ago

Hello To all

Just to share wit all of you, I still without data from electricity report not available on this device.

Anyone have got successfully get this data from this device?

Thank you and best regards

github-actions[bot] commented 3 years ago

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

spn91 commented 3 years ago

Keep it active, no solution yet.

cornim commented 3 years ago

Is there anything like a roadmap to know when this is going to be added to conbee 2?

Mimiix commented 3 years ago

@cornim nope. I pinged Swoop :)

SwoopX commented 3 years ago

See #4328

Relevant PR just got merged yesterday.

Mimiix commented 3 years ago

Is anyone able to compile and test the fix?

If you can't/don't know how, please follow this: https://github.com/dresden-elektronik/deconz-rest-plugin#install-deconz-development-package-optional-linux-only If you can't after that, please wait for a release or lte someone else test it. Let's keep it clean :)

spn91 commented 3 years ago

After nobody replied for such a long time I have replaced it with sonoff devices. So I cannot help with testing anymore. But should this fix my problem (no on/off switch) or is this just for power metering?

Mimiix commented 3 years ago

@spn91 from the PR (as mentioned by swoop): Whitelist for binding Calculate the correct power values Do not expose current and voltage

MiAutomations commented 3 years ago

Hello Team

I removed the device and add again, but I still not see the dada from the power consuming available on the device over the deconz integration, can you please let me know what I have to do in order to get this ?

deCONZ Current version: 6.8.0 Firmware 26660700 Core Version core-2021.5.2

Thank you and bets regards

github-actions[bot] commented 3 years ago

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

github-actions[bot] commented 3 years ago

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

cobch commented 2 years ago

Hello Team

I removed the device and add again, but I still not see the dada from the power consuming available on the device over the deconz integration, can you please let me know what I have to do in order to get this ?

deCONZ Current version: 6.8.0

Firmware 26660700

Core Version core-2021.5.2

Thank you and bets regards

Did you manage to get power/energy in deconz?

MSL-DA commented 1 year ago

I don't understand why a switch is added when I add an Aqara Single Switch Module T1 (With Neutral)

{
    "capabilities": {
        "alerts": [
            "none",
            "select",
            "lselect"
        ]
    },
    "config": {
        "groups": [
            "1"
        ]
    },
    "etag": "aac090214d5e63c21c51e7884088453b",
    "hascolor": false,
    "lastannounced": null,
    "lastseen": "2023-09-03T14:32Z",
    "manufacturername": "LUMI",
    "modelid": "lumi.switch.n0agl1",
    "name": "Bad",
    "state": {
        "alert": "none",
        "on": false,
        "reachable": true
    },
    "swversion": "0.0.0_0021",
    "type": "On/Off light",
    "uniqueid": "54:ef:44:10:00:15:95:18-01"
}

Skærmbillede 2023-09-03 kl  16 41 28

And the switch which will be added when I add the Single Switch Module T1 (With Neutral)

{
    "config": {
        "clickmode": "rocker",
        "devicemode": "compatibility",
        "on": true,
        "reachable": true
    },
    "ep": 41,
    "etag": "1ed98c63bb541be7d6fd255335219204",
    "lastannounced": null,
    "lastseen": "2023-09-03T14:34Z",
    "manufacturername": "LUMI",
    "mode": 1,
    "modelid": "lumi.switch.n0agl1",
    "name": "Switch 31",
    "state": {
        "buttonevent": null,
        "lastupdated": "none"
    },
    "swversion": "0.0.0_0021",
    "type": "ZHASwitch",
    "uniqueid": "54:ef:44:10:00:15:95:18-29-0012"
}

Skærmbillede 2023-09-03 kl  16 40 21

Smanar commented 1 year ago

From the DDF you need to have :

Perhaps only used on decoupled mode ?

MSL-DA commented 1 year ago

From the DDF you need to have :

  • a TYPE_ON_OFF_LIGHT finishing by -01
  • a TYPE_POWER_SENSOR finishing by 15-000C
  • a TYPE_CONSUMPTION_SENSOR finishing by 1F-000C
  • a TYPE_SWITCH finishing by 29-0012

Perhaps only used on decoupled mode ?

I have to admit I don't know what you are talking about. I add it through Phoscon

Smanar commented 1 year ago

No problems, but phoscon is limited as third app, for exemple it don't support power measurement.