dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.89k stars 496 forks source link

Since 2.13.04 No Motion detection for CentraLite Motion Sensor-A #5601

Closed cralar closed 7 months ago

cralar commented 2 years ago

Describe the bug

Since the last Update, my motion sensors are just reporting temperature and battery status. I already repaired the Sensors with any change. I have this issue with osram smart + motion sensors and Sonoff motion sensors.

Help us understand the issue by providing valuable context.

Steps to reproduce the behavior

If the problem is reproducable, list the steps here:

  1. Update to 2.13.04
  2. Paire Motion Sensors
  3. Successfully pair sensors, but just battery state and temperature
  4. Observed error

Expected behavior

Screenshots

image

Environment

image

deCONZ Logs

Mimiix commented 2 years ago

https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Xiaomi:-Lost-devices-or-functional-issues

Can you check that?

cralar commented 2 years ago

Yes i checked, didn´t helped. image image

cralar commented 2 years ago

The Sonsors are the whole time in a connected state, its the motion detection which is not showing up. I already repaired all devices.

cralar commented 2 years ago

I see in Deconz both sensor types are reading the occupancy sensor image But in phoscon the occupancy is missing image

Mimiix commented 2 years ago

What does the rest api show?

cralar commented 2 years ago

How can i check this?

Mimiix commented 2 years ago

https://dresden-elektronik.github.io/deconz-rest-doc/getting_started/

cralar commented 2 years ago

Not getting too much. image

I sent the get through my pc in the same local network. Deconz is running in a container on a intel NUC. I am using the supervisored hass.io Installation

cralar commented 2 years ago

I get this if i open the url image

Mimiix commented 2 years ago

You need to use the ip of the device running deconz.

cralar commented 2 years ago

i got the IP, its the same you saw above. I ran the same command via cli and this is the right IP of my deconz device

cralar commented 2 years ago

OK, so i have now the API Key

curl -X POST -H "Content-Type: application/json" -d '{ "devicetype": "my application" }' http://172.30.33.0:40850/api [{"success":{"username":"XXXXXXXX"}}]

cralar commented 2 years ago

This is the API respose of the sensors

Osram Motion sensor

"43": {
    "config": {
        "battery": 80,
        "offset": 0,
        "on": true,
        "reachable": true
    },
    "ep": 1,
    "etag": "9be4566eabc53614652517e2e44fccd5",
    "lastannounced": null,
    "lastseen": "2021-12-23T21:19Z",
    "manufacturername": "CentraLite",
    "modelid": "Motion Sensor-A",
    "name": "Motion Sensor",
    "state": {
        "lastupdated": "2021-12-23T21:19:04.049",
        "temperature": 2412
    },
    "type": "ZHATemperature",
    "uniqueid": "00:0d:6f:00:0f:7f:60:4f-01-0402"
},

Sonoff Motion Sensor

"44": {
    "config": {
        "battery": 80,
        "offset": 0,
        "on": true,
        "reachable": true
    },
    "ep": 1,
    "etag": "4a8fab6e50797ace81fdd02e1d09de63",
    "lastannounced": null,
    "lastseen": "2021-12-23T21:19Z",
    "manufacturername": "CentraLite",
    "modelid": "Motion Sensor-A",
    "name": "motion.sonoff",
    "state": {
        "lastupdated": "2021-12-23T21:17:52.536",
        "temperature": 2338
    },
    "type": "ZHATemperature",
    "uniqueid": "00:0d:6f:00:0f:bf:9a:f9-01-0402"
},
cralar commented 2 years ago

So far i can´t find type ZHAPresence in the list of sensors, shouldn´t it be listed as its own sensor?

cralar commented 2 years ago

Can you add sensors via API? Maybe it would be an idea to add the missing sensor manually?

Smanar commented 2 years ago

No more users with this issues ?

You have changed a special setting on DDF setting ?

Can you add sensors via API? Maybe it would be an idea to add the missing sensor manually?

