I am trying to used the gpsd integration. I wanted to plug my GPS device directly into my HA Yellow so I created a custom add on that runs gpsd. I used the following code:
The custom add-on works and I can access the gpsd instance from another computer. But the gpsd integration never seems to see it. Using the ssh add-on, I tried to telnet to localhost 2947 and it says “Connection refused” so I think the problem is that Home Assistant for some reason cannot see the addon.
What am I doing wrong? Any assistance is appreciated.
So it never seems to fail that I figure it out shortly after I post it. The problem is that you cannot use localhost. You have to use the IP address of the HA server and then it works fine. Now on to trying to figure out the gpsd integration.
Yes, I just about have it complete. I am going to finalize tomorrow and I will post it. It is exactly as you describe a python script coupled with gpsd in a home assistant add-on that publishes to mqtt.
Ok so I just published this morning and have not time to really test it but you are welcome to give it a try. I did update it so that it will also post to Traccar. If you don’t want that you can just disable it in the ini file.
Hey @swwright, I got it working relatively well now here With a adafruit GPS hat on a Raspberry Pi4.
Do you want to look at it? Maybe this could be relevant for you as-well? If all works well you could add my add-on repo, install GPSD2MQTT, point to the serial device, add mqtt username and password and be off … I think!