Sonoff sensors disconnected


UPDATE: I got sonoff sensors working by get ride of phoscon.

I bought a skyconnect device and now all sonoff sensors are working


I have those Sonoff sensors and other devices:

  • Sonoff Swich SNZB-01
  • Sonoff Door sensor SNZB-04
  • Sonoff Temp & Hum SNZB-02
  • Door sensor Xiaomi

As already described (on Sonoff Disconnect - #16 by lupa18) after severals hours or days, all sonoff devices got disconnected (not xiaomi one) (cc @Mimiix )

Now I reconnected all of them and am waiting for the issue (I tested several times).

Here the log (but no errors yet): Debian paste error

Hi,

Did you update your OS?

Your logs indicate the stick is not found. I suspect this might be in play:

There is a dev (I think he will recognize himself) that have so much issue with them too.
He have set special report value, that increase the time the device stay in the network (somes days if I m right) but they leaves the network after a delay.

On my side I have a Sonoff temperature sensor, no problem with it.

You have the problem on all of them ?

Only this one have a DDF (it’s the multi sensor)
"modelid": ["TH01","SNZB-02D"],

All others are working on legacy code.

Sorry @Mimiix I didn’t say that I have a raspbeeII (so that message about coinbee not sure what it is).

Answering @Smanar I have to say that yes, with all sonoff sensors.

Look this: now, after 6 days first disconnected sensor:

And after some days, all will be disconnected.

If you need more context, logs or whatever I could try to give you.

1 Like

Only the Multisensor have a DDF, so ATM you can only play with this one

  "manufacturername": ["eWeLink","SONOFF"],
  "modelid": ["TH01","SNZB-02D"],

It’s the one I have (and no issue on my side, it use this DDF deconz-rest-plugin/devices/sonoff/snzb-02-multisensor.json at master · dresden-elektronik/deconz-rest-plugin · GitHub

The dev that have made tries have used values from Z2M (long story but without special setting this devices don’t stay in network).

So he have made this DDF for the device

  "manufacturername": "eWeLink",
  "modelid": "TH01",
{
  "schema": "devcap1.schema.json",
  "manufacturername": "eWeLink",
  "modelid": "TH01",
  "vendor": "SONOFF",
  "product": "SNZB-02",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_TEMPERATURE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0402"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0302",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0001",
          "0x0402"
        ]
      },
      "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": 9000,
          "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/offset",
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/temperature",
          "awake": true,
          "parse": {
            "at": "0x0000",
            "cl": "0x0402",
            "ep": 1,
            "eval": "Item.val = Attr.val + R.item('config/offset').val",
            "fn": "zcl"
          },
          "default": 0
        }
      ]
    },
    {
      "type": "$TYPE_HUMIDITY_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0405"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0302",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0001",
          "0x0405"
        ]
      },
      "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": 9000,
          "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/offset",
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/humidity",
          "awake": true,
          "parse": {
            "at": "0x0000",
            "cl": "0x0405",
            "ep": 1,
            "eval": "Item.val = Attr.val + R.item('config/offset').val",
            "fn": "zcl"
          },
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0021",
          "dt": "0x20",
          "min": 3600,
          "max": 7200
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0405",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x21",
          "min": 10,
          "max": 3600,
          "change": "0x00000064"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0402",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x29",
          "min": 5,
          "max": 1800,
          "change": "0x00000014"
        }
      ]
    }
  ]
}

For information with this DDF was better for him, but haven’t worked, perhaps something bad with refresh.interval

New disconnected device:

So after 16 days, we have: from 3 sonoff snesors + 1 button (not seen in the image), 2 of them are disconnected right now.

Do we still recommend using sonoff with deconz?

That’s why I opened this: Update Sonoff_SNZB-01.md by lupa18 · Pull Request #1036 · blakadder/zigbee · GitHub

Something is not smelling good, here, or there at:

Please could anyone help on put advice to not use these devices with deconz?

It would be useful if you shared a log when it happens.

Additionally, can you share a screenshot of your deconz gui and did you try the solution Smanar proposed?

The site your linking is not the official list. Also: it is well known the sonoff sensors have this issue. I’m a happy user of the door sensors but it seems om one of the few.

Hi @Mimiix thank you very much for your answer.

Where can I find the logs we need? “when it happens” is no so easy, since I don’t have a watchdog or alarm to know when they lose connnection.

I guess this is the screenshot you ask for:

As you can see, I lost connection of almost all of them (only 1 sensor connected, and the xiaomi sensor).

Where is the official list? They say they has them listed because deconz has them listed. So it’s supposed they work (because documentation) but everybody knows they doesn’t work (because are buggy).

How are the connections when they are connected?

If devices are supported by code, they work. If they have connection issues, it’s the devices firmware and not the implementation. Therefore, the firmware is probably buggy.

In #deconz you can find out how to make logs.

Connections have star topology and “Configuration tool 1” is the center.