It s possible using DDF file, but your device is a little strange, it use IAS cluster on an endpoint, and the presence cluster on a second endpoint ? From the code It seem deconz ignore the second one

        else if (*i == OCCUPANCY_SENSING_CLUSTER_ID)
        {
            if (sensor->modelId() == QLatin1String("Motion Sensor-A"))
            {
                continue; // use ias zone cluster
            }
            val = sensor->getZclValue(*i, 0x0000); // occupied state
        }

You are sure don't have a ZHAalarm sensor somewhere ? (Not a ZHAPresence)

cralar commented 2 years ago

Hi and happy new year!

thank you for your reply. I got two out of the three sensors to work. I notice two sensors /Nodes in Deconz, i deleted these and was able to pair them successfully again.

"50": { "config": { "battery": 90, "offset": 0, "on": true, "reachable": true }, "ep": 1, "etag": "842c11d07ea28331a9b7e4daf8d9f359", "lastannounced": null, "lastseen": "2022-01-01T17:45Z", "manufacturername": "CentraLite", "modelid": "Motion Sensor-A", "name": "motion.kitchen", "state": { "lastupdated": "2022-01-01T17:45:03.197", "temperature": 2277 }, "type": "ZHATemperature", "uniqueid": "00:0d:6f:00:0f:7f:60:4f-01-0402" }, "51": { "config": { "battery": 90, "duration": 60, "enrolled": 1, "on": true, "pending": [], "reachable": true }, "ep": 1, "etag": "e437240eb6f82fb8975fc79e948e0678", "lastannounced": null, "lastseen": "2022-01-01T17:45Z", "manufacturername": "CentraLite", "modelid": "Motion Sensor-A", "name": "motion.kitchen", "state": { "lastupdated": "2022-01-01T17:20:16.657", "presence": false }, "type": "ZHAPresence", "uniqueid": "00:0d:6f:00:0f:7f:60:4f-01-0500" },

Take Motion.kitchen for example, same sensor and now i got two nodes with the same UniqueID but different ending -01-0402 for ZHATemperature -01-0500 for ZHAPresence

Always in the same order, first Temp then motion.

But i have still the third sensor, same model osram + motion and i can´t figure out why i can´t get it running

