Smart Home Automation Forum
KC868-A8 with Motion Sensor HC-SR501 - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-A8 (https://www.kincony.com/forum/forumdisplay.php?fid=23)
+--- Thread: KC868-A8 with Motion Sensor HC-SR501 (/showthread.php?tid=3041)



KC868-A8 with Motion Sensor HC-SR501 - vijjav - 07-06-2023

I need help connecting pir motion sensor with A8 board. Should i connect with DI 1-8 or s2, s3 terminals? 

Here is the code part I am currently using. 

Code:
switch:
  - platform: gpio
    name: "Study Room PIR"
    id: a8_study_room_pir
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 7
      mode: OUTPUT
      inverted: false

binary_sensor:
  - platform: gpio
    name: "a8_study_room_pir"
    device_class: motion
#    on_press:
#      then:
#        - switch.toggle: a8_study_room_pir
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 7
      mode: INPUT
      inverted: false



RE: KC868-A8 with Motion Sensor HC-SR501 - admin - 07-06-2023

if your PIR sensor is dry contact signal, all port can use. just DI1-8 support wire long distance, support 300 meter wire no problem. S2, S3 port by short distance.
suggest use DI1-8 port.


RE: KC868-A8 with Motion Sensor HC-SR501 - vijjav - 07-07-2023

I've connected my PIR to D8, but my output got stuck at "Cleared".

I did a wire short test between D8 and GND, no response. 

But when is short D8 with +12V , then the pir got detected and released when short is disconnected.

It is suppose to be D8 vs GND, what I am missing here?


RE: KC868-A8 with Motion Sensor HC-SR501 - admin - 07-07-2023

what D8?? DI8? it set by your PIR sensor use by "NC" or "NO". A8 digital input just use by 0v or 12v logical voltage.


RE: KC868-A8 with Motion Sensor HC-SR501 - vijjav - 07-07-2023

I use DI terminal 8 and PIR uses NO

This is the PIR sensor I am using https://components101.com/sensors/hc-sr501-pir-sensor


RE: KC868-A8 with Motion Sensor HC-SR501 - admin - 07-07-2023

change the config line:

inverted: false ----> inverted: true


RE: KC868-A8 with Motion Sensor HC-SR501 - vijjav - 07-08-2023

(07-07-2023, 11:15 PM)admin Wrote: change the config line:

inverted: false      ---->      inverted: true

I've changed the config inverted as true.

  - platform: gpio
    name: "a8_study_room_pir"
    device_class: motion
    on_press:
      then:
        - switch.turn_on: a8_study_room_pir
    on_release:
      then:
        - switch.turn_off: a8_study_room_pir
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 7
      mode: INPUT
      inverted: true


But still is not getting detected, after changing inverted as true, Motion detection is inverted when shorting D1 8 with +12 V. 

Which means when motion detected the logs says it is cleared, and motion clear inverted as detected.


RE: KC868-A8 with Motion Sensor HC-SR501 - admin - 07-08-2023

open your PIR sensor, maybe inside on PCB have jumper, it can set "NO" or "NC", you can chose it.