Lock service #
Service namespace: lock
Configuration #
Config json schema available on api/v1/device/<dev_id>/service/lock/config/schema:
curl -H "X-API-Key: <api key>" \
https://api.nr.iotready.no/api/v1/device/<dev_id>/service/lock/config/schema
Fields nolock, bistable, monostable, emz_flex, emz_payt, kerong
and nrcl are oneof type.
| Field | Type | Description |
|---|---|---|
| enable | bool | Enable/disable lock functionality |
| close_timeout_s | integer | Close timeout in seconds |
| keep_unlocked | bool | Keep in unlocked state |
| nolock | object | No lock |
| bistable | object | Bistable lock type |
| bistable.hold_ms | integer | Hold time in ms |
| monostable | object | Monostable lock type |
| monostable.hold_ms | integer | Hold time in ms |
| monostable.lock_on_s2 | bool | Lock when s2 goes low |
| monostable.lock_on_s2 | bool | Lock when s2 goes low |
| emz_flex | object | EMZ Flex lock type |
| emz_flex.hold_ms | integer | Hold time in ms |
| emz_payt | object | EMZ Payt lock type |
| emz_payt.hold_ms | integer | Hold time in ms |
| kerong | object | Kerong lock type |
| nrcl | object | NRCL lock type |
| nrcl.lock_on_s2 | bool | Lock when s2 goes low |
| nrcl.lock_on_s2 | bool | Lock when s2 goes low |
Read config with status:
curl -H "X-IOTREADY-CONFIG-NEXT-GEN: true" -H "X-API-Key: <api key>" \
https://api.nr.iotready.no/api/v1/device/<dev_id>/service/lock/config
Configure monostable lock:
curl -H "X-API-Key: <api key>" -X PUT -d '{"enable":true,"monostable":{}}' \
https://api.nr.iotready.no/api/v1/device/<dev_id>/service/lock/config/value