Skip to content

Can't commucate with mosquitto #7

Description

@emsi

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions