mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 05:16:49 +00:00
Add WebSockets as transport for MQTT (#24940)
* Add WebSockets as transport for MQTT * Add URI example
This commit is contained in:
parent
b98ac2fca5
commit
adcd0e5b77
@ -96,6 +96,11 @@ The MQTT protocol setting defaults to version `3.1.1`. If your MQTT broker suppo
|
|||||||
|
|
||||||
With a secure broker connection it is possible to use a client certificate for authentication. To set the client certificate and private key turn on the option `Use a client certificate` and click "Next" to show the controls to upload the files. Only a PEM encoded client certificates together with a PEM encoded private key can be uploaded. Make sure the private key has no password set.
|
With a secure broker connection it is possible to use a client certificate for authentication. To set the client certificate and private key turn on the option `Use a client certificate` and click "Next" to show the controls to upload the files. Only a PEM encoded client certificates together with a PEM encoded private key can be uploaded. Make sure the private key has no password set.
|
||||||
|
|
||||||
|
#### Using WebSockets as transport
|
||||||
|
|
||||||
|
You can select `websockets` as transport method if your MQTT broker supports it. When you select `websockets` and click `NEXT` you will be able to add a WebSockets path (default = `/` and WebSockets headers (optional). The target WebSockets URI: `ws://{broker}:{port}{WebSockets path}` is built with `broker`, `port` and `ws_path` (WebSocket path) settings.
|
||||||
|
To configure the WebSocketS headers supply a valid JSON dictionary string. E.g. `{ "Authorization": "token" , "x-header": "some header"}`. The default transport method is `tcp`. The WebSockets transport can be secured using TLS and optionally using user credentials or a client certificate.
|
||||||
|
|
||||||
<div class='note'>
|
<div class='note'>
|
||||||
|
|
||||||
A configured client certificate will only be active if broker certificate validation is enabled.
|
A configured client certificate will only be active if broker certificate validation is enabled.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user