Hi,
I’m running Home Assistant 0.62.1
I enabled the mqtt broker adding
mqtt:
to my configuration.yaml file and a new icon appeared in developer tools next to info icon.
I wrote code for arduino that uses PubSubClient class to connect to MQTT broker.
I tested it with “broker.hivemq.com” with no user & password and I got it working.
After that I switchet to my “hassbian” server using homeassistant user and my API Password.
Unfortunately I can’t connect to the broker:
client.setServer( MQTT_Server, 1883 );
client.connect(“Power Client”, MQTT_USER, MQTT_PSW); => false
client.state() => -2
Local names resolution (non FQDN) is not standard DNS protocol, but other protocols like Avahi or Bonjour. Your PC has a fun networking stack that can use those protocols, but Arduino has a simplified stack doing only basic DNS queries.
tl;dr if a network call with a name doesn’t work always try with the IP address