This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to connect to Home Assistant using MQTT or NMEA
#1
My pypilot is up and working. I would like top be able to bring it into home assistant.

This should be possible but I am struggling.

First, I tried getting it to communicate via mqtt. I have a server setup. First I ssh into the pypilot and ran:
nano ~/.pipilot/settings/.json

In that document I entered

{
"mqtt_server": "192.168.x.xxx", (my HA ip)
"mqtt_port": 1883,
"mqtt_user": "(my user name)",
"mqtt_password": "(my pass)"
}

I rebooted pilot but nothing came over mqtt.

I then tried another approach. I tried connecting over nmea. At the bottom of the configuration page of pypilot I put in the box 192.168.X.XXX:10110 (my HA) and this entry persists so I assume it is in effect.

I installed an integration in HA that listens for Nmea data but it gets none. (https://www.youtube.com/watch?v=oRW9AfD03fg). It asked for the IP of the pypilot and the port, 10110.

HA sees no NMEA data.

How can I get pypilot to converse with Home Assistant?
Reply
#2
I am saddened my post got no replies. Did I explain my self well?

I have my pypilot set up on its own on a pi zero and all is working well. The pypilot connects to my boat wifi network.

I also run home assistant on my boat network. It is a convenient way to get all of my electronics into one place.

I would like to be able to use pypilot from home assistant. That is, I would like to display course and command in HA. I would like to send commands (like engage or turn right) by pushing a button in HA and have pypilot obey.

ChatGPT suggested I turn on mqtt on the pypilot. I already have an mqtt network up and working. I outlined my steps on the pi above. After creating those settings I did not observe any mqtt messages from pypilot on my network.

I also tried to connect over NMEA. Can someone else report on how this works? I take it you can ask pypilot to make itself visible on an NMEA network where it can send and receive. I tried to get pypilot to do this. Is there a way to test if I set things up properly? How can I tell if pypilot is attempting to communicate over NMEA? If I know it is sending an NMEA signal I can troubleshoot getting home asssiatht to read the signal.

For anyone in the same situation as me, my stopgap solution is to put a webpage on my HA dashboard that points to the web output from pypilot. This is an OK solution.

Thank you!
Reply
#3
(2024-10-10, 01:27 AM)hopkinslaw Wrote: I am saddened my post got no replies. Did I explain my self well?

Could be no one else uses home assistant, Openplotter uses signalk which is designed for use on boats. Comes pre installed & running.
Reply
#4
pypilot does not (yet) have mqtt support. It has signalk support.

So it is feasible to add mqtt support to pypilot, but it just has not been done. It would require writing code.

Sorry if you had this expectation, and that chatgpt said you could do something that you cannot, but at least with free software the possibility is there!
Reply
#5
Thank you very much Sean. As always, thank you for your work.

I will stop trying to get mqtt to work. Any thoughts on whether I can get what I want using NMEA? I have a HomeAssistant add on that is supposed to interact with NMEA. Any tips on getting that to work?

Anyone else connect pypilot over NMEA0183?

Cheers.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)