node-red-contrib-huemagic icon indicating copy to clipboard operation
node-red-contrib-huemagic copied to clipboard

Motion Activity broken with V4.2.2 (4.2.1 is OK)

Open spacewalker0815 opened this issue 2 years ago • 6 comments

Hello, unfortunately the new version 4.2.2 does not work for me. The motion function is disturbed.

I have two Philis Hue Motion sensors and switch with each of them a KNX lamp. The function msg.payload.motion does not provide correct values anymore. After restarting the node, the function returns once or twice the correct value (true / false) but stops the operation at some point, without error message. Then it reports no motion at all although the sensor works correctly.

In version 4.2.1 (I deleted the module and installed it against the old version) everything works again without any change.

Is the problem known ?

Tomas

spacewalker0815 avatar Jul 09 '22 12:07 spacewalker0815

Hello, I have a very similar problem. In my case, the switch accessories (both tab switch and dimmer switch) stop working after about 10 second. Only a re-deploy of the flow will let it work for the next 10 seconds. No error messages are given.

I installed v4.2.1 via

cd ~/.node-red npm uninstall [email protected] npm install [email protected]

everything works again.

Please check, what's going on here! Many thanks in advance!

jankokert avatar Jul 11 '22 18:07 jankokert

When I check the code differences from V4.2.1 to 4.2.2 ( https://github.com/Foddy/node-red-contrib-huemagic/commit/1473baae947bac9cf14b5aa0d360fdbc84f79ca4#diff-2506f6042d7e0a3f37030320ae9bf2a87e9b7b11b8b081102cf4facec664d0d6 ) there are some changes with a watchdog and there is a timeout of 10.000ms (=10s) defined. I think there is the issue...

jankokert avatar Jul 11 '22 19:07 jankokert

I confirm that motion events are not working in 4.2.2 :(

Except that downgrading to 4.2.1 nor to 3.0.0 did not solve the problem. I think something might have changed on the bridge with an update.

My bridge version is: swversion: "1953188020" apiversion: "1.53.0"

JSON returned by the bridge:

{
  sensors: {
    "1": {
      state: {
        presence: true,     // motion has been activated
        lastupdated: "2022-10-14T06:47:15"
      },
      swupdate: {
        state: "noupdates",
        lastinstall: "2019-09-02T12:22:50"
      },
      config: {
        on: true,
        battery: 1,
        reachable: true,
        alert: "lselect",
        ledindication: false,
        usertest: false,
        sensitivity: 2,
        sensitivitymax: 2,
        pending: array[0]
      },
      name: "My Sensor",
      type: "ZLLPresence",
      modelid: "SML001",
      manufacturername: "Signify Netherlands B.V.",
      productname: "Hue motion sensor",
      swversion: "6.1.1.27575",
      uniqueid: "xx:xx:xx:xx:xx:xx:xx:xx-xx-xxxx",    // stripped
      capabilities: {
        certified: true,
        primary: true,
      }
    }
  }
}

Hope this helps.

adams-family avatar Oct 14 '22 06:10 adams-family

For the time being I've created a fork and applied some fixes that should solve these issues. I have published it as a new node-red node contrib. You can find it as node-red-contrib-huemagic-fork.

mauricedominic avatar Oct 28 '22 21:10 mauricedominic

@mauricedominic great! I would like to use your fork but I cannot install it from node red it tells me it conflict with the original extension.

Is there a way to install it manually and "remove the old one" without having to reimport all my workflows etc ?

(via npm commands evtl?) Thank you

sebastienvermeille avatar Nov 06 '22 10:11 sebastienvermeille

@mauricedominic great! I would like to use your fork but I cannot install it from node red it tells me it conflict with the original extension.

Is there a way to install it manually and "remove the old one" without having to reimport all my workflows etc ?

(via npm commands evtl?) Thank you

Here below the steps you could take in order to use the fork contrib without having to re-create all of them:

  1. Create a backup of all flows that refer to the huemagic nodes
  2. Remove all the huemagic related flows
  3. Remove all the huemagic related configuration nodes
  4. Deploy all changes
  5. Remove the original huemagic nodes contrib
  6. Install the huemagic fork nodes contrib
  7. Import the backup created in step 1
  8. Deploy all changes

Cheers!

mauricedominic avatar Nov 06 '22 12:11 mauricedominic