HA freezing regularly 😭

Hi, im new to HA, hopefully im in the right place to post this…
Im hoping someone with more experience than me can help with diagnosing a problem i have with HA…

I use HA for my diy solar setup.

I have an inverter sending data to HA via a wifi dongle.
I have 2 x jk bms’s sending data to HA via bluetooth.
I have a couple of tasmota smart plugs connected.
I have a couple of led bulbs connected also.

HA is running on a RPI 3B+

The rpi is inside a box bolted to the outside of my shed that contains the inverter and battery banks etc. The rpi is connected to my 2.4g.network via wifi, as i dont have ethernet in the shed… The rpi is on the limit of the wifi range, as when placed inside the shed, it cannot find a wifi signal from my router. The rpi is running off a sd card, which i know wasnt the best sd card to start with :roll_eyes:. There doesnt seem to be a way to boot from an external ssd with a rpi3b+, but it seems you can use an sd card to boot from then use the ssd for data reads/writes if im correct, which im planning to do.

Before i needed to have the rpi on the shed outside due to connecting to bluetooth for the battery bank bms’s, it was in the house, still connected via wifi but with plenty of reception. I would notice it would freeze every few days requiring a reboot.
Now its outside, it needed a reboot every few days also, but this is becoming more frequent, for example, twice in the last 24hrs. So im wondering is this more to do with the sd card getting corrupt rather than wifi disconnection issues? (i have been making iso copies of the sd card once a month to save all the solar system data, and regular ha backups).
Ive not checked the rpi temps or ram usage etc as ive not looked up how to do this yet, but seen it mentioned on other threads.

I have a copy of the log file below, hopefully that will give someone a clue, as there seems to be a number of errors!

Thanks :+1:

2023-05-22 08:54:58.885 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-05-22 08:56:43.145 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
2023-05-22 08:56:43.812 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=134 from 2023-05-21 20:22:35.834283)
2023-05-22 08:57:17.090 WARNING (MainThread) [homeassistant.setup] Setup of zone is taking over 10 seconds.
2023-05-22 08:57:17.137 WARNING (MainThread) [homeassistant.setup] Setup of input_boolean is taking over 10 seconds.
2023-05-22 08:57:17.146 WARNING (MainThread) [homeassistant.setup] Setup of input_text is taking over 10 seconds.
2023-05-22 08:57:17.150 WARNING (MainThread) [homeassistant.setup] Setup of input_button is taking over 10 seconds.
2023-05-22 08:57:17.154 WARNING (MainThread) [homeassistant.setup] Setup of input_select is taking over 10 seconds.
2023-05-22 08:57:17.159 WARNING (MainThread) [homeassistant.setup] Setup of schedule is taking over 10 seconds.
2023-05-22 08:57:17.163 WARNING (MainThread) [homeassistant.setup] Setup of input_number is taking over 10 seconds.
2023-05-22 08:57:17.168 WARNING (MainThread) [homeassistant.setup] Setup of timer is taking over 10 seconds.
2023-05-22 08:57:17.172 WARNING (MainThread) [homeassistant.setup] Setup of counter is taking over 10 seconds.
2023-05-22 08:57:17.176 WARNING (MainThread) [homeassistant.setup] Setup of input_datetime is taking over 10 seconds.
2023-05-22 08:57:17.181 WARNING (MainThread) [homeassistant.setup] Setup of application_credentials is taking over 10 seconds.
2023-05-22 08:57:17.185 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform integration is taking over 10 seconds.
2023-05-22 08:57:17.188 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform integration is taking over 10 seconds.
2023-05-22 08:57:17.192 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform integration is taking over 10 seconds.
2023-05-22 08:57:17.196 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform integration is taking over 10 seconds.
2023-05-22 08:57:17.200 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform integration is taking over 10 seconds.
2023-05-22 08:57:17.203 WARNING (MainThread) [homeassistant.setup] Setup of automation is taking over 10 seconds.
2023-05-22 08:57:17.207 WARNING (MainThread) [homeassistant.setup] Setup of script is taking over 10 seconds.
2023-05-22 08:57:21.021 ERROR (SyncWorker_6) [pymodbus.client.tcp] Connection to (192.168.0.188, 8088) failed: [Errno 113] Host is unreachable
2023-05-22 08:57:31.508 ERROR (Thread-3) [tuya_iot] error while get mqtt config
2023-05-22 08:57:31.522 ERROR (Thread-3) [root] Uncaught thread exception
Traceback (most recent call last):
File “/usr/local/lib/python3.10/threading.py”, line 1016, in _bootstrap_inner
self.run()
File “/usr/local/lib/python3.10/site-packages/tuya_iot/openmq.py”, line 161, in run
time.sleep(self.mq_config.expire_time - 60)
AttributeError: ‘NoneType’ object has no attribute ‘expire_time’
2023-05-22 08:57:36.371 WARNING (MainThread) [homeassistant.config_entries] Config entry ‘Bulb RGBW 985595’ for flux_led integration not ready yet: [Errno 113] Connect call failed (‘192.168.0.103’, 5577); Retrying in background
2023-05-22 08:57:36.392 WARNING (MainThread) [homeassistant.config_entries] Config entry ‘Bulb RGBW 985428’ for flux_led integration not ready yet: [Errno 113] Connect call failed (‘192.168.0.244’, 5577); Retrying in background
2023-05-22 08:57:37.329 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:37.371 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:37.382 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:37.411 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:37.455 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:37.463 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:37.472 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:37.482 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:37.492 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:37.500 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:37.508 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:39.813 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:39.831 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:39.854 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:39.872 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:39.882 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:39.892 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.096 WARNING (MainThread) [homeassistant.config_entries] Config entry ‘LG webOS TV E05A’ for homekit_controller integration not ready yet: Timeout while waiting for connection to device 192.168.0.194:40176; Retrying in background
2023-05-22 08:57:42.548 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.588 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.615 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.627 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.640 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.652 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.664 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.676 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.691 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.701 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.713 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.734 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.744 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.755 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.765 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.775 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.786 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.797 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.807 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.816 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.826 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.836 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.845 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:42.854 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:45.834 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:45.840 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:45.849 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:45.859 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:45.865 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:45.875 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:48.521 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:48.537 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:48.550 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:48.555 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:48.563 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:48.569 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:48.578 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:48.584 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:48.589 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:48.594 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:48.605 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:51.241 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:51.257 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:51.262 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:51.272 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:51.277 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:51.287 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:51.293 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:51.299 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:51.304 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.503 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.513 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.532 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.540 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.550 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.559 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.567 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.574 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.581 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.587 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.595 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.600 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.606 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.611 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.617 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.622 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.628 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.635 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.641 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.646 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.651 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.656 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.662 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.667 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.673 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:54.679 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:56.915 ERROR (SyncWorker_8) [homeassistant.components.modbus.modbus] Pymodbus: epever: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)
2023-05-22 08:57:57.231 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:57.240 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:57.247 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:57.252 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:57.262 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:57.267 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:57.272 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:57.278 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:57:57.286 WARNING (MainThread)

