【发布时间】:2020-06-18 13:38:36
【问题描述】:
如何将 Mosquitto(集成到 Home Assistant 中的版本)配置为仅使用“CA 签名服务器证书”选项(如 MQTT.fx)和 Let's encrypt 证书作为桥连接到远程代理?
例如http://mqttfx.jensd.de/ 在连接设置中有这个选项,并且与代理的连接工作正常:
配置如下:
connection bridge-01
log_type all
require_certificate false
cleansession true
try_private true
bridge_protocol_version mqttv311
bridge_insecure false
bridge_cafile /etc/ssl/letsencrypt.crt
address mycompany.com:8883
remote_clientdid raspi_test
remote_username raspi
remote_password password
topic # out 0
正如提示:
- 将 Let's Encrypt 根证书或 Let's Encrypt Authority X3 证书 (https://letsencrypt.org/certificates/) 添加为
bridge_cafile失败,出现certificate validation error或socket error on client raspi.local...。 - 家庭助理在 Raspberry Pi 4 上运行(出于完整性考虑)
- Mqtt 代理版本为 Mosquitto 5.1(家庭助手插件)
- 连接(clientid、用户名和密码)正常,可以使用 MQTT.fx
【问题讨论】:
标签: certificate mqtt lets-encrypt mosquitto home-assistant