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

Sonoff SNZB-01 #2990

Closed
2 of 7 tasks
madman2143 opened this issue Jun 28, 2020 · 108 comments
Closed
2 of 7 tasks

Sonoff SNZB-01 #2990

madman2143 opened this issue Jun 28, 2020 · 108 comments

Comments

@madman2143
Copy link

Device

  • Product name: Wireless Switch
  • Manufacturer: Sonoff
  • Model identifier: SNZB-01
  • Device type:
    • Light
    • Lock
    • Remote
    • Sensor
    • Siren
    • Thermostat
    • Other: Wireless Switch

image
image

@madman2143 madman2143 changed the title Device name Sonoff SNZB-01 Jun 28, 2020
@madman2143
Copy link
Author

@SwoopX
Copy link
Collaborator

SwoopX commented Jun 29, 2020

Please add the missing information as mentioned in the device request, thanks!

@madman2143
Copy link
Author

Sorry, I'm new to this!

Are you talking about this?
image

@SwoopX SwoopX mentioned this issue Jul 15, 2020
@NovaGL
Copy link

NovaGL commented Jul 24, 2020

Any update on this. Do you need more information?

@lbouriez
Copy link

Very interested on this switch

@stale
Copy link

stale bot commented Sep 2, 2020

As there hasn't been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@stale stale bot added the stale label Sep 2, 2020
@stale
Copy link

stale bot commented Sep 11, 2020

As there hasn't been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it isn't solved, request to get this opened again.

@SAOPP
Copy link

SAOPP commented Sep 19, 2020

Hi! Guys, I just get this device, but one question, I have only two actions: double and long, and missing single click.

image

image

image

image

Any suggestion for this situation or at current moment device is not fully supported yet?

@SAOPP
Copy link

SAOPP commented Sep 19, 2020

image

@SAOPP
Copy link

SAOPP commented Sep 19, 2020

image

@Smanar
Copy link
Collaborator

Smanar commented Sep 19, 2020

But from the code I see only "on" and "off" as return possible.

static const Sensor::ButtonMap sonoffOnOffMap[] = {
//    mode                          ep    cluster cmd   param button                                       name
    { Sensor::ModeScenes,           0x01, 0x0006, 0x01, 0,    S_BUTTON_1 + S_BUTTON_ACTION_SHORT_RELEASED, "On" },
    { Sensor::ModeScenes,           0x01, 0x0006, 0x00, 0,    S_BUTTON_2 + S_BUTTON_ACTION_SHORT_RELEASED, "Off" },
    // end
    { Sensor::ModeNone,             0x00, 0x0000, 0x00, 0,    0,                                           nullptr }
};

Wich one numeric value you have ?

@SAOPP
Copy link

SAOPP commented Sep 19, 2020

If I correctly understood your question 'bout values of buttons... double 1002, long 2002 (at Home Assistant events)

@Smanar
Copy link
Collaborator

Smanar commented Sep 19, 2020

Ok so it seem this devices have other return value.
I have used the @SAOPP log to make the table, but will be nice if someone can test it ?

The new code

static const Sensor::ButtonMap sonoffOnOffMap[] = {
//    mode                          ep    cluster cmd   param button                                       name
    { Sensor::ModeScenes,           0x01, 0x0006, 0x01, 0,    S_BUTTON_1 + S_BUTTON_ACTION_DOUBLE_PRESS, "Double" },
    { Sensor::ModeScenes,           0x01, 0x0006, 0x00, 0,    S_BUTTON_1 + S_BUTTON_ACTION_LONG_RELEASED, "Long" },
    { Sensor::ModeScenes,           0x01, 0x0006, 0x02, 0,    S_BUTTON_1 + S_BUTTON_ACTION_SHORT_RELEASED, "Short" },
    // end
    { Sensor::ModeNone,             0x00, 0x0000, 0x00, 0,    0,                                           nullptr }
};

To test the code

git clone --branch sonoff https://github.com/Smanar/deconz-rest-plugin.git
cd deconz-rest-plugin
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

@bonelessc
Copy link

I would be very happy to test this, but I am running DeConz in docker. Is that possible?

@Smanar
Copy link
Collaborator

Smanar commented Sep 19, 2020

Nope, need a classic OS to compile the code.
But not in hurry.

@NovaGL
Copy link

NovaGL commented Sep 20, 2020

I would like to test to but don't know how on RPI2

@pippo73
Copy link

pippo73 commented Sep 20, 2020

Does it works only for snzb-01 or maybe also with 03?

@Smanar
Copy link
Collaborator

