Is my SD on it's way out?

Was starting to get somewhere with my hass.io install - presence detection working well, esphomeyaml being used to program an ESP32, switches and lights working. Well, I decided to try writing an automation with node-red to switch on an outside light when the house is newly occupied if the sun was down. Seemed to be working, but the light kept coming on when it shouldn’t.

Anyway, noticed the green light on my pi was solid on - in fact it’s been getting like this for the last day or so. Then I find the interface stopped working. Site timing out. Notepad+++ with a config file open, not responding. Green light suddenly out. So I waited about 10 minutes, then pulled the power.

Now I tried to reboot, get back into rode red, pi crashes again, wait a while, pull the power, turn it back on, head to hass.io and stop node red, stop it from starting at boot up. Things get snappy again, interface starts to respond quickly. I decide to open esphomeyaml and amend the firmware i have running on the esp32. Again it gets sluggish, green light on all the time. It’s been on solid for about 25 minutes now.

Is my SD dying do you think?

Any errors in the log file?

Only errors related to the metoffice plugin;

2018-11-24 00:32:48 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 356, in _async_add_entity await entity.async_update_ha_state() File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 240, in async_update_ha_state device_attr = self.device_state_attributes File “/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/metoffice.py”, line 166, in device_state_attributes attr[ATTR_LAST_UPDATE] = self.data.data.date AttributeError: ‘bool’ object has no attribute ‘date’

One early this morning
2018-11-24 01:32:52 ERROR (MainThread) [homeassistant.components.updater] Got unexpected response: None

A whole bunch of these shortly after:
2018-11-24 01:41:15 WARNING (MainThread) [homeassistant.components.device_tracker] Updating device list from nmap_tracker took longer than the scheduled scan interval 0:00:12

Which came as a surprise until I found in my config I’d missed out the underscore in home_interval: 300

I just fixed that and restarted. Green light is still thrashing away almost all the time.

On the positive side, I installed the log viewer plugin the a while back, but have noticed you can view the full log by clicking the button at the very bottom of the summary.

Shutdown the board to sort some cabling out, it wont boot at all now. Cant be sure if its the sd card or the installation with the issue.

Took a backup of the config files yesterday, so not too bothered.

If possible, connect the Pi to a monitor before you start it up the next time - when you follow the boot process it will show some distinct error messages if there is an issue with the SD card.
Forgot what they are, but they were pretty clear as far as I remember.

Ok I’ve finally worked something out. Seems this thrashing starts if I have esphomeyaml and node-red running, assemble a flow and deploy. Up until deploy everything seems ok.

Esphomeyaml seems to work fine independantly of node-red. I’m testing today to see if node-red works ok on its own. once I can reproduce the issue with certainty, I’ll post again.

Esphomeyaml seems to slow my system down a bit too. I don’t have it set to start on boot. I only start it when I need it then turn it off. Same with Tasmodmin.

Well, had trouble booting again today, went and got a hdmi cable and it turns out the SD card is in all kinds of trouble. Lots of I/O errors, block errors, attempts by the system to remount, squashfs errors. So the weird stuff was perhaps down to the SD all along.

On the upside is I now have a rpi3 and a 64 gig card (and a hdmi cable!). :grin: