Hi,
I want to integrate my new Shelly H&T sensor to Home Assistant (running Hass.io on Raspberry Pi) and, therefore, want to set up a MQTT broker. I have tried to set up the Mosquitto MQTT broker and to integrate the Shelly H&T sensor in Home Assistant but I am a bit overwhelmed. Could somebody help me through the debugging process step by step?
At First, I went to Home Assistant frontend → Hass.io tab → Add-on store → and installed the Mosquitto broker. Then I followed the instructions on https://www.home-assistant.io/addons/mosquitto/, set up an username and password, left anything else as it was and restarted Home Assistant.
Now, under Developer tools I got a new MQTT symbol where I can Publish a packet (not really sure what to do here…).
I didn’t change the configuration.yaml as the instruction said there is no need for it.
After the installation of Mosquitto Broker, I activated MQTT Service on my Shelly device, put in username, password IP address and port of the installed Mosquitto Broker following the instructions of The Hook Up (https://www.youtube.com/watch?v=VqxCf3NjVDU).
Now, I got three new shelly sensor entities, but the sensors seem to not receive any data.
How can I check whether the Mosquitto Broker receives any data from the Shelly Sensor? How can I test whether the Mosquito Broker is set up correctly and ready to receive MQTT data?
Do you have the ssh server set up on hassio? If not you should. It is another addon like mosquitto is. It isn’t necessary for mosquitto, but it is good for lots of things.
Once you have ssh up and running, then you can run the test on the page you pointed to.
thanks for your reply. No, have not set up a ssh server yet. But I am gonna do it.
However, the MQTT broker seems to work now as my shelly sensors in Home Assistant are receiving data. But I have not changed anything. Apparently, the Shelly H&T sends only data in certain time periods (standard is every hour) or on certain events (e.g. the temperature changes).
So, after set up the sensors in Home Assistant, you have to give it some time to see whether it works.
I recommend this question as a guide.
I spent so much time trying to get my setup to work and zilch.
I followed the steps you described in such great detail, worked perfectly.
Thank you OP!!
I installed mosquitto and now I’m not sure I needed configuration.yaml entries. All my mqtt sensors from my 0.84.4 Hassio system no longer work. My confusion comes from the message that the built-in mqtt broker is deprecated, I have an mqtt tab on my Developer Tools page that doesn’t seem to do anything, I can’t add an mqtt user from configuration->mqtt-> manage users, but there is already one there as an administrator.
How do I figure out what’s going on with my mqtt broker, which broker is running, or if there is a conflict between the built in and mosquitto brokers?
I followed the mosquitto instructions page here but they seem to be different from what I see when using version 0.98.5 Hass.io system. Are these instructions still appropriate or updated for 0.98.5? Specifically,
Install the Mosquitto add-on with the default configuration via ‘Hass.io > ADD-ON STORE’. (Don’t forget to start the add-on & verify that ‘Start on boot’ is enabled.) [DONE]
Create a new user for MQTT via the Configuration > Users (manage users) . (Note: This name cannot be “homeassistant” or “addon”) [CAN’T CREATE A USER - JUST DELETE THE EXISTING ONE]
Once back on-line, return to Configuration > Integrations and select configure next to MQTT . [IT’s EMPTY - THIS INTEGRATION HAS NO DEVICES]
Yes - I’m thoroughly confused here and could use some help. Like I said, mosquitto used to work fine on my 0.84.4 HA system.
I mean there is options only to Rename the user or delete it. There is no add user button.
When I pull down the “Administrators” box and change to “User” the message appears:
The users group is a work in progress. The user will be unable to administer the instance via the UI. We’re still auditing all management API endpoints to ensure that they correctly limit access to administrators.
So it’s not clear what to do here on the manage users page.
My device still don’t communicate although I see the client connect in the mosquitto log.
There is one on the main users page that has 4 names:
Home Assistant Cloud
Administrators - System Generated >
Hass.io
Administrators - System Generated >
Homexuser
Administrators >
Mosquitto
Administrators >
So when I go into Mosquitto, there is only one user and I can’t add another. Just rename or delete it.
Are you suggesting I add another Mosquitto user on the main user’s page? The Circle + dialog asks for Name, Username, Password. But no association with Mosquitto which I configured the client user in the Mosquitto parameters.
Sorry if I’m being thick here but all this used to work as expected by configuring the Mosquitto Add-on’s parameters in the config section before starting it.
EDIT: MADE IT WORK, SERVER RESTART HELPED (yet I have to edit all sensor info via configuration.yaml). LEAVING THIS COMMENT AS A TUTORIAL
Hi, I also have a problem with configuring Mosquitto with HA. So basically I’m running HA on old Android device (followed this great tutorial). It’s working fine and I wanted to add my USB meter with ESPeasy.
What I’ve done:
Setup login and password with mosquitto_passwd -c logdata.txt hoplophile
And now the problem starts, because I don’t know how to pass data from mosquitto to HA. Please note that I don’t have tha Add-ons menu in my HA. I edited configuration.yaml file:
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
mobile_app:
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
mqtt:
broker: 10.0.0.126
port: 1883
username: hoplophile
password: h***e
sensor:
- platform: mqtt
name: "USB Meter Power"
state_topic: "USB_monitor/PowerMeter/Power"