Pi VM - After hass terminal never returns to command prompt

Tags: #<Tag:0x00007f7c59538b58>

I did the standard pip install on my Rpi and was able to logon to the UI from my laptop on the same local network after executing the hass command. After starting the zeroconfig broadcast, the terminal shows a record of all the calls coming from my laptop via the web interface. So far, so good - except I never get a command prompt back on my Pi.

When I closed the terminal after the initial runs of the pip3 install and hass commands, the service terminated and the web interface lost connection - that was not surprising. What did surprise me was that I had to run the whole pip install command again after opening a new terminal before hass would work. So I opened another terminal window while it was busy and created a service file to autostart the process on boot in the future to hopefully save me a bunch of steps if I ever want to shut down/restart the Pi or have a power outage or whatever.

To confirm whether the service file was set up properly, I wanted to stop the service and restart my Pi and see what happens, so I flipped back over to the original terminal but once again, after running hass I didn’t get the command prompt back.

  1. Is this the intended behavior? In order to access via my local network I need to have a terminal open just running hass such that I can’t input new commands?
  2. If so, how do I stop the service gracefully if I wanted to, instead of just Xing out the terminal?
  3. Does everything really have to be reinstalled after every time the terminal closes because it’s a VM, or is that a sign I screwed something up?

NB: The only place I deviated from the manual install instructions was when I got a dpkg error related to the epiphany browser that I couldn’t figure out how to solve, so I ran sudo apt-get install -f to force it through, which “worked” in the sense that I was able to get to the end of the install process and access HA from my Chromebook, but maybe didn’t entirely work?

ETA: It’s a Raspberry Pi 4 running Stretch.

ETA: It’s a Raspberry Pi 4 running Stretch.

If you are using a Pi 4 I would recommend going to Raspbian Buster minimum

This isn’t intended behaviour, you should not have to install hass everytime you run it.

Wow, I feel silly - the Pi4 came with Buster on its card and somehow I had myself convinced that was a super old version. I rushed through the setup a little without doing a ton of reading into Raspbian/Debian, thinking that my Ubuntu-flavorered familiarity with Python would carry me enough to get the job done, and I was feeling too lazy to fiddle with a microSD card, so I just updated ‘buster’ to ‘stretch’ in the source lists and ran sudo apt update and sudo apt -y dist-upgrade to “upgrade” my version facepalm Never actually went to Raspbian to get an up to date image.

I guess I should slow down and do this more methodically, starting with flashing the latest Raspbian. Thanks!

1 Like

No problem, glad it’s working now :slight_smile: