Proper mqtt server name on hassio

mosquitto tools package isn’t installed in the hass.io container

tested what??? I can’t understand your setup or what you are trying to do here.
I have a RPi running my coffee roaster with a script that sends messages via mqtt to my HA broker using mosquitto_pub and an MQTT sensor that sees those and sends notifications to my phone… You just need to make sure you only have one broker on the Pi. One broker, one ip address one port (1883)

If you just updated the broker in hassio, can you show your config please for the broker.

Yep
You can potentially have 3 although port conflicts wont allow them to all run
Remember there is an internal mqtt that HA has
If you just add mqtt: to your config it gets enabled
If you specified a broker it won’t enable it and will look for the broker instead.

um… no… not with hassio - you need the broker addon or some other broker

Ok:

rpi2-hassio has home assistant running on it. Its 192.168.1.113

rpi3-raspbian has python scripts that run based on the mqtt message received. Its 192.168.1.117.

When I test from Developer Tools on rpi2-hassio I used to get the message but not after updating mqtt from 2 to 5.1.

Before upgrade:

After upgrade:

No you can but your host would need to use non default ports and the add-on the same
If you just have
mqtt:
And nothing else
It will attempt to load the internal broker. Using default ports.
Its possible !

Without your configs we might as well play darts

hahahaha

sorry, how do i send you the configs for it? from configuration.yaml?

There is no internal broker with hassio
the mqtt: is no longer needed since around v4 of the addon.

@marciokoko
need to show your configuration yaml and the broker addon config

configuration.yaml

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 25.5263
  longitude: -48.0307
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 90
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: America/Tegucigalpa
  # Customization file
  customize: !include customize.yaml

# Show links to resources in log and frontend
#introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time
history:

# View all events in a logbook
logbook:

# Enables a map showing the location of tracked devices
map:

# Track the sun
sun:

# Example configuration.yaml entry
input_boolean:
  notify_home:
    name: Publish MQTT msg
    icon: mdi:car

  power_kompressor:
    name: Kompressor
    icon: mdi:car

  power_solenoid:
    name: Solenoid
    icon: mdi:car

# MQTT Switches RPi2 - RPi3
switch:
  - platform: mqtt
    name: kompressor
    command_topic: "test_channel"
    payload_on: "komp-on"
    payload_off: "komp-off"
  - platform: mqtt
    name: solenoid
    command_topic: "test_channel"
    payload_on: "sole-on"
    payload_off: "sole-off"
    
# Sensors
sensor:
  # Weather prediction
  - platform: yr
  
  # Emoncms
  - platform: emoncms
    api_key: myapikey
    url: http://myserver.com/emoncms/
    id: 1

# Example configuration.yaml entry configuring HomeKit
homekit:

mqtt:
  broker: 192.168.1.117
  
sonoff:
  username: [email protected]
  password: mypass
  scan_interval: 60
  grace_period: 600
  api_region: 'us'
  
# Example configuration.yaml entry
device_tracker:
  - platform: bluetooth_le_tracker
  
# Text to speech
tts:
  - platform: google_translate
    service_name: google_say

# Cloud
cloud:

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

panel_iframe:
  configurator:
    title: Configurator
    icon: mdi:wrench
    url: http://hassio.local:3218
    
system_health:

as for my mqtt config, i hope you mean this:

oh i found this at the bottom:

{
  "logins": [],
  "anonymous": false,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "require_certificate": false
}
Log
[19:20:01] INFO: Setup mosquitto configuration
[19:20:01] WARNING: SSL not enabled - No valid certs found!
[19:20:01] INFO: No local user available
[19:20:02] INFO: Initialize Hass.io Add-on services
[19:20:02] INFO: Initialize Home Assistant discovery
[19:20:02] INFO: Start Mosquitto daemon
1578014402: mosquitto version 1.6.3 starting
1578014402: Config loaded from /etc/mosquitto.conf.
1578014402: Loading plugin: /usr/share/mosquitto/auth-plug.so
1578014402:  ├── Username/password checking enabled.
1578014402: |-- *** auth-plug: startup
1578014402:  ├── TLS-PSK checking enabled.
1578014402:  └── Extended authentication not enabled.
1578014402: Opening ipv4 listen socket on port 1883.
1578014402: Opening ipv6 listen socket on port 1883.
1578014402: Opening websockets listen socket on port 1884.
1578014402: Warning: Mosquitto should not be run as root/administrator.
1578014450: New connection from 192.168.1.117 on port 1883.
1578014450: Socket error on client <unknown>, disconnecting.
1578016203: Saving in-memory database to /data/mosquitto.db.
Network
Container	Host	Description
1883/tcp	
1883
1884/tcp	
1884
8883/tcp	
8883
8884/tcp	
8884

ok

So is the Pi running the broker on 192.168.1.117?
You can actually remove

mqtt:
  broker: 192.168.1.117

both lines.

When you don’t define a local user, you need to use a Home Assistant user to authenticate with the broker… You haven’t said what devices you are using.

What do you mean by what devices Im using? The sender, .117, is a raspberry pi 2 running hassio. The receiver is a raspberry pi 3 running raspbian.

As for the user, do I add a user in the Configuration > Users:

yes - configuration users… but the connecting device needs to use the same username/password… or you can set anonymous to true

Ok i set it to true but I still get no response when I send a message:

It may have something to do with this:

Known issues and limitations
Since version 4.1 of the add-on, an explicit ACL definition is now required if you plan to use legacy logins and "anonymous": true see these instructions.

So if i use anonymous true, I HAVE TO add the acl stuff:

yeah… but I know someone else using anonymous didn’t need to do that.

If yu add an acl file, make sure you add a home assistrant user with full rights to it…

user homeassistant
topic readwrite #

in accesscontrollist

Previously you stated
rpi2-hassio has home assistant running on it. Its 192.168.1.113

rpi3-raspbian has python scripts that run based on the mqtt message received. Its 192.168.1.117.
Then you said
rpi2-hassio is .117 and it runs the lovelace interface.

rpi3-raspbian is .113 and it runs the python script mqttReceive.py in my OP which receives the msg and its payload in order to determine which python script to run for relay activation.
So which is it.
Either way
Leave the config
Change broker to the hassio ip
Either disable anonymous
Add user in users and add to config
or setup acl
Set you pi3 to talk to the hassio broker

Ok, its rpi2-hassio is .117. The broker in configuration.yaml is the hassio ip.

I set anonymous to true and created the mosquitto folder inside the share folder and added the acl.conf with:

acl_file /share/mosquitto/accesscontrollist

and the file accesscontrollist file with:

user Marcio Alvarado
topic readwrite #

where Marcio Alvarado is the Admin user.