Smanar commented Sep 20, 2020

@pippo73 The 03 is a motion sensor ? not a switch ?

@NovaGL If you have a Rpi with a classic OS (not HA for exemple), you have the procedure on homepage https://github.com/dresden-elektronik/deconz-rest-plugin#install-deconz-development-package-optional-linux-only

Just change a little for step (1- 4)

git clone --branch sonoff https://github.com/Smanar/deconz-rest-plugin.git
cd deconz-rest-plugin
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

@NovaGL
Copy link

NovaGL commented Sep 20, 2020

How do I install qmake?

@Smanar
Copy link
Collaborator

Smanar commented Sep 20, 2020

You have tested
sudo apt install deconz-dev

@NovaGL
Copy link

NovaGL commented Sep 21, 2020

Doesn't work for me, can you make a package for RPI2 and I'll test it.

@NovaGL
Copy link

NovaGL commented Sep 21, 2020

I tried I built it on ubuntu but get login failed

@Jimmy-SafeCash
Copy link

Update: The switch is connected to the network. When I press the button the VNC map shows the switch blinking blue and green.

deconz_events in HA shows nothing and never has (no matter which sensor I activate).

Latest logs when spamming button presses:

22:29:32:390 [INFO] - No button handler for: SML001 endpoint: 0x02 cluster: 0x0402 command: 0x0A payload[0]: 000 22:29:32:390 ZCL attribute report 0x0017880106F4F8F9 for cluster: 0x0402, ep: 0x02, frame control: 0x08, mfcode: 0x0000 22:29:33:961 Current channel 15 22:29:33:969 Device TTL 5639 s flags: 0x7 22:29:39:220 [INFO] - Button 1002 short 22:29:42:004 [INFO] - Button 1002 short 22:29:45:960 [INFO] - No button handler for: TH01 endpoint: 0x01 cluster: 0x0402 command: 0x0A payload[0]: 000 22:29:45:960 ZCL attribute report 0x00124B002228CA84 for cluster: 0x0402, ep: 0x01, frame control: 0x18, mfcode: 0x0000 22:29:46:151 [INFO] - Button 1003 long 22:29:53:344 sensor 2 (SML001): disable presence 22:29:53:548 [INFO] - No button handler for: SML001 endpoint: 0x02 cluster: 0x0406 command: 0x0A payload[0]: 000 22:29:53:548 ZCL attribute report 0x0017880106F4ECA3 for cluster: 0x0406, ep: 0x02, frame control: 0x08, mfcode: 0x0000 22:30:13:926 [INFO] - Button 1002 short 22:30:15:927 [INFO] - Button 1004 double 22:30:16:941 [INFO] - No button handler for: SML001 endpoint: 0x02 cluster: 0x0406 command: 0x0A payload[0]: 000 22:30:16:941 ZCL attribute report 0x0017880106F4D4F9 for cluster: 0x0406, ep: 0x02, frame control: 0x08, mfcode: 0x0000 22:30:17:031 [INFO] - No button handler for: SML001 endpoint: 0x02 cluster: 0x0400 command: 0x0A payload[0]: 000 22:30:17:031 ZCL attribute report 0x0017880106F4D4F9 for cluster: 0x0400, ep: 0x02, frame control: 0x08, mfcode: 0x0000 22:30:18:366 [INFO] - Button 1002 short 22:30:18:530 [INFO] - No button handler for: SML001 endpoint: 0x02 cluster: 0x0400 command: 0x0A payload[0]: 000 22:30:18:530 ZCL attribute report 0x0017880106F4D4F9 for cluster: 0x0400, ep: 0x02, frame control: 0x18, mfcode: 0x0000 22:30:19:225 [INFO] - No button handler for: SML001 endpoint: 0x02 cluster: 0x0400 command: 0x0A payload[0]: 000 22:30:19:225 ZCL attribute report 0x0017880106F4F8F9 for cluster: 0x0400, ep: 0x02, frame control: 0x08, mfcode: 0x0000 22:30:20:792 [INFO] - Button 1004 double 22:30:24:050 [INFO] - Button 1002 short 22:30:27:196 [INFO] - Button 1002 short 22:30:31:694 [INFO] - No button handler for: SML001 endpoint: 0x02 cluster: 0x0402 command: 0x0A payload[0]: 000 22:30:31:694 ZCL attribute report 0x0017880106F4E208 for cluster: 0x0402, ep: 0x02, frame control: 0x08, mfcode: 0x0000 22:30:33:958 Current channel 15 22:30:33:966 Device TTL 5579 s flags: 0x7 22:31:20:908 [INFO] - No button handler for: RWL021 endpoint: 0x02 cluster: 0x0001 command: 0x0A payload[0]: 021 22:31:20:908 ZCL attribute report 0x0017880104F32359 for cluster: 0x0001, ep: 0x02, frame control: 0x08, mfcode: 0x0000 22:31:25:859 [INFO] - No button handler for: TH01 endpoint: 0x01 cluster: 0x0405 command: 0x0A payload[0]: 000 22:31:25:859 ZCL attribute report 0x00124B002228CA84 for cluster: 0x0405, ep: 0x01, frame control: 0x18, mfcode: 0x0000 22:31:33:968 Current channel 15 22:31:33:976 Device TTL 5519 s flags: 0x7 22:31:47:732 [INFO] - No button handler for: SML001 endpoint: 0x02 cluster: 0x0402 command: 0x0A payload[0]: 000 22:31:47:732 ZCL attribute report 0x0017880106F4D4F9 for cluster: 0x0402, ep: 0x02, frame control: 0x08, mfcode: 0x0000 22:31:53:383 [INFO] - Button 1002 short 22:32:33:960 Current channel 15 22:32:33:969 Device TTL 5458 s flags: 0x7 22:32:40:047 dev /dev/ttyAMA0 22:32:40:047 GW firmware version: 0x26660700 22:32:40:047 GW firmware version is up to date: 0x26660700 22:33:05:271 [INFO] - No button handler for: RWL021 endpoint: 0x02 cluster: 0x0001 command: 0x0A payload[0]: 021 22:33:05:271 ZCL attribute report 0x0017880106A7F62F for cluster: 0x0001, ep: 0x02, frame control: 0x08, mfcode: 0x0000 22:33:17:495 [INFO] - No button handler for: SML001 endpoint: 0x02 cluster: 0x0402 command: 0x0A payload[0]: 000 22:33:17:495 ZCL attribute report 0x0017880106F4ECA3 for cluster: 0x0402, ep: 0x02, frame control: 0x08, mfcode: 0x0000

