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
RPi4 not talking to arduino motor driver
#11
The plugin (not 'shortcut') that comes with OpenCPN does not talk anymore to the old 0.16 pypilot; if only for that, you need to upgrade pypilot. See https://github.com/pypilot/workbook/wiki...lot-Plugin, last two bullet points.
Reply
#12
Okay thank you. I have done the upgrade and everthing seems to work, except for the web interface on 127.0.0.1:8080, I get a 404 not found error.

I ran systemctl status pypilot_web.service and there is an ExecStart=/usr/local/bin/pypilot_web 8080 (code=exited, status=-1/FAILURE) error. If I do a cat pypilot... on any of the files in /usr/local/bin/pypilot... they all seem to still be v0.16. On the instruction for the upgrade it starts with a "cd" but it doen't say cd to where. The upgrade seemed to happen okay and obviously openCPN is seeing the later version pypilot but why are there still v0.16 files after the rm -Rf pypilot pypilot_data?

I just found your pypilot workbook, great work Ironman! This has answered a heap of questions.

Sorry to keep asking questions you guys have probably heard a hundred times!
Reply
#13
Well done! The cd with no arguments brings you to your home directory, as to always start off at the same starting point.

The rm mentioned only removes any leftover source files (under your home directory) from previous installations, not old executables. What should replace any executables is the install script, but that might leave some rubblish behind at its own discretion. What you say is a bit suspect, though. You did run the install with sudo, didn't you? You can rerun the install if you did not. In the past it had to be run twice anyway. Capture the output to start a good habit ;-)

To troubleshoot pypilot_web, run it at the prompt and examine the output. Note that, from the prompt, it runs off :8000 instead of :8080. You might also try the external adapter's ip address instead, e.g. http://10.10.10.1:8000 or http://10.10.10.1:8080.


Attached Files
.txt   pypilotUpgrade-0.32.txt (Size: 41.27 KB / Downloads: 137)
Reply
#14
(2021-12-02, 03:59 PM)ironman Wrote: Well done! The cd with no arguments brings you to your home directory, as to always start off at the same starting point.

The rm mentioned only removes any leftover source files (under your home directory) from previous installations, not old executables. What should replace any executables is the install script, but that might leave some rubblish behind at its own discretion. What you say is a bit suspect, though. You did run the install with sudo, didn't you? You can rerun the install if you did not. In the past it had to be run twice anyway. Capture the output to start a good habit ;-)

To troubleshoot pypilot_web, run it at the prompt and examine the output. Note that, from the prompt, it runs off :8000 instead of :8080. You might also try the external adapter's ip address instead, e.g. http://10.10.10.1:8000 or http://10.10.10.1:8080.
Thanks Ironman. I did not know about simple "cd", I have always used "cd ~".

I checked back and I did use sudo for the install. I did it again and still the v0.16 files were in /usr/local/bin/, so I moved all of these old files to another directory and then did the upgrade, now I have the new files, and the web page displays on :8080 but it doesn't connect to the pypilot server, I ran pypilot_web from cli, this is now on port 80 (!), I can connect to it but again it doesn't connect to the server. I haven't figured out how to cut and paste from nano but the gist is "using port80, processing clients, client is using unsupported v of Socket.IO or Engine.IO" Attached is a screen shot showing web page inc developer pane with the errors, clearly the web server is having problems finding recourses.

oh I am not sure why it is using the network IP when I have set everything to either 127.0.0.1 or "localhost"
Reply
#15
The "unable to connect webapp / socket.io version mismatch" was solved a while ago, but you might have old legacy versions of that library around. Some hints are in this thread https://forum.openmarine.net/showthread....8#pid18608. Reading your post still gives me the strong urge to insist on seeing some terminal output of the update process, similar to what I attched a few posts earlier. What is exactly the new version you seem to be running?
Reply
#16
Hi Ironman
I have made another discovery, installing either plugin for standalone pypilot or plugin within openCPN re-installs pypilot v0.16! This is why I seemed to be making progress and then things changed. Updating pypilot to v0.32 removes the standalone plugin (no great loss as long as others work) but neither pypilot_web or openCPN work. If I run pypilot_web from the cli there are no errors but the web page (on port 8000) does not connect to the pypilot server. I went into "configuration" and set 127.0.0.1:20220 (same for :10110)and it then shows latency but does not connect to pypilot. 

Starting pypilot (clicking on sailboat) in openCPN produced the errors shown in the attached files.

If I kill running instances of pypilot and run pypilot from cli, is runs okay, the web server runs, connects and I can engage pypilot, all seems good.

So why does current openCPN not like v0.32? I have done all updates I can find, ie from openCPN installer and via apt. Why does pypilot when running as a service, not talk to the web page? All of this is frustrating, I started from a clean fresh install of raspian buster (could not get new bullseye to work with 7 inch screen dispite suggested dtoverlays), fresh openplotter and fresh pypilot...


Attached Files
.txt   pypilotUpgrade.txt (Size: 3.52 KB / Downloads: 138)
Reply
#17
oh sorry the other files didn't attach


Attached Files Image(s)
           
