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
Problem with GPIO push button inputs following Pypilot upgrade
#11
I think I nailed something, but I could only test it without lcd or hat, so this is not for everybody to test, only for you. You can download it from my fork. It's best to disable pypilot before you run the upgrade. Then, after the upgrade, enable pypilot in openplotter, then run pypilot_hat none at the prompt. Be aware that the web interface at :33333 kicks in only 30 seconds after the pypilot_hat is started.


Attached Files
.txt   pypilot_hat_0.24_fix.txt (Size: 1.34 KB / Downloads: 16)
Reply
#12
yes, the web inteface is delayed, otherwise it would slow the loading of other more important things.
Reply
#13
It's now also in the github master, so you can now run the standard procedure to update pypilot:

Code:
sudo systemctl stop pypilot
cd
sudo rm -Rf pypilot/ pypilot_data/
git clone https://github.com/pypilot/pypilot
cd pypilot
sudo python3 setup.py install
Reply
#14
yes, keep in mind the pypilot_hat and pypilot_web are separate optional services as well
Reply
#15
Yup those services also ought to be explicitly brought down prior to an upgrade. And pypilot_boatimu as well then, right?
Reply
#16
yes, but it is mutually exclusive to pypilot itself.
Reply
#17
It looked as if the issue has been resolved and so I re-installed Pypilot 0.24. If I run pypilot_hat the web page on 33333 does appear but it is not connected to pypilot. Still errors when I run pypilot_hat but the GPIO push buttons now work! Hooray!!!

pi@openpcpn:~ $ pypilot_hat
have gpio for raspberry pi
loading config file: /home/pi/.pypilot/hat.conf
failed to load /proc/device-tree/hat/custom_0 : [Errno 2] No such file or directory: '/proc/device-tree/hat/custom_0'


pi@openpcpn:~ $ pypilot_hat none
have gpio for raspberry pi
loading config file: /home/pi/.pypilot/hat.conf
failed to load /proc/device-tree/hat/custom_0 : [Errno 2] No such file or directory: '/proc/device-tree/hat/custom_0'
overriding driver default to command line none
arduino process on 1308
renice: failed to set priority for 1308 (process ID): Permission denied
warning, failed to renice hat arduino process
No hat config, arduino not found
1309 (process ID) old priority 0, new priority 19
failed to load lirc No module named '_client'
no lirc available No module named 'pylirc'
failed to load lirc No module named '_client'
no lirc available No module named 'pylirc'
web process 1309
web config {'remote': False, 'host': 'pypilot', 'actions': {'auto': [], 'menu': [], 'up': [], 'down': [], 'select': [], 'left': [], 'right': [], 'engage': ['gpio17'], 'disengage': ['gpio23'], '1': ['gpio27'], '-1': ['gpio22'], '2': [], '-2': [], '10': ['gpio5'], '-10': ['gpio6'], 'compassmode': ['gpio18'], 'gpsmode': [], 'windmode': ['gpio26'], 'tackport': [], 'tackstarboard': []}, 'pi.ir': True, 'arduino.ir': False, 'arduino.nmea.in': False, 'arduino.nmea.out': False, 'arduino.nmea.baud': 4800, 'lcd': {'contrast': 60, 'invert': False, 'backlight': 200, 'flip': False, 'language': 'en', 'bigstep': 10, 'smallstep': 1, 'remote': False, 'hue': 27}}
web process on port 33333
The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further occurrences of this error will be logged with level INFO)
failed to load lirc No module named '_client'
no lirc available No module named 'pylirc'
failed to load lirc No module named '_client'
no lirc available No module named 'pylirc'
Reply
#18
(2021-04-11, 09:30 AM)drbarritt Wrote: It looked as if the issue has been resolved and so I re-installed Pypilot 0.24.  If I run pypilot_hat  the web page on 33333 does appear but it is not connected to pypilot.  Still errors when I run pypilot_hat  but the GPIO push buttons now work! Hooray!!!

Web interface is a known problem, see https://github.com/pypilotWorkbook/workb...-interface for the solution:

Code:
pip3 uninstall python-socketio python-engineio flask-socketio
pip3 install "flask-socketio<5"

To get rid of 'no lirc available' you should set pi.ir to False in the hat.conf.
Reply
#19
If the gpio keys work, then it must be connected.

ensure the hostname is set to localhost in ~/.pypilot/pypilot_client.conf
Reply
#20
I checked pypilot_client.conf and it is set to localhost on port 23322. I also ran the fix for the web-interface problem. The web page on 333333 is still not showing a connection to pypilot (Web Server Latency at the bottom shows "pn ms" ), but I assume all this page does is allow easy configuration of hat.conf and I can do this manually if needed. My system is working fine now with the GPIO push buttons and Pypilot Plugin in openCPN, so I will leave it alone and get on with some sailing!
Many thanks for all your help.
Regards
David
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)