"47": { "config": { "battery": 80, "offset": 0, "on": true, "reachable": true }, "ep": 1, "etag": "400cf0c33a2cf06c001d62baf9c3e6b2", "lastannounced": null, "lastseen": "2022-01-01T17:46Z", "manufacturername": "CentraLite", "modelid": "Motion Sensor-A", "name": "motion.desk", "state": { "lastupdated": "2022-01-01T17:42:52.343", "temperature": 2060 }, "type": "ZHATemperature", "uniqueid": "00:0d:6f:00:0f:bf:9a:f9-01-0402" }, "5": { "config": {

PS All sensors worked before the metioned update.

Smanar commented 2 years ago

So re-include the device make them works again ? And I realy don't see a difference with the not working one .... Can you try to keep it awake during the inclusion ? generaly with short press on the reset button ? Or if you have the GUI make the inclusion with it

cralar commented 2 years ago

No Luck.

manup commented 2 years ago

I have this sensor in my bathroom, here it works regardless of deCONZ version. From the description above it looks like the ZHAPresence resource was lost somehow?

I'll create a DDF for the sensor, should be pretty simple in this case and solve above issue in future too.

cralar commented 2 years ago

Hi Manup, excuse my noobish question, but i check on the sensor by edit DDF and it seems it got already the ZHAPresence. image

image

Seems like phoscon is somehow not getting the presence sensor from deconz. I can´t really wrap my head around, why on this sensor and not on the others.

Mimiix commented 2 years ago

@rnagler01 you need to put the status on "bronze" otherwise it won't get loaded.

cralar commented 2 years ago

Hi, alright i changed and saved it image But still noh luck. I repaired the sensor unluckily no change.

Is there something else i can check?

Mimiix commented 2 years ago

What does the api show?

cralar commented 2 years ago
    "config": {
        "battery": 80,
        "duration": 60,
        "enrolled": 1,
        "on": true,
        "pending": [],
        "reachable": true
    },
    "ep": 1,
    "etag": "7be4f7f88008253b6df1695c40bc4097",
    "lastannounced": null,
    "lastseen": "2022-01-03T19:54Z",
    "manufacturername": "CentraLite",
    "modelid": "Motion Sensor-A",
    "name": "motion.wc",
    "state": {
        "lastupdated": "2022-01-03T19:55:23.310",
        "presence": false
    },
    "type": "ZHAPresence",
    "uniqueid": "00:0d:6f:00:0f:bf:9a:f9-01-0500"
},
"47": {
    "config": {
        "battery": 80,
        "offset": 0,
        "on": true,
        "reachable": true
    },
    "ep": 1,
    "etag": "12e0d9699e39d585fc16ae602cdc95de",
    "lastannounced": null,
    "lastseen": "2022-01-03T19:54Z",
    "manufacturername": "CentraLite",
    "modelid": "Motion Sensor-A",
    "name": "motion.wc",
    "state": {
        "lastupdated": "2022-01-03T19:54:35.412",
        "temperature": 2052
    },
    "type": "ZHATemperature",
    "uniqueid": "00:0d:6f:00:0f:bf:9a:f9-01-0402"
},

},
"50": {
    "config": {
        "battery": 90,
        "offset": 0,
        "on": true,
        "reachable": true
    },
    "ep": 1,
    "etag": "fa842ddaa4ef753fc5ee6080c3bf75f1",
    "lastannounced": null,
    "lastseen": "2022-01-03T19:55Z",
    "manufacturername": "CentraLite",
    "modelid": "Motion Sensor-A",
    "name": "motion.kitchen",
    "state": {
        "lastupdated": "2022-01-03T19:55:17.835",
        "temperature": 2297
    },
    "type": "ZHATemperature",
    "uniqueid": "00:0d:6f:00:0f:7f:60:4f-01-0402"
},
"51": {
    "config": {
        "battery": 90,
        "duration": 60,
        "enrolled": 1,
        "on": true,
        "pending": [],
        "reachable": true
    },
    "ep": 1,
    "etag": "fa842ddaa4ef753fc5ee6080c3bf75f1",
    "lastannounced": null,
    "lastseen": "2022-01-03T19:55Z",
    "manufacturername": "CentraLite",
    "modelid": "Motion Sensor-A",
    "name": "motion.kitchen",
    "state": {
        "lastupdated": "2022-01-03T19:51:14.553",
        "presence": true
    },
    "type": "ZHAPresence",
    "uniqueid": "00:0d:6f:00:0f:7f:60:4f-01-0500"
},

},
"62": {
    "config": {
        "battery": 80,
        "offset": 0,
        "on": true,
        "reachable": true
    },
    "ep": 1,
    "etag": "67f1c113814257a1a9400f3abc8d6b35",
    "lastannounced": null,
    "lastseen": "2022-01-03T19:55Z",
    "manufacturername": "CentraLite",
    "modelid": "Motion Sensor-A",
    "name": "Motion Sensor",
    "state": {
        "lastupdated": "2022-01-03T19:52:42.378",
        "temperature": 2254
    },
    "type": "ZHATemperature",
    "uniqueid": "00:0d:6f:00:11:08:79:2b-01-0402"
},

The Last Sensor ist the metioned one ("name": "Motion Sensor",), above are same model sensors which are working find, after the workaround i did.

Smanar commented 2 years ago

It s this one ?

    "config": {
        "battery": 80,
        "duration": 60,
        "enrolled": 1,
        "on": true,
        "pending": [],
        "reachable": true
    },
    "ep": 1,
    "etag": "7be4f7f88008253b6df1695c40bc4097",
    "lastannounced": null,
    "lastseen": "2022-01-03T19:54Z",
    "manufacturername": "CentraLite",
    "modelid": "Motion Sensor-A",
    "name": "motion.wc",
    "state": {
        "lastupdated": "2022-01-03T19:55:23.310",
        "presence": false
    },
    "type": "ZHAPresence",
    "uniqueid": "00:0d:6f:00:0f:bf:9a:f9-01-0500"
},

No ? so it is in the API.

cralar commented 2 years ago

