Hello,
Je programme un ESP-01 afin d’y exposer deux méthodes.
Je suis la documentation: https://developer.myconstellation.io/client-api/arduino-esp-api/recevoir-des-messages-et-exposer-des-methodes-messagecallback-sur-arduino-esp/
J’ai déclaré mes deux callbacks dans setup():
constellation.registerMessageCallback("Ping", MessageCallbackDescriptor().setDescription("Reply Pong !"), [](JsonObject& json) { constellation.writeInfo("Pong !"); }); constellation.registerMessageCallback("HelloWorld", MessageCallbackDescriptor().setDescription("Hello World !"), [](JsonObject& json) { constellation.writeInfo("Hello Constellation !"); }); constellation.declarePackageDescriptor();
Dans le Console log:
[ESP.LightUnderTVConsole/Switch] 7:13:40 PM : Hello Constellation [ESP.LightUnderTVConsole/Switch] 7:13:40 PM : Hello Constellation, I'm 'ESP.LightUnderTVConsole ! [ESP.LightUnderTVConsole/Switch] 7:13:40 PM : Subscribing to message. subscriptionId=14ff54bf-6955-41ef-a732-1b6bac1a25a3 [ESP.LightUnderTVConsole/Switch] 7:13:40 PM : Subscribing to message. subscriptionId=a303739c-0b8f-4a01-8bd2-3b82f7220f33 [ESP.LightUnderTVConsole/Switch] 7:13:40 PM : Declaring PackageDescriptor for Switch (Quelques minutes plus tard ...) [Server/WebApiManager] 7:18:41 PM : HTTP session '14ff54bf-6955-41ef-a732-1b6bac1a25a3' timeout [Server/WebApiManager] 7:18:41 PM : HTTP session 'a303739c-0b8f-4a01-8bd2-3b82f7220f33' timeout
Cependant, dans le Message Callbacks Explorer, il n’y a rien.
Une idée?
Merci,
Julien.