After the update Homeassistant & MQTT broker integration broken

Yesterday I have update home assistant & mqtt broker via dietpi pi provided upgrade methods on my raspberry B2. after these up-gradation my homeassitant & mqtt broker integration broke. & the logs show me something like this.
https://dpaste.org/jGF7C

mqtt broker & zigbee2mqtt leg working fine. but home assistant & mqtt broker leg broken. this may be caused by some new up gradation in homeassistant side as now instead of cli they are going toward GUI. but which ever the reason my system is struck after these upgrades. please help me to figure out the problem & help me make my system workable.

root@DietPi:~# mosquitto -h
mosquitto version 2.0.13

mosquitto is an MQTT v5.0/v3.1.1/v3.1 broker.

Usage: mosquitto [-c config_file] [-d] [-h] [-p port]

-c : specify the broker config file.
-d : put the broker into the background after starting.
-h : display this help.
-p : start the broker listening on the specified port.
Not recommended in conjunction with the -c option.
-v : verbose mode - enable all logging types. This overrides
any logging options given in the config file.

See https://mosquitto.org/ for more information.

Installed Home-assistant information:
Home Assistant 2022.10.5
Frontend 20221010.0 - latest

Did you tried to restart the HA service to trigger build of missing module?

I have restarted homeassistant, mqtt beroker many times, even reboot many time. but still integration is broken, in GUI it shows like
image

i am not able to remove this integration in GUI. and in logs it is showing somthing related to
` * The Python version is: Python3.9 from β€œ/home/homeassistant/.pyenv/versions/3.9.15/bin/python3.9”

  • The NumPy version is: β€œ1.23.2”
    `
    or

`

  • Original error was: libcblas.so.3: cannot open shared object file: No such file or directory
    `
    and when i tried to add new mqtt ingratiation in GUI, this pop up window pop
    image

theoretically you could do this from CLI

nano /mnt/dietpi_userdata/homeassistant/.storage/core.config_entries
systemctl restart home-assistant.service

remove the whole section for mqtt

do you suggest i will remove these things from that file

      {
        "entry_id": "81e49cc616e511ebb99727d7b8c3dbfa",
        "version": 1,
        "domain": "mqtt",
        "title": "configuration.yaml",
        "data": {
          "birth_message": {
            "topic": "hass/status",
            "payload": "online",
            "qos": 0,
            "retain": false
          },
          "broker": "127.0.0.1",
          "discovery": true,
          "will_message": {
            "topic": "hass/status",
            "payload": "offline",
            "qos": 0,
            "retain": false
          },
          "port": 1883
        },
        "options": {},
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "import",
        "unique_id": null,
        "disabled_by": null
      },

yes. to be save, you can create a copy of that file before. Or even better you would have created a backup of your entire system before doing the update/upgrade of HA

cp -p /mnt/dietpi_userdata/homeassistant/.storage/core.config_entries /mnt/dietpi_userdata/homeassistant/.storage/core.config_entries.backup

after doing that homeassistant fail to start, i have ssh via root user so when i saved that file i think come into root user permission. so now home assistant not start

Oct 24 15:20:54 DietPi systemd[1]: Stopping Home Assistant (DietPi)...
Oct 24 15:20:56 DietPi systemd[1]: home-assistant.service: Succeeded.
Oct 24 15:20:56 DietPi systemd[1]: Stopped Home Assistant (DietPi).
Oct 24 15:20:56 DietPi systemd[1]: home-assistant.service: Consumed 3min 26.994s CPU time.
Oct 24 15:20:56 DietPi systemd[1]: Started Home Assistant (DietPi).
Oct 24 15:21:07 DietPi Home Assistant[17637]: 2022-10-24 15:21:07.781 ERROR (SyncWorker_0) [homeassistant.util.json] Could not parse JSON content: /mnt/dietpi_userdata/homeassistant/.storage/core.config_entries
Oct 24 15:21:07 DietPi Home Assistant[17637]: Traceback (most recent call last):
Oct 24 15:21:07 DietPi Home Assistant[17637]:   File "/home/homeassistant/.pyenv/versions/3.9.15/lib/python3.9/site-packages/homeassistant/util/json.py", line 39, in load_json
Oct 24 15:21:07 DietPi Home Assistant[17637]:     return orjson.loads(fdesc.read())  # type: ignore[no-any-return]
Oct 24 15:21:07 DietPi Home Assistant[17637]: orjson.JSONDecodeError: unexpected content after document: line 2 column 12 (char 12)
Oct 24 15:21:08 DietPi systemd[1]: home-assistant.service: Main process exited, code=exited, status=1/FAILURE
Oct 24 15:21:08 DietPi systemd[1]: home-assistant.service: Failed with result 'exit-code'.
Oct 24 15:21:08 DietPi systemd[1]: home-assistant.service: Consumed 11.928s CPU time.

