-
Notifications
You must be signed in to change notification settings - Fork 129
SinricP Doorbell - websockets problem?? #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Steve, this looks like a weak wifi connection. |
I’m 2m away from the router. And did a scan check. It’s strong. |
Also tried with different nodemcu board |
But you’ve set me thinking. Maybe the ip the router allocates or the channel it’s picking up. I’ll compare a good run with the bad runs to see if there’s a pattern. Also I have UDP packets buzzing around on my network cos of other home automation stuff. Could that interfere?? |
Try
void setup() {
Serial.begin(9600);
WiFi.setSleepMode(WIFI_NONE_SLEEP);
[.....]
}
From
esp8266/Arduino#5083
…On Wed, 18 Dec 2019 at 5:38 AM steve8266 ***@***.***> wrote:
But you’ve set me thinking. Maybe the ip the router allocates or the
channel it’s picking up. I’ll compare a good run with the bad runs to see
if there’s a pattern. Also I have UDP packets buzzing around on my network
cos of other home automation stuff. Could that interfere??
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#17?email_source=notifications&email_token=ABZAZZVPTA5AOUPAHI3KV5DQZFIGPA5CNFSM4J4BVFP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHEGJII#issuecomment-566781089>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZAZZUSFB2Y4GQRBNGOAVLQZFIGPANCNFSM4J4BVFPQ>
.
|
I compared the log with my own log.
Your module seems to disconnect from wifi and set sleepmode (see here esp8266/Arduino#4455 (comment)) |
While investigating about ESP wifi logs i can say this is a wifi issue! Are your other ESP's connected to the same Access Point? |
Gents, |
Hi,
I'm still trying hard to get the doorbell working. I'm using all the latest libraries (note: vs 2.2.6 was same) and the original code etc, using platformio on a nodemcu. Sometimes when I compile it works absolutely fine, press the button and alexa does what she should. Other times and most often it fails to start properly - please see terminal output below (debug on). I dont think its my router because everything I've got on original sinric is still working 100%. It looks to me (non expert eye) that its some kind of websockets timeout issue. That's the only explanation I've got, but why does it work sometimes and not others...
I would really appreciate your help please. Terminal output as follows:
SDK:2.2.2-dev(38a443e)/Core:2.6.3=20603000/lwIP:STABLE-2_1_2_RELEASE/glue:1.2-16-ge23a07e/BearSSL:89454af
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 6
cnt
connected with BTHub6-xxxxx, channel 11
dhcp client start...
....ip:192.168.x.xxx,mask:255.255.255.0,gw:192.168.x.xxx
connected!
WiFi: IP-Address is 192.168.x.xxx
[SinricPro:add()]: Adding device with id "5de3974a5xxxxxxxxxxxxxxxx".
[SinricPro:Websocket]: Connecting to WebSocket Server (ws.sinric.pro)
[SinricPro:Websocket]: headers:
appkey:f5dd293a-8ad0-xxxx-xxxx-xxxxxxxxxxxx
deviceids:5de3974a553xxxxxxxxxxxxx
restoredevicestates:false
platform:ESP8266
version:2.2.7
[WS-Client] connect ws...
[WS-Client] connected to ws.sinric.pro:80.
[WS-Client][sendHeader] sending header...
[WS-Client][sendHeader] handshake GET / HTTP/1.1
Host: ws.sinric.pro:80
Connection: Upgrade
Upgrade: websocket
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: woG190jRBoTZcY4NwXar6Q==
Sec-WebSocket-Protocol: arduino
appkey:f5dd293a-8ad0-xxxx-xxxx-xxxxxxxxxxxx
deviceids:5de3974axxxxxxxxxxxxxxxx
restoredevicestates:false
platform:ESP8266
version:2.2.7
User-Agent: arduino-WebSocket-Client
[write] n: 367 t: 7126
[WS-Client][sendHeader] sending header... Done (33927us).
[WS-Client][handleHeader] RX: HTTP/1.1 101 Switching Protocols
[WS-Client][handleHeader] RX: Server: nginx
[WS-Client][handleHeader] RX: Date: Tue, 17 Dec 2019 20:56:39 GMT
[WS-Client][handleHeader] RX: Connection: upgrade
[WS-Client][handleHeader] RX: Upgrade: websocket
[WS-Client][handleHeader] RX: Sec-WebSocket-Accept: bCCnndFQKswdSP7/ex9TKFqCDYk=
[WS-Client][handleHeader] RX: Sec-WebSocket-Protocol: arduino
[WS-Client][handleHeader] Header read fin.
[WS-Client][handleHeader] Client settings:
[WS-Client][handleHeader] - cURL: /
[WS-Client][handleHeader] - cKey: woG190jRBoTZcY4NwXar6Q==
[WS-Client][handleHeader] Server header:
[WS-Client][handleHeader] - cCode: 101
[WS-Client][handleHeader] - cIsUpgrade: 1
[WS-Client][handleHeader] - cIsWebsocket: 1
[WS-Client][handleHeader] - cAccept: bCCnndFQKswdSP7/ex9TKFqCDYk=
[WS-Client][handleHeader] - cProtocol: arduino
[WS-Client][handleHeader] - cExtensions:
[WS-Client][handleHeader] - cVersion: 0
[WS-Client][handleHeader] - cSessionId:
[WS-Client][handleHeader] Websocket connection init done.
[WS][0][headerDone] Header Handling Done.
[SinricPro:Websocket]: connected
[WS][0][handleWebsocketWaitFor] size: 2 cWsRXsize: 0
[readCb] n: 2 t: 7313
[WS][0][handleWebsocketWaitFor][readCb] size: 2 ok: 1
[WS][0][handleWebsocket] ------- read massage frame -------
[WS][0][handleWebsocket] fin: 1 rsv1: 0 rsv2: 0 rsv3 0 opCode: 1
[WS][0][handleWebsocket] mask: 0 payloadLen: 24
[readCb] n: 24 t: 7335
[WS][0][handleWebsocket] text: {"timestamp":1576616199}
[SinricPro:Websocket]: receiving data
[SinricPro.handleReceiveQueue()]: 1 message(s) in receiveQueue
[SinricPro.handleReceiveQueue()]: Signature is valid. Processing message...
[SinricPro:extractTimestamp(): Got Timestamp 1576616199
[HBtimeout] pong TIMEOUT! lp=-290499 millis=10001 pi=10001 count=1
[WS-Client] sending HB ping
[WS][0][sendFrame] ------- send message frame -------
[WS][0][sendFrame] fin: 1 opCode: 9 mask: 1 length: 0 headerToPayload: 0
[write] n: 6 t: 10009
[WS][0][sendFrame] sending Frame Done (3042us).
bcn_timout,ap_probe_send_start
pm open,type:2 0
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
pm close 7
[WS-Client] connection lost.
[WS-Client] client disconnected.
[SinricPro:Websocket]: disconnected
[WS-Client] connect ws...
[WS-Client] connection to ws.sinric.pro:80 Failed
[WS-Client] client disconnected.
[WS-Client] connect ws...
[WS-Client] connection to ws.sinric.pro:80 Failed
................etc etc continuously..............
Your comments/advice please.
Regards, Steve
The text was updated successfully, but these errors were encountered: