I’ve just set up the ESP8266 Web Server with WebSocket via ngrok and it has stopped refreshing and syncing with other clients. I can manually refresh and it works. Have I done anything wrong or should I expect this when using ngrok? I’m running ngrok on a raspberrypi..
Hello Brian, thank you for letting me know.
Unfortunately the ESP websocket only works with HTTP.
You’ll need to open the ngrok URL with the http:// (not https).
If you open ngrok like this, it will work:
- http://YOUR-NGROK-URL.ngrok.io
Does that work for you?
Thank you Rui for coming back to me so quickly.
I will try again by implementing your advice.
Kind regards and stay safe 👍
Brian
Hi Rui,
Yes http worked great on windows 10 in the MS Edge browser but still doesn’t work on IOS Safari.
If there’s a technical reason for this could you explain it for me please Rui?
Thanks for your time,
Kind regards,
Brian
Hi Rui,
Further to my last message and Interestingly when I manually refresh the Safari browser(IOS) it doesn’t update to the latest know state from last client interaction it sends it’s own out of sync message and sets the other clients as they sync with it.
Thanks in advance..
Brian
Hello Brian, I think Safari browser is blocking your websocket connections, you might need to use Google Chrome web browser…
I’m afraid I’ve tried Google Chrome, Firefox and Safari but none of them will allow it to work on IOS iPhone SE (new model). No worries…
Thanks for your time. I’ll let you know if I ever figure it out.
Brian
If it doesn’t allow you to change the state even after you refresh, it means iOS is completely blocking the WebSocket communication.
Does it work if you only use the web server in your iPhone directly using the ESP IP address?
Thanks!
Hi Rui, I have now tested this on several platforms:
iPad (4th gen) Safari, Firefox, Chrome..
iPhone SE (new version) Safari, Firefox, Chrome
Fire HD (4th gen) Silk
window 10 PC Edge, Firefox, Chrome.
RasberryPi (rgrok and Chromium)
It works completely on everything except IOS. No browsers work with it on iPad or iPhone. IOS allows authentication and connection but refuses to communicate continuously. I am beginning to think that it is SSL or TLS that is some how blocking it via rgrok…! The IOS devices works on local network using esp8266 IP address.
I’ve also tried it on various IOS devices not associated with my setup to negate the possibility that some other software (AV, VPN) is somehow getting in the way..
Cheers
Brian