What “devices are supported by code” mean? Yes they initially work, then after some days get disconnected, so from my POV doesn’t work. Now, know why it happens is another issue. Would you use for your pacemaker? They work! (I wouldn’t).

Now I opened the log console, but not sure when the next (last) sensor will disconnect. I can connect disconnected ones to raise the probability of disconnection, what do you think?

Jut to be sure all your multi sensor are “SNZB-02” ?
Have you tried a custom DDF ( need to re-inclkude the device for deconz set new value) ?

Yes, the 2 multi-sensor are SNZB-02, then 1 switch WB-01 and a door sensor SNZB-04.

Not sure what DDF mean. Device Definition File? How can I build a custom one?

Your not reading my message.

Can you share a screenshot where the devices are connected. I am wondering about their signal strength.

If a device has shitty firmware, nothing can be done by deconz.

Please read what Smanar previously said.

Or you can use a text editor, only the multi sensor have one.

Additional thought, as I seem to have the same issue:

I have the same problem after more than one year without any problem with the Multisensors for temperature and humidity from SONOFF (eWeLink in Phoscon, Version 20211103).

The only modification is a change from bare metal installation to the docker image ( deconzcommunity/deconz) on the same physical host with unmodified locations of the sensors. I use the same database as before and all devices are reachable after starting the container. The version I used before is as far as I see the same as before:

2.22.01 / 19.9.2022
Firmware 26720700

I did not have any local device json definition.
Docker host is as before a RasperryPiOS 64bit, but I changed from Bullseye to Bookworm.

The SONOFF sensors disappear after a couple of minutes/ hours.
I have a lot of sequences like this one in the log:

08:10:39:957 ZCL attribute report 0xA4C138B7C6A60A65 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
08:10:40:948 ZCL attribute report 0xA4C138B7C6A60A65 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
08:10:52:741 ZCL attribute report 0xA4C13852F07C2609 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
08:10:56:248 ZCL attribute report 0xA4C138BF82DB9D32 for cluster: 0x0702, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
08:11:20:787 ZCL attribute report 0xA4C13852F07C2609 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
08:11:20:813 ZCL attribute report 0xA4C13852F07C2609 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
08:11:22:473 ZCL attribute report 0x001788010BD1AF3B for cluster: 0x0400, ep: 0x02, frame control: 0x08, mfcode: 0x0000 
08:11:31:109 ZCL attribute report 0x04CD15FFFE3BADB6 for cluster: 0x0201, ep: 0x01, frame control: 0x0C, mfcode: 0x1246 
08:11:35:737 ZCL attribute report 0xA4C13852F07C2609 for cluster: 0x0702, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
08:11:37:153 ZCL attribute report 0x001788010BD1AB27 for cluster: 0x0400, ep: 0x02, frame control: 0x08, mfcode: 0x0000 
08:11:37:478 ZCL attribute report 0x04CD15FFFE36F28F for cluster: 0x0204, ep: 0x01, frame control: 0x0C, mfcode: 0x1246 
08:11:38:469 ZCL attribute report 0xF4B3B1FFFE00096C for cluster: 0x0405, ep: 0x01, frame control: 0x08, mfcode: 0x0000 
08:11:41:001 ZCL attribute report 0x04CD15FFFE36F28F for cluster: 0x000A, ep: 0x01, frame control: 0x08, mfcode: 0x0000 
08:11:50:252 ZCL attribute report 0x84B4DBFFFE973FB6 for cluster: 0x0006, ep: 0x01, frame control: 0x08, mfcode: 0x0000 
08:11:53:026 ZCL attribute report 0x001788010CDB33A6 for cluster: 0x0406, ep: 0x02, frame control: 0x08, mfcode: 0x0000 
08:11:56:284 ZCL attribute report 0x04CD15FFFE3BADB6 for cluster: 0x0204, ep: 0x01, frame control: 0x08, mfcode: 0x0000 
08:12:03:684 skip binding for attribute reporting of ep: 0x00 cluster 0x0000 (end-device might sleep)

Best regards
Christian

Can you please open an seperate forum post with logs as requested in #deconz ?

I

Hi ! @Mimiix yes I’m reading all messages. Maybe I’m not understanding your particular and technical languages. Sorry. I read all again and not sure what DDF mean and what particular thing I must read from @Smanar

I will re link all devices and share the screenshot again

If a device has a shitty firmware is due to sonoff who sell them not mine :man_shrugging:

Here is the screenshot:

@lupa18 can be easy as you have access to the GUI DDF cheat sheet · dresden-elektronik/deconz-rest-plugin Wiki · GitHub

But there is more than just 1 edition on the DDF, you can try to mimic it, with removing/adding option.
But if you have direct access to file (not using docker), better to use a text editor direclty to edit the file “devices/sonoff/snzb-02-multisensor.json”

Warning the DDF is only for eWeLink/TH01 or SONOFF/SNZB-02D

Else you need to create a new one.

I can make a new one if you give me the manufacture/model id you want to test.