『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 7463|回复: 1

[求助] hassio安装mqtt总是报错,请求帮助!

[复制链接]

1

主题

231

帖子

2850

积分

金牌会员

Rank: 6Rank: 6

积分
2850
金钱
2619
HASS币
0
发表于 2018-4-10 15:15:17 | 显示全部楼层 |阅读模式
本帖最后由 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.







回复

使用道具 举报

175

主题

2967

帖子

7608

积分

超级版主

我就是六神

Rank: 8Rank: 8

积分
7608
金钱
4616
HASS币
398

活跃会员教程狂人灌水之王

QQ
发表于 2018-4-12 13:21:55 | 显示全部楼层
同样也是一直丢设备~~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-24 02:20 , Processed in 0.052348 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表