dresden-elektronik / deconz-rest-plugin

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

DDF for Sonoff SNZB-06P #7582

Closed lhering closed 7 months ago

lhering commented 9 months ago

The DDF as discussed in Issue #7369 and the general.xml changes for the light sensor.

Smanar commented 9 months ago

Hello, there is some changes on recent version. Try changing "fn": "zcl" by "fn": "zcl:attr"

Smanar commented 9 months ago

Still a typo ^^

"fn": "None"

It's "none"

lhering commented 9 months ago

Yey no errors :)

This is my first Pull Request, is there anything else I have to do?

Smanar commented 9 months ago

NoNo it's fine ^^. Now just need to wait for validation. Just a comment,

          "refresh.interval": 4,
          "read": {
            "fn": "none"
          },

Both line are working together, the device normaly use the bind/report you have set at the end, and if and only if this one fail after the period "refresh.interval" deconz make a poll using the "read" line. So we always use bigger value for "refresh.interval" but in this situation it's useless because you have disable the "read" line. So for me, you can remove the refresh.interval, or use a bigger one with the "read" fonction.

For the

         "refresh.interval": 30,
          "read": {
            "at": "0x2001",
            "cl": "0xfc11",
            "ep": 1,
            "fn": "zcl:attr"
          },

You haven't set bind/report at the end, it's an exotic cluster so perhaps not supported, so it mean every 30s deconz ask for the value. Not a big problem as the device is powered, but if the bind/report is working better to use it, and set a bigger value for "refresh.interval" as security (so bigger than 300s with this setting) if it's not working.

{
  "bind": "unicast",
  "src.ep": 1,
  "cl": "0xfc11",
  "report": [
    {
      "at": "0x2001",
      "dt": "0x20",
      "min": 1,
      "max": 300,
      "change": "0x00000001"
    }
  ]
}
manup commented 9 months ago

Hi please also use a JSON formatter like https://jsonformatter.org

lhering commented 9 months ago

@Smanar Thanks, I've changed the parts @manup The format should look better now

Smanar commented 9 months ago

Lol, we are close, sorry, it's strict ^^.

The refresh interval (300 - 60 = 240) should be greater than the binding max refresh value (300) with a margin of 60 seconds

You have set the same time in the resfresh.interval, and on the bind/report, the device need to use the bind/report and not the refresh, so we set a bigger timing for the refresh.interval. Can set the refrest.interval to 400 for exemple.

Smanar commented 8 months ago

@lhering there is still somes changes requested.

lhering commented 8 months ago

I dont know whats mssing here. Maybe someone could help me what I have to do.

Smanar commented 8 months ago

@lhering oups, sorry you are right. @SwoopX all is ok for you ? If I m right all your requested changes are dones ?

SwoopX commented 8 months ago

Yup, looks indeed like my remarks were all addressed. Thanks.

ThiemeNL commented 8 months ago

@lhering could you please complete the PR? Thank you for your effort.

Smanar commented 8 months ago

It's ok, the PR is complete ^^. We have just skipped his changes.