sinricpro / esp8266-esp32-sdk

Library for https://sinric.pro - simple way to connect your device to Alexa, Google Home, SmartThings and cloud
https://sinric.pro
228 stars 121 forks source link

DEVICE CONNECTION PROBLEM #325

Closed ghulamsarwar123 closed 9 months ago

ghulamsarwar123 commented 11 months ago

Dear Concerned, Good day!

Two of my devices were already working fine, one on SWITCH and the other on FAN, but SinricPro Server is not responding to any of them now. I tried the all the possible ways I could but in vain. Finally, I tried the simplest example from the arduino IDE with a single switch but that did't work also.

I am unable to understand what is the matter.

Need your support please.

Untitled

Sarwar

kakopappa commented 11 months ago

Hi Sarwar

Please enable the debug logs and see whether you can see the command coming from the server.

Add the following line to the top of the sketch, flash and open the Arduino Serial Monitor to see the logs.

#define ENABLE_DEBUG

If you cannot see any messages, it's likely deviceid, appkey,appsecret is wrong.

ghulamsarwar123 commented 11 months ago

Dear, I have recorded the feedback from Server after enabling the debugging and attaching it herewith.

Untitled 2

Sarwar

ghulamsarwar123 commented 11 months ago

I have also tried 'main.ino' generated by SinricPro 'Zero Code' generator. BUt the results are same.

Very dramatic and ununderstandable situation.

Sarwar

kakopappa commented 11 months ago

Can you please start a personal hotspot from your mobile phone and connect to server via it and share your findings

On Tue, 18 Jul 2023 at 3:06 PM ghulamsarwar123 @.***> wrote:

I have also tried 'main.ino' generated by SinricPro 'Zero Code' generator. BUt the results are same.

Very dramatic and ununderstandable situation.

Sarwar

— Reply to this email directly, view it on GitHub https://github.com/sinricpro/esp8266-esp32-sdk/issues/325#issuecomment-1639722502, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZUPG2ECSACMNFWICHTXQY7YJANCNFSM6AAAAAA2MXZKNQ . You are receiving this because you commented.Message ID: @.***>

ghulamsarwar123 commented 11 months ago

Same results dear.

'Disconnected from SinricPro.'

kakopappa commented 11 months ago

I can confirm the sketch generated in the Zero config works. Can you post the log like below?

image

ghulamsarwar123 commented 11 months ago

But I am not receiving any such log on my Serial terminal. The only thing I am receiving is:

. . . . . . . Connected. IP Address: 192.168.. Disconnected from SinricPro. Disconnected from SinricPro. Disconnected from SinricPro. Disconnected from SinricPro. . . .

Sarwar

kakopappa commented 11 months ago

Did you add

define ENABLE_DEBUG

Top of the sketch like I mentioned in the previous message?

ghulamsarwar123 commented 11 months ago

Yes you were right. When I generated the auto code I forgot to define ENABLE_DEBUG. The log I received now is:

Untitled 3

Sarwar

kakopappa commented 11 months ago

Seems cannot connect to the server. Also noticed Sinric SDK is outdated.

ghulamsarwar123 commented 11 months ago

I have updated SDK & Dependencies Libraries as well. Now the log is:

Untitled 4

Sarwar

ghulamsarwar123 commented 11 months ago

What am I supposed to do now?

kakopappa commented 11 months ago

image

Can you enable verbose logging (like the above picture).. it should have more details about the connection. Also please try connecting to a different wifi.

ghulamsarwar123 commented 11 months ago

Untitled 5

The problem seems to be solved. I don't know how. But seems your effort on server side. Is it?

Thanks for your efforts.

Sarwar

ghulamsarwar123 commented 11 months ago

Disappointing !!!

I turned my device off and then back on and this time device is not getting connected.

Untitled 6

kakopappa commented 11 months ago

According to your logs, looks like having a problem with the SSL handshake.

  1. Please make sure your esp32-core is up to date.
  2. Do you have another ESP32 to try this?
  3. Try adding #define SINRICPRO_NOSSL which will disable SSL to the top of the sketch. This will disable SSL however not recommened,

haven't changed anything on the server side since only you are having the issue.

ghulamsarwar123 commented 11 months ago

Yes I inserted #define SINRICPRO_NOSSL at the beginning and now the problem solved. What next? Should I keep running the code without SSL or any other suggestion?

Awaiting your recommendations please.

Sarwar

kakopappa commented 11 months ago

Seems your ESP32 has limited memory or has an issue with memory. (Not enough to establish SSL connection) If possible try to change to another board.

On Thu, 20 Jul 2023 at 1:49 PM ghulamsarwar123 @.***> wrote:

Yes I inserted #define SINRICPRO_NOSSL at the beginning and now the problem solved. What next? Should I keep running the code without SSL or any other suggestion?

Awaiting your recommendations please.

Sarwar

— Reply to this email directly, view it on GitHub https://github.com/sinricpro/esp8266-esp32-sdk/issues/325#issuecomment-1643367149, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZQK5TU45YJHEQMQHIDXRDIG7ANCNFSM6AAAAAA2MXZKNQ . You are receiving this because you commented.Message ID: @.***>

ghulamsarwar123 commented 11 months ago

Its pretty surprising to know that the ESP32 or ESP8266 (even with lesser memory resources) have issues connecting to SincricPro server because of their memory. What if I keep SSL disabled permanently? Does it make any difference or performance compromise?

Sarwar

ghulamsarwar123 commented 11 months ago

Untitled 7

What is this ???

kakopappa commented 11 months ago

You can keep it disable, data transferee between are not encrypted.

On Thu, 20 Jul 2023 at 2:52 PM ghulamsarwar123 @.***> wrote:

Its pretty surprising to know that the ESP32 or ESP8266 (even with lesser memory resources) have issues connecting to SincricPro server because of their memory. What if I keep SSL disabled permanently? Does it make any difference or performance compromise?

Sarwar

— Reply to this email directly, view it on GitHub https://github.com/sinricpro/esp8266-esp32-sdk/issues/325#issuecomment-1643449012, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZTIEEEZQXFDB4X7VJLXRDPU3ANCNFSM6AAAAAA2MXZKNQ . You are receiving this because you commented.Message ID: @.***>

ghulamsarwar123 commented 11 months ago

Well its working fine n now. But without encryption.

Thanks.

kakopappa commented 11 months ago

What’s the esp32 board you are using?

On Thu, 20 Jul 2023 at 5:29 PM ghulamsarwar123 @.***> wrote:

Well its working fine n now. But without encryption.

Thanks.

— Reply to this email directly, view it on GitHub https://github.com/sinricpro/esp8266-esp32-sdk/issues/325#issuecomment-1643672941, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZVZ52EB5GCQUWKKEBDXRECAXANCNFSM6AAAAAA2MXZKNQ . You are receiving this because you commented.Message ID: @.***>

kakopappa commented 11 months ago

any update on this? otherwise please close this issue

stale[bot] commented 11 months ago

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] commented 9 months ago

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!