Reply
#18
(2021-12-06, 06:25 AM)MacleayIslandBruce Wrote: ... the standalone plugin...

I think we have a terminology issue here - there is no such thing as a standalone plugin, if ever ;-) If you are referring to the pypilot installation from the openplotter (Raspberry→Openplotter→Settings) indeed the openplotter install still reverts pypilot to 0.16. I'll make a mention to this end in the workbook. I have not made a complaint with the openplotter people yet because I cannot ask them to shoot at a moving duck. But 0.16 is a long dead duck.

If you refer to the "(OpenCPN) pypilot plugin" (the little sailboat in opencpn) I assume that you install this plugin from the Plugin Manager in OpenCPN (Options-> Plugins) from the Plugin Catalog: Master. The opencpn plugin manager mentions the plugin version, this should be like 0.30.something

(2021-12-06, 06:25 AM)MacleayIslandBruce Wrote: I went into "configuration" and set 127.0.0.1:20220 (same for :10110)and it then shows latency but does not connect to pypilot. 

If you clicked on the sailboat, and then on config, and filled this in the 'host' field, this is incorrect. It should not have a port number, only the host address. And the ports you mention are incorrect anyway - these are for nmea messaging.

(2021-12-06, 06:25 AM)MacleayIslandBruce Wrote: Starting pypilot (clicking on sailboat) in openCPN produced the errors shown in the attached files.

You cannot start pypilot by clicking the sailboat. With the pypilot plugin, you can connect to an already running instance of pypilot. I've never seen these messages. They might be due to the incorrect port numbers used.

(2021-12-06, 06:25 AM)MacleayIslandBruce Wrote: If I kill running instances of pypilot and run pypilot from cli, is runs okay, the web server runs, connects and I can engage pypilot, all seems good.

Let's take it from here. Can you remove the port number in the host section of plugin configuration, and see if you connect that way?

If running from the cli works, try systemctl start pypilot.

(2021-12-06, 06:25 AM)MacleayIslandBruce Wrote: Why does pypilot when running as a service, not talk to the web page?

Running as a service, the socket is either :80 or :8080, but you are already aware. I think you might have run the service from the openplotter tooling after (inadvertently) reverting to 0.16. 

(2021-12-06, 06:25 AM)MacleayIslandBruce Wrote: All of this is frustrating, I started from a clean fresh install of raspian buster (could not get new bullseye to work with 7 inch screen dispite suggested dtoverlays), fresh openplotter and fresh pypilot...

That is significant information - you did not use an openplotter image? This is slightly uncharted terrain then. Indeed the versions in the "Requirement already satisfied: " logging of your output is different from mine. However, if it runs ok from the cli, including the web page, you are almost there though. Keep it up!
Reply
#19
Thanks Ironman. When I was refering to "standalone" pypilot I meant openplotter pypilot (stand alone from opencpn). 

Setting the port number I mentioned previously was just a trial, it didn't work so I set it back to default. 

That was a good pickup, no I did not start from an openplotter image. I used the OpenPlotterSettings deb package, this was because my original install was to be "Bullseye" but I ended up back with "Buster". Anyway since you mentioned it I thought, why not try an image all set up, (ha ha). So I downloaded the "Moitessa Hat" version (the only one that mentions PyPilot) and put it on a card. It uses ... have you guessed it? yes pypilot v0.16! This works for openplotter pypilot and the web page, but the plugin is not installed in opencpn. I installed the plugin in opencpn, but cannot get it to connect to pypilot. I have set up NMEA tcp 20220 receive & send (remember this is v0.16) and signalk on port 3000, all on 127.0.0.1, but still no joy.

I see on your post #12 and in the wiki that opencpn plugin won't work with v0.16, yet that is the version that the current opencpn plugin installs! So does that mean opencpn's current plugin is not functional?

Could you give me quick summary of the ports pypilot uses to talk (in and out) to signalk and opencpn please. I assume signalk only needs to talk to opencpn in sigk format on port 3000?

If I forget about opencpn, I can use pypilot to follow compass, gps XTE but not to follow waypoints, is that correct?

Thanks again for your help.
Reply
#20
Yep that's correct, the current openplotter setup includes an old version of pypilot and a new version of the opencpn pypilot plugin, that are mutually incompatible. This is well known by the parties involved, but it has no priority to fix. The workaround is simple: update pypilot from github. If you follow all the steps in the workbook you should get a working version of it all. Then, you can do your own variation and compare each step. 

However, you were almost there with your buster setup. Just read up a bit more, dive under the bonnet to get a better grip on what's happening, and when something does not work, don't post your interpretation of it here, but the bare output.

If you don't want to update pypilot, you will miss the opencpn plugin integration and also the recent signalk integration - and you will miss all patches and new features, so I would not advise it. Pypilot version 0.16 worked quite all right, though, and allowed you to steer by compass, gps, wind AND waypoints. Integration with signalk and/or opencpn needs to be done the old-fashioned way through port 20220.

Another tack for you to try might be: to install buster, install signalk, install opencpn + plugin, install pypilot from github.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)