Announce a doorbell with proactivelyReported and a scene with supportsDeactivation
An interface without properties says beside its name what Alexa has to know of it; the library left both out. With a board and Alexa on 2026-09-28 the discovery of a doorbell was accepted (202), the endpoint was not listed, and its DoorbellPress was answered with 500 INTERNAL_SERVICE_EXCEPTION. DoorbellEventSource now always carries "proactivelyReported": true. SceneController carries "supportsDeactivation", false until the sketch calls setSupportsDeactivation(true); on another interface the call is refused and logged. The Scene example says that it can be undone. 148 host tests. Light: static RAM 30,616 B, flash 332,705 B (+140 B). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
1b8a5ff806
commit
c3d02f462e
11 changed files with 65 additions and 18 deletions
|
|
@ -239,11 +239,11 @@ void test_scene_discovery(void)
|
|||
{
|
||||
AlexaDevice scene("Movie Night", "root", "esp-scene");
|
||||
scene.setDisplayCategory(DisplayCategory::SCENE_TRIGGER);
|
||||
scene.addCapability(AlexaInterfaces::SceneController);
|
||||
scene.addCapability(AlexaInterfaces::SceneController)->setSupportsDeactivation(true);
|
||||
scene.addCapability(AlexaInterfaces::EndpointHealth);
|
||||
|
||||
assertDiscovery(endpoint("esp-scene", "Movie Night", "SCENE_TRIGGER",
|
||||
list({"{\"interface\":\"Alexa.SceneController\",\"version\":\"3\",\"type\":\"AlexaInterface\"}",
|
||||
list({"{\"interface\":\"Alexa.SceneController\",\"version\":\"3\",\"type\":\"AlexaInterface\",\"supportsDeactivation\":true}",
|
||||
HEALTH})),
|
||||
scene);
|
||||
}
|
||||
|
|
@ -252,12 +252,12 @@ void test_doorbell_discovery(void)
|
|||
{
|
||||
AlexaDevice doorbell("Front Door Bell", "root", "esp-doorbell");
|
||||
doorbell.setDisplayCategory(DisplayCategory::DOORBELL);
|
||||
doorbell.addCapability(AlexaInterfaces::DoorbellEventSource)->setProactivelyReported(true);
|
||||
doorbell.addCapability(AlexaInterfaces::DoorbellEventSource);
|
||||
doorbell.addCapability(AlexaInterfaces::EndpointHealth);
|
||||
|
||||
assertDiscovery(
|
||||
endpoint("esp-doorbell", "Front Door Bell", "DOORBELL",
|
||||
list({"{\"interface\":\"Alexa.DoorbellEventSource\",\"version\":\"3\",\"type\":\"AlexaInterface\"}",
|
||||
list({"{\"interface\":\"Alexa.DoorbellEventSource\",\"version\":\"3\",\"type\":\"AlexaInterface\",\"proactivelyReported\":true}",
|
||||
HEALTH})),
|
||||
doorbell);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue