MQTT Sensor - unknown :SOLVED

Use Home Assistant to publish a payload to pool/airtemp while MQTT.fx is connected to the broker.

Screenshot%20from%202019-08-24%2010-14-44

MQTT.fx should show the published value. This simple test will confirm that both Home Assistant and MQTT.fx are properly connected to the broker.

After completing this test, sensor.pool_air_temp should also report the value you published (80 in the example above).

  • If neither MQTT.fx or the sensor report the value then we know we have a basic connection problem between Home Assistant and the broker.
  • If only MQTT.fx sees the new value but not the sensor, then we know the problem is not simply ‘plumbing’ but something more subtle.

Well, that didn’t yield the result I expected. Looks like maybe there’s an issue with the connection.

I changed the client id in MQTT.fx to “MQTTFX” and get the following in the Mosquitto log in HA:

1566686722: New client connected from 192.168.1.171 as MQTTFX (p2, c1, k60, u'e2s').

What was the result?

When I published the message via Home Assistant, nothing happened in MQTT.fx

That means there’s a basic ‘plumbing’ problem.

Possibilities:

  1. Home Assistant is not connected to the MQTT broker.
  2. You have two MQTT brokers and Home Assistant and MQTT.fx are not connected to the same one.

I suspect it’s the first one. How have you configured Home Assistant to connect to the MQTT broker?

I’m using the Hassio add-on with pretty much default settings (besides un/pw).

The data I’m pulling from is coming from a separate version of Node-Red (not on my HA box), but is pointing to the MQTT server on Home Assistant. MQTT sees this data, but Home Assistant doesn’t.

I only have that one broker.

Did you create an ACL?

Since version 4.1 of the addon, an explicit ACL definition is now required, see these instructions.

ok need to check setting.

in the addon you have Mosquitto broker
with these setting


and

and now u need the user

and on the Tasmota

REMEBER READ SOMEWHERE YOU MUST HAVE A USER AND CAN’T BE HASSIO

and acl and accesscontrol list (active: true)

I have everything setup as described. I already had ACL setup and the log seems to show the user connecting the mqtt.

Double-check everything because if the test (that I suggested you try) resulted in failure, it clearly indicates Home Assistant does not have a functioning connection to the MQTT broker.

Here is what I have. Not sure what’s wrong beside having 172.30… IP address coming from Hassio?



When I try to follow the instructions, going to Configuration --> Integrations --> MQTT Broker, I get the following and no place to add Hassio IP address, etc. I’ve commented out any mention of MQTT in my configuration.yaml:

What do have in this file: /share/mosquitto/accesscontrollist

Is it this:

user e2s
topic readwrite #

or this:

user e2s
topic readwrite #
user homeassistant
topic readwrite #
user e2s
topic readwrite #

Just for fun, try adding the homeassistant user to the ACL (as shown above). This seemed to resolve the issue David was experiencing (in the other thread).

I tried that and still doesn’t appear to be working.

Should there be options under the integrations tab or are the instructions outdated?

Mine is blank per the above screenshot.

Solved the problem in case anyone else runs into this issue:

I deleted the “integration” for MQTT and re-added. Then the option showed up allowing me to enter my broker credentials, and all is good in the world.

1 Like

There’s a ticking sound in my house that I can’t locate.

Solution: I replaced my house.

:wink:

I guess it’s like the “reboot your computer” solution. Sometimes it actually works. Thanks for all your detailed assistance, it was a good exercise to help me better understand how mqtt works overall :slight_smile:

I would not have thought to nuke the integration. Thank you!