Skip to content

DDF for Sonoff SNZB-06P - #7582

Merged
manup merged 8 commits into
dresden-elektronik:masterfrom
lhering:master
Mar 28, 2024
Merged

DDF for Sonoff SNZB-06P#7582
manup merged 8 commits into
dresden-elektronik:masterfrom
lhering:master

Conversation

@lhering

@lhering lhering commented Feb 8, 2024

Copy link
Copy Markdown
Contributor

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

@Smanar

Smanar commented Feb 9, 2024

Copy link
Copy Markdown
Collaborator

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

Changed "fn": "zcl" to "fn": "zcl:attr"
@Smanar

Smanar commented Feb 11, 2024

Copy link
Copy Markdown
Collaborator

Still a typo ^^

"fn": "None"

It's "none"

Changed None to none
@lhering

lhering commented Feb 11, 2024

Copy link
Copy Markdown
Contributor Author

Yey no errors :)

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

@Smanar

Smanar commented Feb 11, 2024

Copy link
Copy Markdown
Collaborator

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

manup commented Feb 11, 2024

Copy link
Copy Markdown
Member

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

Cleanup and JSON format corrected
@lhering

lhering commented Feb 11, 2024

Copy link
Copy Markdown
Contributor Author

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

@manup manup changed the title DDF File for Sonoff SNZB-06P DDF for Sonoff SNZB-06P Feb 11, 2024
@Smanar

Smanar commented Feb 11, 2024

Copy link
Copy Markdown
Collaborator

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.

@SwoopX SwoopX left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there, just some small things to amend from my perspective 👍

Comment thread devices/sonoff/snzb-06p.json Outdated
Comment thread devices/sonoff/snzb-06p.json Outdated
Comment thread devices/sonoff/snzb-06p.json Outdated
Comment thread devices/sonoff/snzb-06p.json
Comment thread devices/sonoff/snzb-06p.json Outdated
Comment thread devices/sonoff/snzb-06p.json Outdated
@lhering
lhering requested a review from SwoopX February 15, 2024 09:14
@ThiemeNL ThiemeNL mentioned this pull request Mar 13, 2024
1 task
@Smanar

Smanar commented Mar 14, 2024

Copy link
Copy Markdown
Collaborator

@lhering there is still somes changes requested.

@lhering

lhering commented Mar 14, 2024

Copy link
Copy Markdown
Contributor Author

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

@Smanar

Smanar commented Mar 15, 2024

Copy link
Copy Markdown
Collaborator

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

@SwoopX

SwoopX commented Mar 15, 2024

Copy link
Copy Markdown
Collaborator

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

@ThiemeNL

Copy link
Copy Markdown

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

@Smanar

Smanar commented Mar 16, 2024

Copy link
Copy Markdown
Collaborator

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

@SwoopX SwoopX added this to the v2.27.0-beta milestone Mar 21, 2024
@manup
manup merged commit 858abd0 into dresden-elektronik:master Mar 28, 2024
@LordGMM

LordGMM commented Dec 25, 2024

Copy link
Copy Markdown

IMG_1101
Is there a chance to add those parameters to the ddf?

I d like to have two off my sensors to be within a longer range

@Smanar

Smanar commented Dec 26, 2024

Copy link
Copy Markdown
Collaborator

Can try with the GUI, cluster 0x0406, attribute 0x0022
Or add to the DDF

        {
          "name": "config/sensitivity",
          "awake": true,
          "refresh.interval": 86400,
          "read": {
            "at": "0x0022",
            "cl": "0x0406",
            "ep": 1,
            "fn": "zcl:attr"
          },
          "parse": {
            "at": "0x0022",
            "cl": "0x0406",
            "ep": 1,
            "eval": "Item.val = Attr.val;",
            "fn": "zcl:attr"
          },
          "write": {
            "at": "0x0022",
            "cl": "0x0406",
            "dt": "0x20",
            "ep": 1,
            "eval": "Item.val",
            "fn": "zcl:attr"
          }
        },

Value can be 1/ 2 / 3

@mantaalex

Copy link
Copy Markdown

is it possible to set the sensitivity yet in home assistant or deconz app?

@Smanar

Smanar commented Aug 13, 2025

Copy link
Copy Markdown
Collaborator

The code on my previous post have never be tested/added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants