Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDF for Sonoff ZBMini R2 Extreme (ZBMINIR2) #8034

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

duffbeer2000
Copy link

Product name: Sonoff ZBMini R2 Extreme
Manufacturer: Sonoff
Model identifier: ZBMINIR2
Device Type: Smart Switch

Fixes Issue #8020 with help of @Smanar

@duffbeer2000 duffbeer2000 changed the title Zbminir2 DDF for Sonoff ZBMini R2 Extreme (ZBMINIR2) Nov 17, 2024
@Smanar
Copy link
Collaborator

Smanar commented Nov 18, 2024

But you miss the c++ part ?

The validator don't reconise "range" here

          "write": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0xfc11",
            "at": "0x0015",
            "dt": "0x21",
            "eval": "Item.val",
	          "range": [
              1,
              3600
            ]
          },

Copy link
Contributor

github-actions bot commented Nov 18, 2024

Hey @duffbeer2000, thanks for your pull request!

Tip

Modified bundles can be downloaded here.
Relative expire date

DDB changes

Modified

  • sonoff/zbminir2_relay.json : Sonoff ZBMINI R2 Extreme ✔️

Validation

Tip

Everything is fine !

🕐 Updated for commit dad115b

adacschwarz and others added 2 commits November 18, 2024 17:18
@duffbeer2000
Copy link
Author

duffbeer2000 commented Nov 18, 2024

But you miss the c++ part ? --> Like I mentioned in my commit "add zbminir2 to button_maps, needs changes from smanars pull request …" and discord chat ;) but I made a pull from your fork now.

The validator don't reconise "range" here" --> corrected that one

@manup
Copy link
Member

manup commented Jan 29, 2025

The PR adds a new item config/on/delayedpoweron.
@ebaauw @SwoopX I think it's ok, what are your opinions, shall we include it as such?

{
  "schema": "resourceitem1.schema.json",
  "id": "config/on/delayedpoweron",
  "datatype": "Bool",
  "access": "RW",
  "public": true,
  "description": "Delays On/Off state on device startup (power on)."
}

@SwoopX
Copy link
Collaborator

SwoopX commented Jan 29, 2025

@manup I'm afraid following the line of argumentation of the manup from the past, that would be a no. The item at hand would be a prime example of such a response.

However, that brings me once again to the topic of not having any guidance when we might want to expose a resource item and when not. If new ones are exposed, documentation is often lacking or incomplete.

I would personally like to introduce additional 5-10 items but haven't done so, as they do not necessarily match to the requirement(s) discussed.

@ebaauw
Copy link
Collaborator

ebaauw commented Jan 29, 2025

I don't understand why we need two items, config.delay and config.on.delayedpoweron. Also a very non-standard use of config.delay (i.e. different from how it's used on ZHAPresence resources). I would propose to make a single numeric config.on.poweron_delay, and use value 0 to disable it. Since the configuration concerns the output wire, it should be on the lights resource (as should config.on.poweron).
I suppose, functionally it makes sense, after an outage, to delay the power on of appliances that consume a lot of power, not to cause the circuit breaker to overload. For a wired lights switch I fail to see a use case.

Also not happy about the myriad of modes taking device-specific values: config.clickmode, config.devicemode, config.mode. I think most of these should be on the lights resource as well, not on the ZHASwitch sensors resource.

I agree with @SwoopX that we need more guidance on when and how to introduce resource items. Ideally, the API would become self-describing, so API clients don't need to rely on (outdated or missing) documentation. It would definitely like to see capabilities resources describing the values for config.clickmode, config.devicemode and config.mode.

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.

6 participants