(i deleted some as thread text limit reached)

2023-05-22 08:58:34.070 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.grid_used_today (Wh) can not be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to Link to Developer Tools: Statistics – My Home Assistant to fix this
2023-05-22 08:58:34.785 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:58:34.800 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:58:34.808 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:58:34.815 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:58:34.822 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:58:34.831 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:58:34.839 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:58:34.845 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:58:34.853 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2023-05-22 08:58:35.619 ERROR (SyncWorker_3) [homeassistant.components.modbus.modbus] Pymodbus: epever: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)

It goes on and on for a long time!

Not sure if this is the cause of your problems, but a RPi 3 on a SD-card, …
Have you looked at the CPU/RAM usage?
Also, connected via WiFi… and as you write: ‘on the limit of the WiFi range’…

There are a lot of obstacles for a reliable system in your setup.

I think you should check your SD or powersupply.

is your SD-card A2 class or better as described in the docs?

I didn’t believe it either until I tried, but this makes a lot of difference,
And is your powersupply status always ok? or has it hickups? in the last case you might want to change your adapter to an RPI one and not use a phone charcher(chargers even the best once aren’t stable enough)

Not looked at ram cpu etc… I was hoping the log file would give some clues if it were wifi/sd card related…

Hi, yes the sd card is a class 10 32gb sandisk… The power supply is genuine rpi… Not sure how to check power supply status for hiccups etc?

Ive made iso copies of the sd card each month, and have a new sd card at home to test with by flashing the iso onto the new card. Anyone know if any corrupted areas of the old sd card would be copied accross to the new card? Meaning id be back to square one? If you get what i mean…

I’d get the memory and CPU sensors up and running first. If you have a memory leak, that might cause the freezing you describe, and would be simple to spot with the CPU sensor. You will also need to address the issue with being on the very edge of your wifi range, as this is not ideal. Can you run an ethernet cable to the Raspberry Pi? I don’t know what the limits, in terms of length, are on ethernet cable, but it used to be relatively cheap to get a length made up.

1 Like

Was just a bad sd card in the end. Got it running on ssd now, no issues at all for the last week or two.

Good you got it solved!

Now, before you go… please take the time to mark the answer as solution, you do that by selecting the three dots under the post:

image

Then select the check box:

image

Don’t forget too while you’re down there to click the heart to like the post, as a way of saying thank you.

1 Like