esp8266-esp32-sdk icon indicating copy to clipboard operation
esp8266-esp32-sdk copied to clipboard

know the status of my requests

Open helmeplis opened this issue 3 years ago • 8 comments

hello, I'm new to this, I'm making an assembly with the code of the switch send a signal from google assistant, but it hasn't worked out quite right, so I would like to know if there is any function of the sinric.pro library to see the requests I send. I would appreciate the help

helmeplis avatar Aug 27 '22 22:08 helmeplis

Server side requests are logged in the Activity Log tab in the Portal.

To see messages coming into SDK and going out, you have to enable debug logs. Uncomment this line

https://github.com/sinricpro/esp8266-esp32-sdk/blob/master/examples/Switch/Switch/Switch.ino#L18

On Sun, 28 Aug 2022 at 5:22 AM helmeplis @.***> wrote:

hello, I'm new to this, I'm making an assembly with the code of the switch send a signal from google assistant, but it hasn't worked out quite right, so I would like to know if there is any function of the sinric.pro library to see the requests I send. I would appreciate the help

— Reply to this email directly, view it on GitHub https://github.com/sinricpro/esp8266-esp32-sdk/issues/285, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZXRY4BAAND7QQTR7P3V3KIJHANCNFSM57Z762VA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kakopappa avatar Aug 28 '22 00:08 kakopappa

hello, is there any way to capture the state and assign it to a variable?, for example

status = function fetch(){ return "lock", "unlock" }

helmeplis avatar Aug 28 '22 14:08 helmeplis

bool myPowerState = false;

bool onPowerState(const String &deviceId, bool &state) {
   myPowerState = state;
}

kakopappa avatar Aug 28 '22 15:08 kakopappa

The variable &state is global?, or can it be called from anywhere in the code?

helmeplis avatar Aug 28 '22 15:08 helmeplis

myPowerState is global. state is local

kakopappa avatar Aug 28 '22 15:08 kakopappa

but my myPowerState is false for the rest of the code, is it possible to capture the state and modify it in execution?

helmeplis avatar Aug 28 '22 15:08 helmeplis

You can't change the state, it's only available with in the function scope.

If your intention is to update the state in the server, you have to send an event like below to the server once when the state change.

mySwitch.sendPowerStateEvent(newRelayState);

kakopappa avatar Aug 29 '22 01:08 kakopappa

This issue has gone quiet. Spooky quiet. We currently close issues after 14 days of inactivity. It’s been at least 7 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. As a friendly reminder, the best way to fix this or any other problem is to provide a detailed error description including a serial log. Thanks for being a part of the SinricPro community!

stale[bot] avatar Sep 22 '22 03:09 stale[bot]

Hey again! It’s been 14 days since anything happened on this issue, so our friendly robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else. As a friendly reminder, the best way to fix this or any other problem is to provide a detailed error description including a serial log. Thanks again for being a part of the SinricPro community!

stale[bot] avatar Oct 01 '22 02:10 stale[bot]