Goes in production mode NOW!

Hi Bob,

I need your help :relaxed:

Is are the follows steps right:

(I use two circuits tamper :laughing:)

  1. Close your perimeter circuit(s) (enclosure lid)
    –> Close case, channel 1 and 2, circuit closed

  2. Clear Perimeter Detect Events
    –> zymkey.client.clear_perimeter_detect_info()

  3. Get Perimeter Detect Info to confirm prior events are cleared and the perimeter is closed.
    –> zymkey.client.get_perimeter_detect_info()

  4. If the Perimeter Detect Event returns clear, then you can ‘arm your system’ as you require by setting Set Perimeter Event Actions to “none”, “notify” or “selfdestruct”
    –> zymkey.client.set_perimeter_event_actions(0, action_notify=False, action_self_destruct=True)
    –>zymkey.client.set_perimeter_event_actions(1, action_notify=False, action_self_destruct=True)

Do I not need to perform step 12 before cutting the tab?

Is it possible when the system is armed to set the settings back to alarm only?

How can I read the values from the command:

–> zymkey.client.set_perimeter_event_actions(0, action_notify=False, action_self_destruct=True)
–>zymkey.client.set_perimeter_event_actions(1, action_notify=False, action_self_destruct=True)

I would like to query what values are stored in the module.

Thanks :smiley:

Mara

Hi Mara,

The Getting Started page (https://community.zymbit.com/t/getting-started-zymkey4i-with-raspberry-pi/202 has the detailed steps on it for review.

You do not need to do Step 12 before cutting the tab. In fact, you want to do it after. You get one time to set_perimeter_event_actions after cutting the tab. One and only one. You cannot change the settings after that.

There is also no way to read the settings back.

The flow is:

  • Set perimeter actions to None or Notify
  • Power down.
  • Cut the lock tab.
  • Close circuits and case
  • Power up
  • Clear perimeter events
  • Check perimeter events to make sure no events
  • Arm your system by setting to desired Action: Notify or Self-Destruct.

The Action is now permanent. The Action cannot be changed again.

Bob

1 Like

Hi Bob,

the manual is not detailed for me because you have to look up the commands in the manual. I assume the ones I have listed are correct for the step?

I would be happy if I can read the module status:
Mode: Production / Dev
Operating: Run / Stop / Fail
Tamper Protect: Notify / Selfdest

Do I have to set at channels at the end:
->zymkey.client.set_perimeter_event_actions(0, action_notify=False, action_self_destruct=True)
->zymkey.client.set_perimeter_event_actions(1, action_notify=False, action_self_destruct=True)
?

For me the procedure here is just too little documented…

Mara

Hi Mara,

Getting module status was intentionally made difficult originally for security reasons. More customers have been asking for that information so we are going to add more of that functionality into a future release of our APIs. In the meantime, here is how you can get some of the info:

nc localhost 9539

Returns some status information that includes whether the Zymkey is in Production mode or Developer mode. Check the setting of “bind_locked”: True means the Zymkey is in Production mode; False is Developer mode.

systemctl status zkifc

Will tell you if the Zymkey is Active(Running) or Inactive(Dead).

Unfortunately, there is no way to retrieve the Tamper Detect setting at this time. The “get” for that setting will be included in a future API release.

After cutting the tab, you want to clear the events, check to make sure you are not getting any events, and then set_perimeter_event_actions. You will have to set_perimeter_event_actions at the end. Keep in mind, like I said earlier, after cutting the lock tab, you can only set the event action one time. You cannot change the settings. That prevents someone coming in later and turning off self-destruct.

Yes, your commands are correct to set self-destruct on for both channels.

Bob

1 Like

Hi Bob,

thanks for you inputs!

When coming the new zymkey and api? Does the new component have the same dimensions?

–> nc localhost 9539
How do I put the command to get only this answer: “bind_locked”: false

Thanks and happy holidays :hugs:

Mara

We should have the new APIs out in January/February. The form factor will be the same.

This command should give you what you want. You can probably come up with a better way to do it:

echo -n "Bind Locked: "; echo "" | nc localhost 9539 | sed -n -e 's/^.*"bind_locked": //'p | cut -d"'" -f1

1 Like

Thanks! :relaxed:

my output is

Bind Locked: true, “status”: “success”}}

too much: , “status”: “success”}}

I modifiy this for my output:
echo -n "Bind Locked: "; echo "" | nc localhost 9539 | sed -n -e 's/^.*"bind_locked": //'p | cut -d"," -f1
→ Bind Locked: true

Is the new API compatible to Zymkey 4?

Woops! I mistyped the comma. Glad you fixed.

Yes, the new API functions will be compatible with the existing Zymkey4.

What is here false:

zymkey.client.set_perimeter_event_actions(0, action_notify=False, action_self_destruct=True)

Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python3.7/dist-packages/zymkey/module.py”, line 895, in set_perimeter_event_actions
raise AssertionError(‘bad return code %d’ % ret)
AssertionError: bad return code -1

Thanks

Is it possible you were in Production Mode and have the Perimeter 0 open? If so, unfortunately you would immediately self-destruct and then get a bad return code. Is the Blue LED flashing 5 flashes in between rapid flashes? That would indicate you have self-destructed.

Bob

Thanks, perimeter are closed. The system are running. When coming the new api?

The new APIs are still a couple of weeks out.

When you say the system is running, does that mean your setup is working at this point in time? Maybe you can attach a little video of what the blue LED is doing?

Bob