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

 找回密码
 立即注册
楼主:

[学习笔记] 关于HASSIO安装MQTT教程及注意事项!

  [复制链接]

6

主题

256

帖子

1743

积分

金牌会员

Rank: 6Rank: 6

积分
1743
金钱
1487
HASS币
0
发表于 2020-3-12 19:24:53 | 显示全部楼层
z741554038 发表于 2020-3-10 00:42
求教囧大,用mosquitto作为mqtt broker,在nodered的mqtt out 和mqtt in没反应,ha配置的实体还是unavailab ...

问题解决:打开mqtt配置相应mqtt的服务器端口和账号密码
回复

使用道具 举报

1

主题

26

帖子

95

积分

注册会员

Rank: 2

积分
95
金钱
69
HASS币
0
发表于 2020-3-18 23:24:45 | 显示全部楼层
顶顶!!!!!!!
回复

使用道具 举报

1

主题

26

帖子

95

积分

注册会员

Rank: 2

积分
95
金钱
69
HASS币
0
发表于 2020-3-18 23:44:58 | 显示全部楼层
看看看!!!!!!
回复

使用道具 举报

1

主题

26

帖子

95

积分

注册会员

Rank: 2

积分
95
金钱
69
HASS币
0
发表于 2020-3-19 00:02:11 | 显示全部楼层
新版config好像变成这样的了
logins:
  - username: mqtt
    password: mqtt
anonymous: false
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false
不知道我是否设置有误?
回复

使用道具 举报

123

主题

4661

帖子

1万

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
16410
金钱
11664
HASS币
45
 楼主| 发表于 2020-3-19 12:34:00 | 显示全部楼层
turt 发表于 2020-3-19 00:02
新版config好像变成这样的了
logins:
  - username: mqtt

你是对的,由json改为yaml格式了。
回复

使用道具 举报

0

主题

25

帖子

124

积分

注册会员

Rank: 2

积分
124
金钱
99
HASS币
0
发表于 2020-4-3 21:23:42 | 显示全部楼层
太受用了。 一针见血
回复

使用道具 举报

0

主题

23

帖子

73

积分

注册会员

Rank: 2

积分
73
金钱
50
HASS币
0
发表于 2020-4-9 15:53:43 | 显示全部楼层
大佬写的太好了,对我这样的小白非常有用!!!!
回复

使用道具 举报

2

主题

58

帖子

306

积分

中级会员

Rank: 3Rank: 3

积分
306
金钱
248
HASS币
0
发表于 2020-5-7 15:44:09 | 显示全部楼层
情非殇 发表于 2018-12-22 13:00
为什么不建议用内置的mqtt,我一直用的内置,通过yaml写入的,没什么问题呀

我这个懒人觉得能用一个工具解 ...

我就是这么用的,一直提示could not be set up, not authorized,唉
回复

使用道具 举报

0

主题

4

帖子

45

积分

新手上路

Rank: 1

积分
45
金钱
41
HASS币
0
发表于 2020-5-12 00:54:02 | 显示全部楼层
瓦力948 发表于 2020-2-8 03:39
代码复制到那里啊,网上的教程都找不到

同问,这个代码复制到哪里?我配置里面 微信截图_20200512005255.png 不知道在哪里写代码 求教下
回复

使用道具 举报

12

主题

351

帖子

1172

积分

金牌会员

Rank: 6Rank: 6

积分
1172
金钱
821
HASS币
0
发表于 2020-6-6 18:33:20 | 显示全部楼层
本帖最后由 wktm 于 2020-6-6 18:40 编辑
囧 发表于 2020-3-19 12:34
你是对的,由json改为yaml格式了。

这样填完还是不行呀,运行日志里 提示的地址居然是
发现了:1591437035: New connection from 172.30.33.2 on port 1883.
1591437035: Socket error on client <unknown>, disconnecting
重启全文:

