如何将 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
失败,并带有 acertificate validation error
或 withsocket error on client raspi.local...
。 - 家庭助理在 Raspberry Pi 4 上运行(仅出于完整性原因)
- Mqtt 代理版本为 Mosquitto 5.1(家庭助手插件)
- 连接(clientid、用户名和密码)正常,可与 MQTT.fx 一起使用