Hi All,
I have been using hassbian a while back and it was simple installation - since i was not involve in home Automation and it did the simple tasks that i needed, So I was satisfied with it. Had not have MQTT on it - so I am not experienced with Message Queuing.
Now that I am REALLY interested in making Home Automation works - i have already got a couple of Raspberry Pi’s 3 Model B and I have decided to plunge into the HassIO as it was suggested to me.
So that exactly what I did, and realized that IT HAD CHANGED A LOT since I worked with it.
Now I have version 0.99.3 (latest) installed using the image provided for RPI3 and RPI3B.
I have unstalled configurator and Node Red and also ESPHome and also made it to work with DuckDNS remotely.
Now that I want to start making it the main MQTT Hub I have difficulties to understand How to do it?
I have Installed the MQTT Broker from Hass.IO add-on page. Mosquitto broker page
Added a dedicated user with password.
and set it up as follwed:
{
"logins": [
{
"username": "mymqttuser",
"password": "mymqttupass"
}
],
"anonymous": false,
"customize": {
"active": true,
"folder": "mosquitto"
},
"certfile": "fullchain.pem",
"keyfile": "privkey.pem",
"require_certificate": false
}
I also made the change to ACL mentioned in the MQTT Broker page since I installed version > 4.1 of the MQTT Broker.
"active": true,
and created the mosquitto folder under
/usr/share/hassio/share
and created the files needed including information required.
I have created the files:
/usr/share/hassio/share/mosquitto/accesscontrollist
/usr/share/hassio/share/mosquitto/acl.conf
and edit the MQTT credentials in them.
After making the above changes I started the MQTT Broker.
Not sure what exactly it is doing in the background.
Q: Do I need to manually install mosquitto?
After Clicking START and made the integration to the MQTT and enabled Discovery I have the following in my log:
[21:18:05] INFO: Setup mosquitto configuration
[21:18:05] INFO: Found local users inside config
[21:18:06] INFO: Initialize Hass.io Add-on services
[21:18:06] INFO: Initialize Home Assistant discovery
[21:18:06] INFO: Start Mosquitto daemon
1570385886: Loading config file /share/mosquitto/acl.conf
1570385886: mosquitto version 1.6.3 starting
1570385886: Config loaded from /etc/mosquitto.conf.
1570385886: Loading plugin: /usr/share/mosquitto/auth-plug.so
1570385886: |-- *** auth-plug: startup
1570385886: ├── Username/password checking enabled.
1570385886: ├── TLS-PSK checking enabled.
1570385886: └── Extended authentication not enabled.
1570385886: Opening ipv4 listen socket on port 1883.
1570385886: Opening ipv6 listen socket on port 1883.
1570385886: Opening websockets listen socket on port 1884.
1570385886: Opening ipv4 listen socket on port 8883.
1570385886: Opening ipv6 listen socket on port 8883.
1570385886: Opening websockets listen socket on port 8884.
1570385886: Warning: Mosquitto should not be run as root/administrator.
1570385923: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
It seems like Everything is Workimg… But I am Confused since I don’t EVEN know how to test if MQTT is working or not?
Q: Why does it say 172.30.32.1 When my RPI IP is 192.168.1.XX?
1570385923: New connection from 172.30.32.1 on port 1883.
I also added the following to my configuration.yaml
mqtt:
discovery: true
broker: 192.168.1.XX # My RPI IP
port: 1883
username: mymqttuser
password: mymqttupass
I am not sure I understand what I am doing wrong?
I would be happy to get help on testing the MQTT since when I tried testing the example provided I got Error about double payload or something like that.
using the
mqtt.publish
with the payload:
{
"topic": "/homeassistant/hello",
"payload": "This is great",
"payload_template": "{{ states('sensor.temperature') }}",
"qos": 2,
"retain": true
}
And it failed to call service.
I tried deleting one of the payloads and the error message was gone. But no indication if the Service was succeeded at all. So I do NOT even know if I have an MQTT server running at all.
I want to be sure that my MQTT server is UP and running as it should before I am starting adding devices - Since i will not be able to figure out the cause if nothing works. Is it the Server or the device?
I am VERY sorry for the VERY long Question;
I am New with Hass.IO and HA in general. and I would be happy to start Automating my home.
Please assist my with understanding what i was doing wrong? and I would be happy if someone can answer my two questions above as well.
I have so many things I want to implement using HassIO and Node RED and MQTT, I have been watching so many tutorials that I am so eager to Start.
Thank you so much
Aryeduino