homebridge-gpio-wpi2 icon indicating copy to clipboard operation
homebridge-gpio-wpi2 copied to clipboard

MotionSensor not working

Open dcaccount opened this issue 6 years ago • 6 comments

Hello, I have tried to configure an input pin as MotionSensor. My config.json file looks like:

{ "type":"MotionSensor", "name" : "Input 1 - BCM 26", "pin" : 26, "enabled" : "true", "mode" : "in", "pull" : "off" }

Unfortunately it is always seen by HomeKit as contact sensor and not as motion sensor.

What am I doing wrong? How can I achieve this?

Please advise. Thanks, dan

dcaccount avatar May 24 '18 20:05 dcaccount

That’s my fault - I haven’t published the latest changes in Git to NPM. I need to test and publish, but am severely limited for time at the moment.

If you pull the code directly from GitHub, the “type” config should work. On Thu, 24 May 2018 at 21:07, dcaccount [email protected] wrote:

Hello, I have tried to configure an input pin as MotionSensor. My config.json file looks like:

{ "type":"MotionSensor", "name" : "Input 1 - BCM 26", "pin" : 26, "enabled" : "true", "mode" : "in", "pull" : "off" }

Unfortunately it is always seen by HomeKit as contact sensor and not as motion sensor.

What am I doing wrong? How can I achieve this?

Please advise. Thanks, dan

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rsg98/homebridge-gpio-wpi2/issues/50, or mute the thread https://github.com/notifications/unsubscribe-auth/ARe_tdOkVfaYEhpwkTwHgk8aa224MzSnks5t1xLqgaJpZM4UM5td .

rsg98 avatar May 25 '18 05:05 rsg98

Thanks for replying.

I will wait for final tests!

Dan

dcaccount avatar May 25 '18 05:05 dcaccount

Hello, When do you expect to publish lastest changes?

Ps, thanks for your great work! Dan

dcaccount avatar May 25 '18 06:05 dcaccount

Latest version published as beta on npm now...

npm i homebridge-gpio-wpi2@beta

Should get it installed for you. Apologies - I have very little time at the moment, so progress is slow. If people can confirm it's working for them, I'll move it from beta to latest.

rsg98 avatar Jun 19 '18 14:06 rsg98

Hi @rsg98 I have the same issue. I did try the latest changes (beta) but the only difference is that by default the sensor is now closed instead of open, but the type is still Contact Sensor even if the config file says "MotionSensor". Motion Sensor type does not show in the list of available type, see attached screenshot. img_8b85dcf693e2-1

Thanks in advance for your help

francescopetrungaro avatar Jun 22 '18 14:06 francescopetrungaro

Update...

  • removed old lib
  • removed all sensors from config.json
  • restarted
  • re-added back all sensors changing pins
  • cleared cache
  • restarted
  • Motion Sensor detected

ALL WORKING!!!

francescopetrungaro avatar Jun 22 '18 18:06 francescopetrungaro