How to install GPSD to my RPi setup?

I tried adding “docker-gpsd” but I immediately get “Stopped for a few seconds with exit code 1” and no logs?

Update:
I now tried a newer one that’s made for RPi, but still exits with same error. Last log entry was “Starting up GPSD”

What could be wrong?

Did you get the gpsd to work?

Hi! I’ve had more than enough to do with other boat-electronics, but I’m hoping to revisit this soon :wink:

Hi DIYglenn,

I successfully installed and configured gpsd using “sudo apt-get install gpsd”. I then configured hass to get data from it by putting the following in the configuration:

sensor:
  - platform: gpsd

my problem now is that I can’t get hass to display and access individual values such as lat, lon, speed, etc.

I know they are there, because my hass installation is connected to influxdb, and I can see all the values there, but it would be stupid to have to extract the values from there. If anyone knows of a more direct way, please let me know

They are there as attributes. Use a template sensor.

So how is your installation set up? I guess you’re not using the Hassio image?

Nope. Using standard Buster. It runs a lot more than just Hass. Sorry, I have no experience with Hassio. Does it not let you connect the GPS?

What is your difficulty, I see all the data in your picture?

Hassio is a container, meaning it acts more like an app with plugins. You can’t use terminal for installing anything etc. The big plus is that everything is containerized/virtual, so very easy to update etc. I think I want to stick with that in the boat, so it’s simple and I don’t have to worry about keeping it up to date.
But it also means having to build a container with gpsd to run in portainer to be able to install anything else.

The problem has been solved. I think the discussion sidetracked, sorry.

How did you install your Home Assistant? Docker or env?

env. Post must be 10 characters, so here you go :))))

1 Like

I’m again revisiting this, trying to get more time to do “none-essential” electronics in my boat (I’m re-doing EVERYTHING).

Anyways, does HA installed as RPi image have any way to use a GPS for location and maybe also sending emails so I won’t have to have a separate container for that?

I do the “sending e-mail” part on a RPi “vanilla” image. I just use the SMTP platform:

Works great. I actually send an e-mail to the SMS message address for my cellular provider, so instead of an e-mail I get a text.

My thought on GPS data would be to get it from the NMEA bus. There are lots of folks playing with NMEA 2K and/or SignalK on a RPi. I could dig out some links I’ve saved somewhere if you’re interested.

The NMEA 2K network will be off when the boat is moored, but I have a USB GPS for the RPi which will always be online.
Will check out that SMTP service!

Hi
I have HA on a RPi4+ on my yacht. I want it to be the GPS for WorldTides and other.
So I plugged a GPS Dongle into it and tried the instructions as per

But I have the same issue mentioned - it errors with
-bash: sudo: command not found

Any help would be greatly appreciated.

Thanks
Wayne

I documented how I did something similar. I had to use 2 rPI’s, one for HAOS and one for gpsd. Unless you use docker containers in HAOS I don’t believe you can use apt in HAOS. I had 2 rpi’s laying around, so ended up going this route.

If your /etc/os-release tells you that you’re running Alpne Linux the correct command for installing gpsd is: “apk add gpsd”

I have just tested the install process on my home setup on VMware - which dosen’t have a GPS - I’ll check on my Raspberry Pi in our caravan tomorrow.

Installation works also on RPi… I am not sure if there is data coming but that’s next step.

Just FYI, here is an addon to accomplish the same :+1: