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
Other
234 stars 124 forks source link

WiFiClient setOptions returns error when first connecting #310

Closed lilbuzz closed 1 year ago

lilbuzz commented 1 year ago

I am using Arduino (IDE 2.0.3) and an ESP32 board (DOIT). I have downloaded the latest sinRic libraries for the ESP32 and dependencies. The first time I call the SinRicPro.handle method or possibly the first call to sendContactEvent (I'm using SinRic Contact sensor class), I get the following: 14:12:48.138 -> [SinricPro]: Device "XXXXXXXXXXXXXXXXXXXXXXXX" does not exist. Creating new device 14:12:48.176 -> [SinricPro:add()]: Adding device with id "XXXXXXXXXXXXXXXXXXXXXXXX". 14:12:48.176 -> [SinricPro]: Device "YYYYYYYYYYYYYYYYYYYYYYYY" does not exist. Creating new device 14:12:48.176 -> [SinricPro:add()]: Adding device with id "YYYYYYYYYYYYYYYYYYYYYYYY". 14:12:48.831 -> [SinricPro:Websocket]: Connecting to WebSocket Server using SSL (ws.sinric.pro) 14:12:48.877 -> [SinricPro:Websocket]: headers: 14:12:48.877 -> appkey:ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 14:12:48.877 -> deviceids:XXXXXXXXXXXXXXXXXXXXXXXX;YYYYYYYYYYYYYYYYYYYYYYYY 14:12:48.877 -> restoredevicestates:false 14:12:48.877 -> ip:abc.def.x.yz 14:12:48.877 -> mac:7C:9E:BD:3A:04:6C 14:12:48.877 -> platform:ESP32 14:12:48.877 -> SDKVersion:2.10.3 14:12:51.291 -> [E][WiFiClient.cpp:309] setOption(): fail on fd -1, errno: 9, "Bad file number"

Notice the error in the last line. I also get the Disconnected message but not always. Again, this only seems to be happening at power-up.

Mark Bussey

sivar2311 commented 1 year ago

This is a warning message from the underlying WiFiClient and can be ignored. To avoid this serial output simply add Serial.setDebugOutput(false); right after Serial.begin()

See #254

stale[bot] commented 1 year 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 1 year 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!