|
本帖最后由 lzyscgy 于 2018-4-10 15:20 编辑
硬件:z8300。系统:debian9+omv+hassio,在hassio中Add-ons安装,但总是错误,configuration.yaml按论坛 https://bbs.hassbian.com/forum.php?mod=viewthread&tid=995&highlight=mqtt 设置。
在hassio中错误如下(其中192.168.1.97 是esp8266的ip)
starting version 3.2.2
1523342029: mosquitto version 1.4.12 (build date 2017-06-01 13:03:46+0000) starting
1523342029: Config loaded from /etc/mosquitto.conf.
1523342029: Opening ipv4 listen socket on port 1883.
1523342029: Opening ipv6 listen socket on port 1883.
1523342029: Warning: Mosquitto should not be run as root/administrator.
1523342029: New connection from 192.168.1.97 on port 1883.
1523342029: New client connected from 192.168.1.97 as ESPClient_5C:CF:7F:6E:35:4D (c1, k15, u'ha').
1523342051: Client ESPClient_5C:CF:7F:6E:35:4D has exceeded timeout, disconnecting.
1523342051: Socket error on client ESPClient_5C:CF:7F:6E:35:4D, disconnecting.
1523342053: New connection from 172.30.32.1 on port 1883.
1523342053: New client connected from 172.30.32.1 as aba791c3-8e36-4d94-b503-aaf29391273d (c1, k60, u'ha').
1523342074: New connection from 192.168.1.97 on port 1883.
1523342074: New client connected from 192.168.1.97 as ESPClient_5C:CF:7F:6E:35:4D (c1, k15, u'ha').
1523342095: Client ESPClient_5C:CF:7F:6E:35:4D has exceeded timeout, disconnecting.
1523342095: Socket error on client ESPClient_5C:CF:7F:6E:35:4D, disconnecting.
/etc/mosquitto.conf,内容如下(其中user原为root,手动修改为非root用户ha,修改后也重新安装过mosquitto):
##
# defaults
protocol mqtt
user ha
port 1883
max_connections -1
allow_anonymous true
##
# logging
log_dest stdout
##
# datastore
persistence true
persistence_location /data/
##
# User settings
#password_file /data/users.db
#allow_anonymous false
#include_dir /share/mosquitto
mosquitto版本如下:(状态显示启动了的)
Mosquitto broker1.0
An Open Source MQTT broker.
Visit Mosquitto broker page for details.
|
|