dresden-elektronik / deconz-rest-plugin

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

DDF for Sonoff Zigbee Water Leak Sensor(SNZB-05P) #7843

Closed madisdev closed 1 month ago

madisdev commented 2 months ago

Working version for the SNZB-05P sensor. Tested that when introduced to water shows state in Phoscon and HomeAssistant. Battery level is also visible.

github-actions[bot] commented 2 months ago

Hey @madisdev, thanks for your pull request!

[!TIP] Modified bundles can be downloaded here. Relative expire date

DDB changes

Modified

Validation

[!TIP] Everything is fine !

:clock12: Updated for commit 3063494f272d2fc049193e13773179a49fd6729a

Smanar commented 2 months ago

Hello, have put some comment on the Github post.

madisdev commented 2 months ago

Hello, have put some comment on the Github post.

Hello, I looked at the github action and I see it says "Required", I'm assuming its missing something in the json. Looking at an existing json I see I don't have a uuid. Do I pull that from somewhere or just gen a new one?

Zehir commented 2 months ago

Hello, have put some comment on the Github post.

Hello, I looked at the github action and I see it says "Required", I'm assuming its missing something in the json. Looking at an existing json I see I don't have a uuid. Do I pull that from somewhere or just gen a new one?

Hello, yes I need to update the error message display, it's don't help. I have added a dztail about the error here : https://github.com/dresden-elektronik/deconz-rest-plugin/pull/7843#discussion_r1683022800

About the UUID you dont need to care, a new one will be created automatically after the pull request is merged

madisdev commented 2 months ago

Hello, have put some comment on the Github post.

Hello, I looked at the github action and I see it says "Required", I'm assuming its missing something in the json. Looking at an existing json I see I don't have a uuid. Do I pull that from somewhere or just gen a new one?

Hello, yes I need to update the error message display, it's don't help. I have added a dztail about the error here : #7843 (comment)

About the UUID you dont need to care, a new one will be created automatically after the pull request is merged

Ok thank you. Done.

Smanar commented 2 months ago

Still fail ! it's because of the "uuid" ?

madisdev commented 2 months ago

Still fail ! it's because of the "uuid" ?

UUID is set, not sure.

Smanar commented 2 months ago

BTW there is still some problem in the "state/water". You can't make a try with one of my 2 code instead ?

Zehir commented 2 months ago

Still fail ! it's because of the "uuid" ?

About the uuid you should repove it and let the automation do it's job

The error is because of : https://github.com/dresden-elektronik/deconz-rest-plugin/pull/7843#discussion_r1683022800

madisdev commented 2 months ago

Still fail ! it's because of the "uuid" ?

About the uuid you should repove it and let the automation do it's job

The error is because of : #7843 (comment)

Its weird I cant see your comment anywhere, I can see some of the text when I hover over the link in this comment. but when I click on it, it doesnt show what you said. All I see is this "About the error reported by the validator, it's missing the cl property here; "read":…"

Zehir commented 2 months ago

About the error reported by the validator, it's missing the cl property here;

          "read": {
            "fn": "zcl:attr"
          },
madisdev commented 2 months ago

About the error reported by the validator, it's missing the cl property here;

          "read": {
            "fn": "zcl:attr"
          },

Ok, fixed

madisdev commented 2 months ago

So Im just grabbing values from other sonoff ddf's. Seems it doesn't like the batter refresh interval. Any thoughts on what that should be?

Smanar commented 2 months ago

Error: The refresh interval (7265 - 60 = 7205) should be greater than the binding max refresh value (43200) with a margin of 60 seconds

I m explaining here https://github.com/dresden-elektronik/deconz-rest-plugin/issues/7842#issuecomment-2237061339

The refresh interval is a security used if the bind/report don't work, so the value is ALWAYS above, hoping for never used.

Smanar commented 2 months ago

All checks passed ^^. Have see you have decrease the "max", fine.

Honnestly for me, you can remove the "refresh.interval"if you prefer, all is working ? On my side I let it but I use a 24h refresh.

madisdev commented 2 months ago

Tested json on my local deconz. It works fine. Will continue to test.

Smanar commented 2 months ago

For me your DDF is fine. And I have said crap, (don't touch anything, it's fne for me) but your bind/report is for the cluster 0x0001, so it's for the battery

        {
          "name": "config/battery",
          "awake": true,
          "refresh.interval": 7265,
          "read": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 1,
            "fn": "zcl:attr"
          },
          "parse": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 1,
            "eval": "Item.val = Attr.val / 2;",
            "fn": "zcl:attr"
          },
          "default": 0
        },

The "alarm cluster" , the 0x0500 work a little different, just the bind is usefull generaly

    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0500"
    },

And somes device don't need binds at all for this cluster.

github-actions[bot] commented 1 month ago

This pull request is now merged. The new DDB files have been uploaded to the store.

DDB Files

Modified

:clock230: Updated for commit ba7543d9de255116f7819f9764d91968dbc56a86

madisdev commented 1 month ago

Thanks for the help with this. Cheers.