Motion sensor regression v4.38

Hello,

Thanks to everyone for this new release!

I have a question regarding the change mentioned below. I have 2 sensors that have been blue since the update; these are sensors that only send the value 1 when there is motion (nothing more). Is that why the display no longer updates? If so, I would need to force the sensor’s value to 0 after a specified time.

Ah, that’s a regression. We hadn’t anticipated this kind of case. I’ll look into it tomorrow to propose a fix.

3 Likes

@PhilippeMA Can you give me the model of your sensor?

One solution I see is to modify the code to do

if (lastValue \u0026\u0026 lastValueChanged \u003e now() - 1 minute) {
    return (
      \u003cspan class=\"badge badge-info\"\u003e
        \u003cText id=\"dashboard.boxes.devicesInRoom.motionDetected\" /\u003e
      \u003c/span\u003e
    );
  } else if (lastValueChanged) {
    return \u003cRelativeTime datetime={lastValueChanged} language={user ? user.language : null} futureDisabled /\u003e;
  }

If there has been a detection within the last minute (time to be decided), we display the blue tag Motion detected

If the value is 0 or the detection took place more than a minute ago

@pierre-gilles Does this work for you?

Hello,

These are 2 different sensors managed via Node-RED:
1 433MHz sensor
1 Philips Hue sensor

If the problem comes from the way I integrated them, maybe it’s more up to me to adapt?

Ah, I didn’t know they were integrated via node-red. You should check whether you receive an end-of-detection for these devices.
If that’s the case, you should send 0 to Gladys.

For the Philips one, it needs to be checked; for the 433MHz one, no.

I’ll take a look on my side in that case. Thanks @cicoub13

1 Like