Comments (12)
Hi Guys, for the moment try to use this version of WebSocket that contains my fix:
https://github.com/lucalas/arduinoWebSockets
Download it as zip and replace it under arduino library folder.
It is compatible with socketIO Library that StreamlabsArduino use.
For the moment there isn't an update from the creator of SocketIO library, this is the pull request with the fix 88
Let me know if it works
from streamlabsarduinoalerts.
Hey @lucalas , just tried your fix and it's working like a charm, thanks a lot ! Great job !
from streamlabsarduinoalerts.
Hi @patricknn , please give me more info like:
Are you trying to build the sources or are you including the library into your project?
Which platform are you using? ESP8266, Arduino, etc..?
It seems like you have not installed library using Arduino IDE Library Manager.
from streamlabsarduinoalerts.
I'm Just trying to compile an empty file with the StreamLabsAPI.h included
I forgot to select the board that I am using that is NodeMCU V3 ESP-12e
Now I am receiving the following error
C:\Users\patri\Documents\Arduino\libraries\SocketIoClient\SocketIoClient.cpp: In member function 'void SocketIoClient::beginSSL(const char*, int, const char*, const char*)': C:\Users\patri\Documents\Arduino\libraries\SocketIoClient\SocketIoClient.cpp:46:50: error: invalid conversion from 'const char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive] _webSocket.beginSSL(host, port, url, fingerprint); ^ In file included from C:\Users\patri\Documents\Arduino\libraries\SocketIoClient/SocketIoClient.h:7:0, from C:\Users\patri\Documents\Arduino\libraries\SocketIoClient\SocketIoClient.cpp:1: C:\Users\patri\Documents\Arduino\libraries\WebSockets\src/WebSocketsClient.h:50:10: error: initializing argument 4 of 'void WebSocketsClient::beginSSL(const char*, uint16_t, const char*, const uint8_t*, const char*)' [-fpermissive] void beginSSL(const char * host, uint16_t port, const char * url = "/", const uint8_t * fingerprint = NULL, const char * protocol = "arduino"); ^ exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module).
from streamlabsarduinoalerts.
The problem is in the SocketIoLibrary dependency, here is the Issue #86
There is even a pull request, we have to wait until the library will be updated.
This error happens because new version of ArduinoWebSockets was released (SocketIoLibrary is based on it).
I could use SocketIOClient class in ArduinoWebSockets instead of using SocketIoLibrary, I have to think about it.
For the moment the quick fix is to change:
SocketIoClient.h:
void beginSSL(const char* host, const int port = DEFAULT_PORT, const char* url = DEFAULT_URL, const char* fingerprint = DEFAULT_FINGERPRINT); into void beginSSL(const char* host, const int port = DEFAULT_PORT, const char* url = DEFAULT_URL, const uint8_t* fingerprint = DEFAULT_FINGERPRINT);
SocketIoClient.cpp:
void SocketIoClient::beginSSL(const char* host, const int port, const char* url, const char* fingerprint) {
into
void SocketIoClient::beginSSL(const char* host, const int port, const char* url, const uint8_t* fingerprint) {
StreamlabsAPI.cpp:
webSocket.beginSSL(SL_HOSTNAME, SL_PORT, queryParams.c_str(), SL_FINGERPRINT);
into
webSocket.beginSSL(SL_HOSTNAME, SL_PORT, queryParams.c_str(), {0xE7, 0x93, 0x77, 0x36, 0xDA, 0xD4, 0x15, 0x0F, 0xC1, 0xC1, 0x8F, 0x14, 0xD5, 0x2A, 0xC8, 0x72, 0x93, 0xD0, 0x6F, 0x2A});
I didn't test this piece of code, let me know if it works.
from streamlabsarduinoalerts.
Hello, I had this same issue with the type conversion of the fingerprint. Your provided changes did not solve the problem, however the solution that did at least get it to compile and run was the same one linked in the issue above. Simply changed from WebSockets 2.3.0 to 2.2.0. I still run into errors on execution though, once the WiFi is connected it fails to connect to the Streamlabs Socket server. Just repeatedly giving the line '[SIoC] Disconnected!' inside the serial monitor.
from streamlabsarduinoalerts.
Hello, I had this same issue with the type conversion of the fingerprint. Your provided changes did not solve the problem, however the solution that did at least get it to compile and run was the same one linked in the issue above. Simply changed from WebSockets 2.3.0 to 2.2.0. I still run into errors on execution though, once the WiFi is connected it fails to connect to the Streamlabs Socket server. Just repeatedly giving the line '[SIoC] Disconnected!' inside the serial monitor.
Hi @adam-antite I didn't tell you to go back to WebSocket 2.2.0 because i fixed a problem in WebSocket library here 567 and is available from WebSocket 2.3.0, when i fixed the problem, this library was still compatible with socketIo, some changes occured after my pull request.
I will try to speak with SocketIoLibrary guys and WebSocket guys, i will update you ASAP.
from streamlabsarduinoalerts.
Right now i'm going to close the issue because there is a workaround.
I'm going to open an Issue to replace the use of socket-io client library with socket-io class inside of arduinowebsocket.
I'll appreciate everyone who want to collaborate.
from streamlabsarduinoalerts.
I hate websockets library.
I couldn't find these lines
I found only StreamlabsAPI.cpp:
SocketIoClient.h:
void beginSSL(const char* host, const int port = DEFAULT_PORT, const char* url = DEFAULT_URL, const char* fingerprint = DEFAULT_FINGERPRINT); into void beginSSL(const char* host, const int port = DEFAULT_PORT, const char* url = DEFAULT_URL, const uint8_t* fingerprint = DEFAULT_FINGERPRINT);
SocketIoClient.cpp:
void SocketIoClient::beginSSL(const char* host, const int port, const char* url, const char* fingerprint) {
into
void SocketIoClient::beginSSL(const char* host, const int port, const char* url, const uint8_t* fingerprint) {
Could this program be a little easier for novices. Which version of libraries should we use?
Everything gives an error. Can't be uploaded to the internet with a ready rar file.
Thanks.
from streamlabsarduinoalerts.
Hey @audreycgltt
You can help me for tihis project ?
Lucas is very busy.
from streamlabsarduinoalerts.
Hey @lambader I will try to have a look at it by the end of December when I got a bit of time :)
from streamlabsarduinoalerts.
Hi @lambader, sorry for these problems.
I know that there are a lot of incompatibility issues with the library.
I had no time to have a look, I tried to replace the socket-io library but I had a lot of problems and in the end, I didn't find a solution.
I will try to have a look again.
BTW, did you try to follow these steps? using my socketio library fork
Hi Guys, for the moment try to use this version of WebSocket that contains my fix: https://github.com/lucalas/arduinoWebSockets Download it as zip and replace it under arduino library folder. It is compatible with socketIO Library that StreamlabsArduino use. For the moment there isn't an update from the creator of SocketIO library, this is the pull request with the fix 88
Let me know if it works
from streamlabsarduinoalerts.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streamlabsarduinoalerts.