No, its this one }, "62": { "config": { "battery": 80, "offset": 0, "on": true, "reachable": true }, "ep": 1, "etag": "67f1c113814257a1a9400f3abc8d6b35", "lastannounced": null, "lastseen": "2022-01-03T19:55Z", "manufacturername": "CentraLite", "modelid": "Motion Sensor-A", "name": "Motion Sensor", "state": { "lastupdated": "2022-01-03T19:52:42.378", "temperature": 2254 }, "type": "ZHATemperature", "uniqueid": "00:0d:6f:00:11:08:79:2b-01-0402" },

motion.kitchen motion.wc are the two working osrams

sn0wf4ke commented 2 years ago

I have the same problems with this sensor. I edited the DDF manualy as shown: image

but in the api these changes are not reflected:

image

Smanar commented 2 years ago

The temperature sensor is reliable ? And if you remove the ZHATemperature in the DDF to try ? Same result if you are setting phoscon (add new sensor) in permit jon and making "hot reload" ? Nothing special in log with "info" and "ddf" ?

Edit: There is a link to the DDF somewhere ?

ronaldt80 commented 2 years ago

Same issue here, I have 3 of these sensors on my deconz network - worked ok for the past two years. Yesterday following a network collapse (ZigBee mesh was offline for 6hrs+) I had to repair 1 of the 3. Result is same as above, no motion, only temperature. Oddly though the two others work as intended.

ronaldt80 commented 2 years ago

Update - I rolled back to 2.12.06, repaired the sensor, motion recognized, upgraded back to 2.13.04 and sensor is still there working as intended.

sn0wf4ke commented 2 years ago

for me it is the same ... took docker image for 2.12.06 and paired the sensor without any hassle. only the version string is the strange "????????????????????????" ... but the sensor works as expected

ahielg commented 2 years ago

Update - I rolled back to 2.12.06, repaired the sensor, motion recognized, upgraded back to 2.13.04 and sensor is still there working as intended.

Did you rolled back the conbee stick firmware too?

sn0wf4ke commented 2 years ago

no... only the deconz software

ahielg commented 2 years ago

what is your stick firmware version?

ronaldt80 commented 2 years ago

No, I installed the current stable fw already as part of 12.06; I did see however (ha community forum) that some people solved (other) pairing issues by reinstalling the fw

ronaldt80 commented 2 years ago

26720700

Smanar commented 2 years ago

I don't think on my side the firmware have an impact on this issue

I have probably find something, if the devive work with the first endpoint

                    else if (modelId.startsWith(QLatin1String("PIR_")) ||             // Heiman motion sensor
                             modelId.startsWith(QLatin1String("PIRS")) ||             // Heiman motion sensor (newer model)
                             modelId == QLatin1String("3AFE14010402000D") ||          // Konke motion sensor
                             modelId == QLatin1String("3AFE28010402000D") ||          // Konke motion sensor ver.2
                             modelId == QLatin1String("SWO-MOS1PA") ||                // Swann One Motion Sensor
                             modelId == QLatin1String("motion") ||                    // Samjin motion sensor
                             modelId == QLatin1String("ZB-MotionSensor-D0003") ||     // Linkind motion sensor
                             modelId == QLatin1String("3041") ||                      // NYCE motion sensor
                             modelId == QLatin1String("CCT595011_AS") ||              // LK Wiser Motion Sensor
                             modelId.startsWith(QLatin1String("902010/22")) ||        // Bitron motion sensor
                             modelId.startsWith(QLatin1String("SN10ZW")) ||           // ORVIBO motion sensor
                             modelId.startsWith(QLatin1String("MOSZB-1")) ||          // Develco motion sensor
                             modelId.startsWith(QLatin1String("MotionSensor51AU")) || // Aurora (Develco) motion sensor
                             modelId.startsWith(QLatin1String("MOT003")) ||           // Hive motion sensor
                             modelId == QLatin1String("DCH-B122") ||                  // D-Link DCH-B122 motion sensor
                             modelId == QLatin1String("4in1-Sensor-ZB3.0") ||         // Immax NEO ZB3.0 4 in 1 sensor E13-A21
                             modelId == QLatin1String("GZ-PIR02") ||                  // Sercomm motion sensor
                             modelId == QLatin1String("E13-A21") ||                   // Sengled E13-A21 PAR38 bulp with motion sensor
                             modelId == QLatin1String("TS0202") ||                    // Tuya generic motion sensor
                             modelId == QLatin1String("TY0202") ||                    // Lidl/Silvercrest Smart Motion Sensor
                             modelId == QLatin1String("LDSENK10") ||                  // ADEO - Animal compatible motion sensor
                             modelId == QLatin1String("66666") ||                     // Sonoff SNZB-03
                             modelId == QLatin1String("MS01") ||                      // Sonoff SNZB-03
                             modelId == QLatin1String("MSO1") ||                      // Sonoff SNZB-03
                             modelId == QLatin1String("ms01"))                        // Sonoff SNZB-03
                    {
                        fpPresenceSensor.inClusters.push_back(ci->id());
                    }

