[尝试与MQTT + Tasmota连接时拒绝连接

问题描述 投票:0回答:1

我已经对此进行了谷歌搜索,并且在将问题发布到此处之前,我确实试图解决此问题。

[系统: Raspberry Pi B +(最新Raspbian),Wifi

问题:当我尝试运行此命令时:mosquitto_pub -h 192.168.1.121 -t cmnd / DVES_1A6953_fb / cmnd / Power1 -m off我收到“错误:连接被拒绝”

我所知道的:Mosquitto已安装在192.168.1.100(RPi)上Sonoff基本战俘位于192.168.1.121我已经尝试过使用mosquitto -d。sudo systemctl启用mosquitto.service。

mosquitto -v给我:1579784576:mosquitto版本1.5.7开始1579784576:使用默认配置。1579784576:在端口1883上打开ipv4侦听套接字。1579784576:错误:地址已在使用中

Snoff Basic Pow with Tasmota configuration

Sonof Basic Pow console shows this:

我真的不知道现在还能做什么:)

希望你能帮助我!

/ Oskar

mqtt mosquitto
1个回答
2
投票

您正在尝试直接发布到设备(192.168.1.121),而不发布到代理(192.168.1.100)

您需要将消息发送到代理,代理将把消息转发到设备(假设它已订阅正确的主题)

mosquitto_pub -h 192.168.1.100 -t cmnd/DVES_1A6953_fb/cmnd/Power1 -m off
© www.soinside.com 2019 - 2024. All rights reserved.