@Jimmy-SafeCash
Copy link

Fixed! For some reason when I had added the switch it had created a light group with the same switch ID? I deleted the light group, reloaded the integration and bingo, it worked.

@SAOPP
Copy link

SAOPP commented Oct 20, 2020

Guys 86th version, any events is not presents :(

@markusadam27
Copy link

markusadam27 commented Oct 20, 2020

Hi guys
I have a SNZB-01 that i try to get to work with the phoscon app, at the moment i use a win10 PC.
For me in deCONZ everything looks fine since the new version 86. In Debugview i see that the events are printed out correct:
[1248] 19:37:50:010 [INFO] - Button 1002 short
[1248] 19:37:52:487 [INFO] - Button 1004 double
[1248] 19:38:00:549 [INFO] - Button 1003 long

In Phoscon the switch is detected but i can not add it to a group

image

image

Does anybody know if the switch is only fully supported for deCONZ but not for Phoscon?

@SwoopX
Copy link
Collaborator

SwoopX commented Oct 20, 2020

Please check out the Phoscon beta repository for your question. Phoscon is just another REST API client, the switch itself is fully supported.

@Smanar
Copy link
Collaborator

Smanar commented Oct 20, 2020

This device don't have group capabilities, it s possible to make group with it in phoscon ?

@SwoopX
Copy link
Collaborator

SwoopX commented Oct 20, 2020

I wouldn't place a sure bet on it yet. However, I cannot check it as I don't have any such device.

@carloaugx
Copy link

Confirm same issue;
SNZB-01 recognized with deconz 2.06.00 / 11/15/2020
Raspbee 2 Firmware Version: 26660700

But cannot be added to an existing group as available switch.

@SwoopX
Copy link
Collaborator

SwoopX commented Nov 28, 2020

You need to do it via the old webapp.

@carloaugx
Copy link

Thanks @SwoopX, but what exact version I need to use of deconz?
image

@SwoopX
Copy link
Collaborator

SwoopX commented Nov 28, 2020

It's not a version thing. Your screenshot is from Phoscon and not the old webapp.

Iirc, you reach the old webapp via http://YOUR_IP_ADDRESS/login.html
Username is: delight

@carloaugx
Copy link

Great @SwoopX it works! Thanks a lot for your help.

@riyas1980
Copy link

It's not a version thing. Your screenshot is from Phoscon and not the old webapp.

Iirc, you reach the old webapp via http://YOUR_IP_ADDRESS/login.html
Username is: delight

I have the same issue. It's detected by phoscon but I can't use it. I've tried to follow your suggestion by using the old webapp but it's not connecting. I am using raspberry pi 4 with Hassio. Can you please help me how to do that ?

@TadFocus
Copy link

TadFocus commented Jan 24, 2021

hello, I have the same issue as @riyas1980, please help @SwoopX
But my phoscon didn´t detect it.

@rudak
Copy link

rudak commented Feb 3, 2021

I have a result after pairing it with Conbee II on Jeedom

Version 2.5.84
Firmware 0x26660700
{
    "22": {
        "config": {
            "battery": 100,
            "group": "2",
            "on": true,
            "reachable": true
        },
        "ep": 1,
        "etag": "822d1c3c54107d08a8e4d755eddd8df8",
        "lastseen": "2021-02-03T18:59Z",
        "manufacturername": "eWeLink",
        "mode": 1,
        "modelid": "WB01",
        "name": "WB01 22",
        "state": {
            "buttonevent": 2002,
            "lastupdated": "2021-02-03T18:14:10.812"
        },
        "swversion": "20200718",
        "type": "ZHASwitch",
        "uniqueid": "00:12:4b:00:1f:66:18:aa-01-0006"
    }
}

Only the double clic is recognized... lol

@KMDobrev
Copy link

Hi guys
I have a SNZB-01 that i try to get to work with the phoscon app, at the moment i use a win10 PC.
For me in deCONZ everything looks fine since the new version 86. In Debugview i see that the events are printed out correct:
[1248] 19:37:50:010 [INFO] - Button 1002 short
[1248] 19:37:52:487 [INFO] - Button 1004 double
[1248] 19:38:00:549 [INFO] - Button 1003 long

In Phoscon the switch is detected but i can not add it to a group

I am having the same problem. Sorry, I couldn't find a solution.

@TadFocus
Copy link

TadFocus commented Feb 16, 2021

hello, I have the same issue as @riyas1980, please help @SwoopX
But my phoscon didn´t detect it.

Everything works for me after the last update

@KMDobrev
Copy link

hello, I have the same issue as @riyas1980, please help @SwoopX
But my phoscon didn´t detect it.

Everything works for me after the last update

What is the update version?

@FreshJonte
Copy link

hello, I have the same issue as @riyas1980, please help @SwoopX
But my phoscon didn´t detect it.

Everything works for me after the last update

What is the update version?

Having the same issue. Any update?

@sunshineautomate
Copy link

Thanks to the devs for looking at this.
Same issue, Alot of people will be buying this Sonoff gear as their zigbee implementation is decent. Hoping for a resolution.

@chatainsim
Copy link

chatainsim commented May 26, 2021

Same issue here, able to include but weird issue.
deConz 2.11.5
image

@Smanar
Copy link
Collaborator

Smanar commented May 26, 2021

yours devices are not correclty included.
The powered one don't support mesh for inclusion, can you try to include this one close to the conbee ?

Press button during inclusion, to prevent it going to sleep.

@chatainsim
Copy link

chatainsim commented May 26, 2021

yours devices are not correclty included.
The powered one don't support mesh for inclusion, can you try to include this one close to the conbee ?

Press button during inclusion, to prevent it going to sleep.

I've tried to include at less than 2 meter with the same issue.
Tried to press button but nothing help. I've already included two ZBMIINI and one xiaomi aquara switch with success.

Edit, I've removed both switch and try again at 10-20cm from the conbee USB, same result.
image

What do you mean but powered one ?

@Smanar
Copy link
Collaborator

Smanar commented May 27, 2021

Wired device on 220V, but it s exactly the same issue.

Click on the first circle, you will have a popup, if you click on squares you can resend command to the device, try with commands with 'descriptor", it will enable the second circle.

Problem, the device need to be awake when you make the request. And idk how to do with this device, use it or press shortly the reset button.

@chatainsim
Copy link

It's both battery powered devices, no 220v.
I'll try the descriptor command tomorrow I think.
Thanks

@chatainsim
Copy link

I've managed to add one of the two switchs but still struggling with the second.

@Smanar
Copy link
Collaborator

Smanar commented May 28, 2021

Battery are good too ?
It s the only one kind of device with this problem ? To check if it can come from it or your zigbee connexion..

@chatainsim
Copy link

Battery are new. Yes, so far it's the only device with this issue.
I've, for now, only two ZBMIINI and one Xiaomi aquara switch.
I will try with router CC2530+CC2591 soon and some more xiaomi sensor.

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.