0.0.5 • Published 8 years ago
zclip-rd v0.0.5
zclip-rd
A ZCL over IP Resource Directory implementation.
Based on CoRE Resource Directory.
Note: This server works with the Resource Directory Client plugin available in Simplicity Studio Thread projects.
Installation
npm install zclip-rd -gStarting the server
zclip-rd [options]options:
--port <port>Specify listener port.--ipv4Open an IPv4 socket.--ipv6Open an IPv6 socket.--multicastAddress <address>Listen on multicast address.
Features
zclip-rd supports application/link-format and application/link-format+cbor.
The CoAP Accept option can be used to indicate which Content-Format is acceptable to the client. [COAP]
The following examples are in application/link-format+cbor as it is the default.
Discovery of registration endpoint
Req: GET coap://[::1]/.well-known/core?rt=core.rd
Res: 2.05 Content
[{1: "/rd"; 9: "core.rd"}]Discovery of lookup endpoint
Req: GET coap://[::1]/.well-known/core?rt=core.rd-lookup-res
Res: 2.05 Content
[{1: "/rd-lookup/res"; 9: "core.rd-lookup-res"}]Lookup
Supported Queries: rt, ep, ze, if
coap://<serverIp>/rd-lookup?rt=urn:zcl:c.6.s
coap://<serverIp>/rd-lookup?ep=ni:///sha-256;AAAAAAAAA
coap://<serverIp>/rd-lookup?ze=urn:zcl:d.101.1
coap://<serverIp>/rd-lookup?ze=urn:zcl:c.v1Wildcards: All attributes support wildcards
coap://<serverIp>/rd-lookup?rt=urn:zcl:c*
coap://<serverIp>/rd-lookup?ep=ni:///sha-256;*
coap://<serverIp>/rd-lookup?ze=urn:zcl:d.*
coap://<serverIp>/rd-lookup?ze=urn:zcl:c.*Lookup Paging
coap://<serverIp>/rd-lookup?rt=urn:zcl:c.*&page=0&count=5Run the tests
npm test