readme: quick start, generated capability table, recipes, bridge contract, migration
The readme is rewritten for 2.0: what the library needs, install, the lamp as quick start, concepts, the table of interfaces, recipes, the bridge contract, errors, testing without Alexa, migration from 1.x and limits. scripts/capability-table.js (npm run docs) writes the table from the registry and the text of three example files into their code blocks; "Through Alexa" names only the runs of 2026-09-28, made with 1.5.2. test/readme.test.js fails on a stale table or file, runs examples/testing/lamp.test.js (MemoryPublisher, no broker) and compiles the other code blocks. package.json: description, keywords, CHANGELOG.md in files. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
a59de926a2
commit
785944b2da
6 changed files with 848 additions and 174 deletions
|
|
@ -31,6 +31,15 @@ to. Then discover the devices in the Alexa app.
|
|||
`sensor.js` and `doorbell.js` wait for the Enter key: it opens and closes the door, and rings the bell.
|
||||
`lock.js` takes `BOLT_SECONDS`, the time its bolt needs, 8 by default.
|
||||
|
||||
## Test a device without a broker
|
||||
|
||||
[testing/lamp.test.js](testing/lamp.test.js) tests a lamp with a `MemoryPublisher` and `bridge.receive()`. It needs
|
||||
no credentials and connects nowhere:
|
||||
|
||||
```sh
|
||||
node examples/testing/lamp.test.js
|
||||
```
|
||||
|
||||
## What was tested
|
||||
|
||||
`test/examples.test.js` starts every file with `node`, against a broker on 127.0.0.1, discovers the device, sends
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue