Perimeter Detect : Only one perimeter loop works

Hi,

I’ve got an issue while using perimeter detect, only one of the two perimeter’s loop is working. Here are some pictures :




As you can see I used your USB connector.
Here’s the code I wrote to make sure everything was working.

import zymkey
import time

zymkey.client.clear_perimeter_detect_info()
zymkey.client.set_perimeter_event_actions(1, action_notify=True, action_self_destruct=False)
zymkey.client.set_perimeter_event_actions(0, action_notify=True, action_self_destruct=False)
zymkey.client.clear_perimeter_detect_info()
while True:
    zymkey.client.wait_for_perimeter_event()
    print(zymkey.client.get_perimeter_detect_info())
    zymkey.client.clear_perimeter_detect_info()
    time.sleep(1)

When my two perimeter loops are correctly wired, my code return an array with the first value set to current timestamp and the seconde one set to 0. Normally both values should be at zero.
And when I unpluged the P1 perimeter loop the second value of the array change to the current timestamp. But when I plug or unpluged the P2 perimeter loop the first value of the array stay at the current timestamp.

Did I do something wrong ?

Can you please post a couple of close up images of the adapter (remove from the Zymkey first). Also if there are any part number on the adapter please let us know that too.

Thanks

Hi Phil,

Thanks for answering.
I’m working with Ludwig who opened this thread, that’s why I’m currently answering on his behalf.
We’ve bought 10 of these adapters directly from Zymbit (Order #ZS1145) end of August 2019.

On the adapters, the following is written:

  • ZK4 Perim Adapter
  • Z34003-001-C1

Hereunder are some close up pictures of one of these adapters:

We have the problem with each one we tried to use so far.
Thank you in advance for your help.

Best regards,
Jacques

@squitel

OK, I think we have found the issue.

Here is the correct pin-out for this adapter - which for some reason is not on the units you received.

To close Perimeter Circuit 1: connect P1A to P1B
To close Perimeter Circuit 2: connect P2A to P2B


@phil
Thank you for your answer, we’ve tried the new wiring and it works fine !

I just have one more question, when we sets ‘permiter_event_actions’ to notify=True, where the notification is sent ? Do we have to let our sample code running to know if a perimeter events occurs or does the zymkey write this event to a file ?

Use “get_perimeter_detect_info”

Get current perimeter detect info.
This function gets the timestamp of the first perimeter detect event for the given channel
Returns
The array of timestamps for each channel for the first detected event in epoch seconds