can you share following

cat /mnt/dietpi_userdata/homeassistant/.storage/core.config_entries

I have recovered my file again from backup. as i do not want to mess up with home assistant internal work-ability. so mqtt section is in my core.config_entriese

please check on your side with every thing updated mqtt broker communicate with homeasssitant. as the base of issue is some dependency missing

I tested it without issues and MQTT was removed as integration. You could have shared core.config_entries

I did a test install on my R5S without issue. HA and Mosquitto could be configured together.

https://dpaste.org/0LA5e

have you checked this page Troubleshooting ImportError β€” NumPy v1.24.dev0 Manual . may be i am using raspberry pi & this page shows some missing files in raspberry pi

" libf77blas.so.3: cannot open shared object file: No such file or directory "

Is this an error message you actually have? If yes, where you have seen it?

As well try to remove mqtt configuration part again from your settings file and restart HA. Usually it should work. If it is failing again, post latest HA logs and the content of your confirmation file.

the first log file i shared https://dpaste.org/jGF7C , please check line no 27. which mentioned about failure regarding β€œlibf77blas.so.3”

I have edited our file " core.config_entries" & remove mqtt section and restart my homeassistant. now in gui mqtt section gone. after that i try to add mqtt section again (in gui). i recieved folowwing error in gui.
image

if i want to give these three commands based on guideline mentioned at "Troubleshooting ImportError β€” NumPy v1.24.dev0 Manual "

  1. sudo apt-get install libatlas-base-dev
  2. pip3 uninstall numpy
  3. apt install python3-numpy

as per dietpi o/s arrangement please translate them in to dietpi environment.

Oct 25 08:37:27 DietPi Home Assistant[23916]: We have compiled some common reasons and troubleshooting tips at:
Oct 25 08:37:27 DietPi Home Assistant[23916]:     https://numpy.org/devdocs/user/troubleshooting-importerror.html
Oct 25 08:37:27 DietPi Home Assistant[23916]: Please note and check the following:
Oct 25 08:37:27 DietPi Home Assistant[23916]:   * The Python version is: Python3.9 from "/home/homeassistant/.pyenv/versions/3.9.15/bin/python3.9"
Oct 25 08:37:27 DietPi Home Assistant[23916]:   * The NumPy version is: "1.23.2"
Oct 25 08:37:27 DietPi Home Assistant[23916]: and make sure that they are the versions you expect.
Oct 25 08:37:27 DietPi Home Assistant[23916]: Please carefully study the documentation linked above for further help.
Oct 25 08:37:27 DietPi Home Assistant[23916]: Original error was: libcblas.so.3: cannot open shared object file: No such file or directory

as per our online docs

  1. login as user root
apt install libatlas-base-dev
  1. switch to user homeassistant
sudo -u homeassistant bash
. /home/homeassistant/pyenv-activate.sh
pip3 uninstall numpy
  1. exit and switch back to user root
apt install python3-numpy
1 Like

Thanks @Joulinar, after giving your given commands in order, my system able to contact with mqtt broker by adding mqtt broker via GUI. thanks my all sensors now online. so i think in raspberry pi homeassistant & mqtt broker these commands needed for make system workable. thanks

@mail2rst
you are running 32bit system, right?