<pre><font size="2"><span>[18:33:45] INFO: </span><span class="fg-blue">Setup mosquitto configuration</span><span>
[18:33:45] WARNING: </span><span class="fg-yellow">SSL not enabled - No valid certs found!</span><span>
[18:33:45] INFO: </span><span class="fg-blue">Found local users inside config</span><span>
[18:33:46] INFO: </span><span class="fg-blue">Initialize Hass.io Add-on services</span><span>
[18:33:46] INFO: </span><span class="fg-blue">Initialize Home Assistant discovery</span><span>
[18:33:46] INFO: </span><span class="fg-blue">Start Mosquitto daemon</span><span>
1591439626: mosquitto version 1.6.3 starting
1591439626: Config loaded from /etc/mosquitto.conf.
1591439626: Loading plugin: /usr/share/mosquitto/auth-plug.so
1591439626: |-- *** auth-plug: startup
1591439626:  ├── Username/password checking enabled.
1591439626:  ├── TLS-PSK checking enabled.
1591439626:  └── Extended authentication not enabled.
1591439626: Opening ipv4 listen socket on port 1883.
1591439626: Opening ipv6 listen socket on port 1883.
1591439626: Opening websockets listen socket on port 1884.
1591439627: Warning: Mosquitto should not be run as root/administrator.
1591439630: New connection from 172.30.33.2 on port 1883.
1591439630: Socket error on client <unknown>, disconnecting.
1591439640: New connection from 172.30.33.2 on port 1883.
1591439640: Socket error on client <unknown>, disconnecting.
1591439650: New connection from 172.30.33.2 on port 1883.
1591439650: Socket error on client <unknown>, disconnecting.
1591439660: New connection from 172.30.33.2 on port 1883.
1591439660: Socket error on client <unknown>, disconnecting.
1591439670: New connection from 172.30.33.2 on port 1883.
1591439670: Socket error on client <unknown>, disconnecting.
1591439680: New connection from 172.30.33.2 on port 1883.
1591439680: Socket error on client <unknown>, disconnecting.
1591439690: New connection from 172.30.33.2 on port 1883.
1591439690: Socket error on client <unknown>, disconnecting.
1591439700: New connection from 172.30.33.2 on port 1883.
1591439700: Socket error on client <unknown>, disconnecting.
1591439710: New connection from 172.30.33.2 on port 1883.
1591439710: Socket error on client <unknown>, disconnecting.
1591439720: New connection from 172.30.33.2 on port 1883.
1591439720: Socket error on client <unknown>, disconnecting.
1591439730: New connection from 172.30.33.2 on port 1883.
1591439730: Socket error on client <unknown>, disconnecting.
1591439730: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1591439732: New client connected from 172.30.32.1 as auto-68F70A78-8E91-FA52-F1A6-1ECCD71F43C7 (p2, c1, k60, u'homeassistant').
1591439740: New connection from 172.30.33.2 on port 1883.
1591439740: Socket error on client <unknown>, disconnecting.
1591439750: New connection from 172.30.33.2 on port 1883.
1591439750: Socket error on client <unknown>, disconnecting.
1591439760: New connection from 172.30.33.2 on port 1883.
1591439760: Socket error on client <unknown>, disconnecting.
1591439770: New connection from 172.30.33.2 on port 1883.
1591439770: Socket error on client <unknown>, disconnecting.
1591439780: New connection from 172.30.33.2 on port 1883.
1591439780: Socket error on client <unknown>, disconnecting.
1591439790: New connection from 172.30.33.2 on port 1883.
1591439790: Socket error on client <unknown>, disconnecting.
1591439800: New connection from 172.30.33.2 on port 1883.
1591439800: Socket error on client <unknown>, disconnecting.
1591439810: New connection from 172.30.33.2 on port 1883.
1591439810: Socket error on client <unknown>, disconnecting.
1591439820: New connection from 172.30.33.2 on port 1883.
1591439820: Socket error on client <unknown>, disconnecting.</span></font></pre>


我在配置里填的是:
mqtt:
  broker: 192.168.8.243
  port: 1883
  username: mqtt
  password: mqtt
  discovery: false

我的树莓派一键安装的hassio
树莓派打开hass地址是192.168.8.243:8123
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 04:17 , Processed in 0.174237 second(s), 38 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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