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

SNZB-01P Sonoff Button #7423

Closed
1 task done
Idaho947 opened this issue Dec 9, 2023 · 8 comments · Fixed by #7483
Closed
1 task done

SNZB-01P Sonoff Button #7423

Idaho947 opened this issue Dec 9, 2023 · 8 comments · Fixed by #7483

Comments

@Idaho947
Copy link
Contributor

Idaho947 commented Dec 9, 2023

Is there already an existing issue for this?

  • I have searched the existing issues and there is none for my device

Product name

Sonoff Button

Manufacturer

Sonoff

Model identifier

SNZB-01P

Device type to add

Switch

Node info

image

Endpoints and clusters

image

Basic

image

Further relevant clusters

Power Configuration

image

Pull control

image

@Idaho947
Copy link
Contributor Author

Hello nobody is interested ?

@Mimiix
Copy link
Collaborator

Mimiix commented Dec 21, 2023

@Smanar perhaps :)>?

@veloc
Copy link

veloc commented Dec 21, 2023

I also have one of these and would like to see them integrated into deconz!
If I can contribute in any way, please let me know.

@Smanar
Copy link
Collaborator

Smanar commented Dec 21, 2023

Can try with this DDF

{
  "schema": "devcap1.schema.json",
  "manufacturername": "eWeLink",
  "modelid": "SNZB-01P",
  "product": "SNZB-01P",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_SWITCH",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0006"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "awake": true,
          "refresh.interval": 7265,
          "read": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 1,
            "eval": "Item.val = Attr.val / 2"
          },
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/buttonevent"
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0021",
          "dt": "0x20",
          "min": 3600,
          "max": 7200,
          "change": "0x00000002"
        }
      ]
    }
  ]
}

And this edition in button_maps.json file

        "sonoffOnOffMap": {
            "vendor": "Sonoff",
            "doc": "Switch SNZB-01",
            "modelids": ["WB01", "WB-01", "SNZB-01P"],
            "map": [
                [1, "0x01", "ONOFF", "ON", "0", "S_BUTTON_1", "S_BUTTON_ACTION_DOUBLE_PRESS", "double"],
                [1, "0x01", "ONOFF", "OFF", "0", "S_BUTTON_1", "S_BUTTON_ACTION_LONG_RELEASED", "long"],
                [1, "0x01", "ONOFF", "TOGGLE", "0", "S_BUTTON_1", "S_BUTTON_ACTION_SHORT_RELEASED", "short"]
            ]
        },

Haven't set a bind for the cluster 0x0006 yet.
Like usual if it don't work pls take a look in log when pressing a button (with flag "info" and "info_l2")

@Idaho947
Copy link
Contributor Author

Idaho947 commented Dec 22, 2023

Perfect as usual. It works very well.
image

@Smanar
Copy link
Collaborator

Smanar commented Dec 22, 2023

So all is fine ? I can make the PR ?

@Idaho947
Copy link
Contributor Author

Yes you can

@Smanar Smanar linked a pull request Dec 22, 2023 that will close this issue
@Smanar
Copy link
Collaborator

Smanar commented Dec 22, 2023

Thx, done #7483

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

Successfully merging a pull request may close this issue.

4 participants