Closed fightforlife closed 3 years ago
Compiled with esp8266 board version 2.5.0 is OK With 2.7 => Error
I DID THE DIRTY WAY : OK to compile with 2.7.x (and last pubsibclient) if :
PS : Areve, you're a genius. You're idea of implementing client.h that way is just beautifull Thanks
Sorry, don't have time, nor need to maintain this library. I'm really happy it's helped others though. May clysss's fork live forever!
just a question areve : when mqtt msg size is over 128b, the WS hang, because of iTxBuffer[128] in websocket.h (websocketclient private var) Is there a way to overwrite this without modifyng websocket.h (li tried like you did with websocket250 without success : compile is OK but itxbuffer[128] is still used by the parent class)..
hi clysss I used the library forked by you. I execute your example in arduino IDE ( Nodemcu ) and mqtt connect succesfully. but the "onMqttPublish" function is never executed and I do not receive any (published) message. I also tested with my own personalized mqtt broker and the result was similar.
Hello, I don't know why you're having this issue. Could it be linked to the mqtt server? (I don't see any error in the example, but remember never used it directly) I'm using everyday this lib without issue on esp8266. My code was before on standard port, and working, and just update it to ws Perhaps give me more info on your environment
Le dim. 14 mars 2021 à 12:16, mer30boy @.***> a écrit :
hi clysss I used the library forked by you https://github.com/clysss/WebSocketStreamClient. I execute your example https://github.com/clysss/WebSocketStreamClient/blob/master/examples/example-mqtt-ws/example-mqtt-ws.inoin arduino IDE ( Nodemcu ) and mqtt connect succesfully. but the "onMqttPublish" function is never executed and I do not receive any (published) message. I also tested with my own personalized mqtt broker and the result was similar.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/areve/WebSocketStreamClient/issues/4#issuecomment-798888834, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKVWKSL6OYABQ5YXLWYJETTDSLIFANCNFSM4NDK4QZQ .
I think this problem is related to pubsubclient's library. Because when I searched for this problem, I came to the results of the pubsubclient's library. What version of pubsubclient's Library do you use?
2.8.0
Le dim. 14 mars 2021 à 15:16, mer30boy @.***> a écrit :
I think this problem is related to pubsubclient's library. Because when I searched for this problem, I came to the results of the pubsubclient's library. What version of pubsubclient's Library do you use?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/areve/WebSocketStreamClient/issues/4#issuecomment-798915366, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKVWKVYHU64JDQS2M4CCKTTDTANBANCNFSM4NDK4QZQ .
hi
I solved the previous problem by calling this function:
mqtt.setBufferSize(5000);
But there is still another problem:
I want to publish a message. If the number of characters in the message is less than 128 characters, everything will work fine.
But if the message length is more than 128 characters, the message will not be sent and the mqtt connection will be disconnected.
This is part of your library's README.MD:
<!> IF the size of MQTT MESSAGE is > 128 bytes, the websocket hang => add (pubsubclient) .setBufferSize(512) => change in websocket.h iTxBuffer[512]
as I said I set .setBufferSize function. but where is websocket.h file ?
In your library files...
Le mer. 17 mars 2021 à 08:01, mer30boy @.***> a écrit :
hi I solved the previous problem by calling this function: mqtt.setBufferSize(5000); But there is still another problem: I want to publish a message. If the number of characters in the message is less than 128 characters, everything will work fine. But if the message length is more than 128 characters, the message will not be sent and the mqtt connection will be disconnected.
This is part of your library's README.MD:
<!> IF the size of MQTT MESSAGE is > 128 bytes, the websocket hang => add (pubsubclient) .setBufferSize(512) => change in websocket.h iTxBuffer[512]
as I said I set .setBufferSize function. but where is websocket.h file ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/areve/WebSocketStreamClient/issues/4#issuecomment-800847674, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKVWKXFYKQXIOBF3P73543TEBHUVANCNFSM4NDK4QZQ .
what library ? There is no file as 'websocket.h' in these libraries! This is a list of files available in libraries:
PubSubClient library:
PubSubClient.cpp PubSubClient.h
WebSocketStreamClient.h
also I don't find 'iTxBuffer' in these files .
How to search for a file name?
Le mer. 17 mars 2021 à 08:55, mer30boy @.***> a écrit :
what library ? There is no file as 'websocket.h' in these libraries! This is a list of files available in libraries:
PubSubClient https://github.com/knolleary/pubsubclient library:
PubSubClient.cpp PubSubClient.h
WebSocketStreamClient https://github.com/knolleary/pubsubclient lib
WebSocketStreamClient.h
also I don't find 'iTxBuffer' in these files .
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/areve/WebSocketStreamClient/issues/4#issuecomment-800876282, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKVWKS7G56KTK2QUB5GLQLTEBN5TANCNFSM4NDK4QZQ .
Hi Areve,
this is the only library on the whole internet I could find, which supports MQTT over WSS.
Sadly the example is not working for me, do zou have an idea?