Raspberry Pi frustrationssteemCreated with Sketch.

in #technology3 months ago (edited)

A couple of days ago I posted about trying to set up some Raspberry Pi computers for some home automation with Home Assistant.

I used me new micro SD card to boot up their system image. It is supposed to take some time to download the rest of the system an initialise itself, but two days later it seemed to be stuck. I did get a web page I could connect to saying it would take another 20 minutes, but it was just not happening.

I have tried resetting it a few times, but this is about as far as it gets. The actual last message can vary, but I cannot connect to the web page on my PC any more.

Log

The Pi3 is connected to my network with a cable, so it cannot be a wifi issue. I have been looking at their forums, but it is hard to know exactly what to search for.

In theory this should just work, but when complex systems go wrong they can be hard to diagnose. I use Linux all the time at home, but do not usually have to delve into log files.

It is possible something on the card is corrupted, so I can try writing it yet again.

I have seen people on their forum say they gave up on the Pi and moved to a NUC (mini PC), but I think that was due to issues with the memory card filling up. That should not be the case with a fresh install.

I will have more of a play over the weekend. I know @bozz has also experienced some issues when he has tried this software this week. That makes me wonder if there is some general bug. I will have to ask around.

The geeky guitarist and facilitator of the 10K Minnows Project.

Sort:  

I’m developing a workshop for a local group for some home energy monitoring system. I was going to use a RaspberyPI, but when digging into it they seem more trouble than their worth.

I ended up picking up a 7channel energy monitor from a Canadian company that costs about the same as a PI and all the CTs, etc.

I’m still interested in using a PI for automation, but probably won’t jump in til late 2020, by then you will have found all the bugs.

This app y has lots of people happily using it, so I don't know why it's playing up for me. Mind you, some day a Pi is not great on the long term. I'm considering a NUC as a more stable platform.

The last time I tried to work with my PI I couldn't even get it to display on my "old" flatscreen tv. Worse, I could not access the directory to fix the configuration file on a windows pc lol.
Your post has given me an idea though, because I do have another laptop with a linux system on it now so I can now access the SD cards file system.
I know how frustrating the PI can be, but it's also very rewarding when you achieve the goal you set out to achieve. The amount of work and troubleshooting is pretty substantial sometimes. I wish you luck with your endeavor.

You can edit the SD card directly on a Windows machine and then put it back in the Raspberry Pi.
If you have a Pi 3 you can even boot off USB flash/SSD or even the network.

I was unaware that booting from network is possible. That is pretty cool.

After installing raspbian on the SD card and trying to access the directories on my windows pc I was getting an error for incompatible file system and it just wouldn't work no matter what I tried.
I'm pretty noob at this, but I do have some options and will try again. The major problem is I can't get it to display on my television. Has to do with the default resolution in the config causing display error, but it should be an easy fix once I have access to the directory. I found it's a common problem when using older displays.

Once I'm able to ssh in I shouldn't need a display anyway really.

EDIT: Yeah it's a pi 3. Been collecting dust for some years now and I want to utilize it for learning networking and server application.

Network Boot Tutorial:
https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net_tutorial.md

(Most people won't use network boot unless you have a few, but it is doable).

For windows, you should be able to access the "boot" partition only. This is where a lot of the start up config files are. You just need an empty file named "ssh" to enable SSH.

Almost all of my Raspberry Pi's I setup without a monitor ever.

You need to install OS on SD, edit the boot partition to enable SSH (add the empty file), then use nmap to find the Pi's DHCP ip. Then from there I can configure it.

Thank you so much for the resource and tips @themarkymark.
I'll start working on this tonight and make a post detailing the process once I get it complete.
I need an excuse for sucking out in the weekend GU tournament anyway ;)

Can you get an older image to try it out? If it works you can rule out HW as a cause.

I ought to try alternatives. There's a video on the HA site where a guy installed the 64 bit version. I could try that. Seems it's not as well developed as the 32 bit.

I am still hoping to play with it some more this weekend on my home network. I am hoping I might have better luck than on my work one. I have a handful of NUCs at work and I love them.They can be pricey compared to a Pi though.

Can you post the link to the image you are using, I would like to try this myself. I have never used any custom images. I usually just download latest Raspbian and install software from there.

You can find out here. I was using the 32 bit Pi 3 one. I did check the checksum.

https://www.home-assistant.io/hassio/installation/

It's using a Docker container for the app. I assume that gives them more control, but it restricts the user a bit. Before when I used their Hassbian distro I would install the X10 app from source, but Hass IO does not allow that.

The problem is the limited space of the SD card. Free up more memory on the card.
Or connect an SSD via USB to your PI and copy "/" and "/ home" to the SSD and operate the SD only for the bootloader. This causes significantly fewer errors.

It's a 32GB card, so should have plenty of space before it has even run the app. I ran it on my an 8GB before.

Hi @steevc!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 5.945 which ranks you at #355 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 93 contributions, your post is ranked at #28.

Evaluation of your UA score:
  • You've built up a nice network.
  • The readers like your work!
  • Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!

Feel free to join our @steem-ua Discord server

Has it worked before?

I would log into the Pi and check basic networking. Make sure it has an IP, DNS, and can reach your local LAN.

First, try pinging for the device. Then SSH if that works. If you can't even ping, use nmap to find the IP on the LAN. It could be using a new IP due to DHCP moving it.

It should be plenty powerful enough for most tasks, just keep in mind the SD bus is crazy slow on a Raspberry Pi, and I would recommend using an EVO+ SD card only as it will perform way better than anything else. Even the Sandisk Extremes are much slower. When you are dealing with pitiful I/O performance even in ideal conditions, the best card makes a big difference.

If you need help connecting to it, feel free to hit me up on Discord.

The Pi worked before with a different SD card until something screwed up. I can ping it, but you need the Home Assistant running to get ssh access. I suspect the card could be faulty, so I will try another. The one I have been trying was supposed to be better (Sandisk Extreme Pro).

I think people have issues over time with the cards filling up or struggling with lots of writes. I am wondering if I could hook up a USB hard drive for logs and the database it uses. It's a learning experience, but it seems to get complicated quickly.

Thanks for the offer, I may be in touch.

You can plug the card into a windows machine and turn on ssh just by touching (making empty file) the file “ssh” on the boot partition.