gilmaimon / ArduinoWebsockets

A library for writing modern websockets applications with Arduino (ESP8266 and ESP32)
GNU General Public License v3.0
482 stars 97 forks source link

Esp8266-Client example compiles with warnings, maybe others do too. #164

Open JackV2020 opened 4 months ago

JackV2020 commented 4 months ago

I do not think this is a real bug but it is also not a feature I would like to propose. Since I think the existing code should be changed and this is not something new, I decided to post this as a bug and not as a feature request. I have just installed the library and started testing with the Esp8266-Client example in Arduino IDE with a Wemos D1 mini Pro which is esp8266 based. In preferences I have compiler warnings on default and when I compile the compiler is saying a lot of times that 'available' was renamed to 'accept'.

Arduino IDE: Version: 2.3.2 Date: 2024-02-20T09:54:08.669Z CLI Version: 0.35.3

Copyright © 2024 Arduino SA

sencin commented 4 months ago

hello did you successfully connected to Websockets?? mine not working

image

image

JackV2020 commented 4 months ago

I answered by mail and expected my answer to come here. Here is the mail I sent:

Yes,

You may check a project I am working on.

The idea is to have a Wemos D1 mini Pro as a 'central server' for my IoT things.

It comes with 2 working examples of .html websocket clients and also 2 .ino websocket clients.

One ino uses this ArduinoWebsockets.h and the other uses WebSocketsClient.h downloaded as zipfile from https://github.com/Links2004/arduinoWebSockets

The server acts as a NAPT and Reverse NAT router.

It has my LittleFSWeb in it. (Web interface to manage LittleFS, create files, (sub)directories, upload and download files edit files in the web interface and more.)

It has my implementation of 'Firmware On The Air' in it so you can update over WiFI.

It also has 2 websocket server applications in it.

One application allows you to control GPIO's and react on interrupts of GPIO's. ( 1 html example for this )

The other serves as a datastore. save, retrieve and delete data.

The other 3 examples ( 1 html and 2 ino's ) work with this last one.

Open a number of browsers, run an ESP8266 and they all are updated when one of them changes something.

You may want to look at the two files ending with .ino.h in my project which you can find on :

https://github.com/JackV2020/ESP8266-Server

Let us here if you get it working

Kind regards Jack