I don't see it in the list Someone is able to compile code to test a change ? Or better is someone can make a DDF file (Or can give at least a start, to finish it) ?

    "type": "ZHAPresence",
    "uniqueid": "00:0d:6f:00:0f:7f:60:4f-01-0500"

All working device always finishing by 01-500 ? Never 02-0406 ?

cralar commented 2 years ago

Check my comments above, i already try to edit the DDF, without any success. And yes Sensors ending with 01-500 Presence and the other Temp.

ronaldt80 commented 2 years ago

This seems to be a sonoff one, mine is an OSRAM /centralite sensor.

The Sonoff sensors never worked for me on deconz, I do have them working with ZHA.

Smanar commented 2 years ago

Can you share your DDF to take a look ? Someone is able to compile the code to test a change ? (need a linux OS with full/real OS)

cralar commented 2 years ago

No, the sonoff are working, but i have the osram in use as well. Two are working again, after deleting some ghost in deconz. But one sensor this issue the whole time. I will share quickly the DDF

cralar commented 2 years ago

The DDF image image image

image

So far i understand the system, if you look in deconz the sensor is complete, temp and presence.

But if you check in phoscon, then you have just the Temp sensor.

Smanar commented 2 years ago

Just to be sure All devices have

"manufacturername": "CentraLite",
"modelid": "Motion Sensor-A",

There is a missing part on the DDF, but you have "type": "$TYPE_PRESENCE_SENSOR", and "type": "$TYPE_TEMPERATURE_SENSOR", ?

cralar commented 2 years ago

Just to be sure All devices have

"manufacturername": "CentraLite",
"modelid": "Motion Sensor-A",

Yes thats True

There is a missing part on the DDF, but you have "type": "$TYPE_PRESENCE_SENSOR", and "type": "$TYPE_TEMPERATURE_SENSOR", ?

Yes in the DDF are both.

github-actions[bot] commented 2 years ago

As there has not 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.

github-actions[bot] commented 2 years ago

As there has not 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 is not solved, request to get this opened again.

trollsoft7 commented 1 year ago

Hello, ran in the same problem with 2 CentraLite Motion sensors. Only temperature and battery is updated. Motion is detected (green flash on device), but not reflected in the Phoscon. Deleting and re-adding the sensor didn't help. Any advice? Thx a lot!

ronaldt80 commented 1 year ago

Still have the issue with deconz as well. Moved all my centralite sensors over to my other zigbee network on ZHA.. there they work.

TungstenE2 commented 8 months ago

Hello, ran in the same problem with 2 CentraLite Motion sensors. Only temperature and battery is updated. Motion is detected (green flash on device), but not reflected in the Phoscon. Deleting and re-adding the sensor didn't help. Any advice? Thx a lot!

Same here, after repairing, no motion as data point any more, but green light on sensor.

Older motion sensor without repair still working.

In FHEM I see 2 new HUE devices

35: Bewegungsmelder [HUESensor35] ZHAPresence
36: Temperature 36 [HUESensor36] ZHATemperature

Seems ZHAPresence is missing the motion state.

grafik

grafik

grafik

grafik

deconz version 2.24.2