-
Notifications
You must be signed in to change notification settings - Fork 11
Description
It took me few days to identify why WebSocketStreamClient can't communicate with mosquitto behind rev-proxy. Since I've spent way more time then I should I'm posting the solution here for other troubled souls like mine :)
After analyzing all layer of communication I've fount that the Sec-WebSocket-Protocol: mqtt header is mandatory, otherwise mosquitto is deaf to any mqtt messages over the websocket.
The solution requires modification of (at least) ArduinoHttpClient (I'll open pr there and if accepted I'll open another one here).
In the meantime I've committed required changes to the following repos:
https://github.com/emsi/WebSocketStreamClient
https://github.com/emsi/ArduinoHttpClient
The changes are in the commit:
emsi/ArduinoHttpClient@56772a0
and:
emsi@aee5480