Posts: 2
Threads: 1
Joined: Oct 2023
Reputation:
0
Hello,
I have been using Pypilot as the main electric autopilot on my 40 foot keeler for a few of years now. It's awesome.
I've just purchased a second rPi and pypilot hat.
I have installed the latest OpenPlotter and Pypilot software on my rPi3.
It's all going great, but I am struggling to enable the pypilot hat service. I tick the box but the tick goes away by itself.
I have read lots of posts and threads but still can't make it work.
It's not the end of the world, i can control the autopilot using the pypilot control. But i'd like to see numbers on the LCD and be able to use the remote.
Please help!
Josh
Posts: 1
Threads: 0
Joined: Oct 2023
Reputation:
0
I have exactly the same problem. Can't figure out why. In the past the HAT would work perfectly, when I used the tinypilot software.
I use OpenPlotter 64bit – is that maybe the problem? Would the 32bit work?
Posts: 2,355
Threads: 21
Joined: Jun 2016
Reputation:
75
i will look into it.
what if you issue
sudo service pypilot_hat start
Posts: 2
Threads: 1
Joined: Oct 2023
Reputation:
0
2023-10-03, 09:06 PM
(This post was last modified: 2023-10-03, 09:40 PM by joshkemp@xtra.co.nz.)
Thanks. I chose 32 bit OpenPlotter, not for any real reason. What factors should influence that choice?
I tried issuing service pypilot_hat enable yesterday based on another thread. Will try 'start' today with fingers crossed.
Unfortunately that didn't solve it Sean.
The command 'sudo service pypilot_hat start' was accepted without error message.
But then sudo service pypilot_hat enable returned error message 'service not recognized'
Ticking the enable hat control box in pypilot app, it still vanishes off own accord and message below says
Pypilot hat detected but service not enabled.
Thanks again
Josh
Posts: 2,355
Threads: 21
Joined: Jun 2016
Reputation:
75
did it start working when you started it from commandline?
did you try sudo systemctl enable?
Posts: 495
Threads: 26
Joined: Jun 2019
Reputation:
31
2023-10-05, 12:29 PM
(This post was last modified: 2023-10-05, 10:26 PM by ironman.)
I just did a clean install of openplotter an pypilot and got this. Mind you, I don't have the hat hardware attached:
pi@openplotter:~ $ pypilot_hat
hat start 1277.089485117
have gpio for raspberry pi
hat import done 1277.181298514
loading config file: /home/pi/.pypilot/hat.conf
config failed: [Errno 2] No such file or directory: '/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'
assuming original 26 pin tinypilot with nokia5110 display
Traceback (most recent call last):
File "/usr/local/bin/pypilot_hat", line 33, in <module>
sys.exit(load_entry_point('pypilot==0.42', 'console_scripts', 'pypilot_hat')())
File "/usr/local/lib/python3.9/dist-packages/pypilot/hat/hat.py", line 687, in main
hat = Hat()
File "/usr/local/lib/python3.9/dist-packages/pypilot/hat/hat.py", line 348, in __init__
self.write_config()
File "/usr/local/lib/python3.9/dist-packages/pypilot/hat/hat.py", line 502, in write_config
if self.client and not 'modes' in self.config:
AttributeError: 'Hat' object has no attribute 'client'
The pypilot service itself is running ok.
When I copy an old hat.conf, I get this:
pi@openplotter:/media/pi/rootfs/home/pi/.pypilot $ cp hat.conf /home/pi/.pypilot/hat.conf
pi@openplotter:/media/pi/rootfs/home/pi/.pypilot $ pypilot_hat
hat start 1663.329849163
have gpio for raspberry pi
hat import done 1663.417218144
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'
cannot update firmware until version is known
host localhost
lcd process on 7108
lcd driver default False False 1663.452981103
hat init complete 1663.46100852
7109 (process ID) old priority 0, new priority 19
failed to load lirc No module named 'lirc'
no lirc available No module named 'pylirc'
web failed to run process: cannot import name 'Markup' from 'flask' (/usr/local/lib/python3.9/dist-packages/flask/__init__.py)
7109 (process ID) old priority 19, new priority 19
Subsequently installing pypilot from git gives me the same message "cannot import name 'Markup' from 'flask'" so I am inclined to think the issue here lies with the master branch.
Posts: 3,038
Threads: 63
Joined: Mar 2016
Reputation:
289
2023-10-08, 10:20 AM
(This post was last modified: 2023-10-08, 06:32 PM by Sailoog.)
I do not have a pypilot hat either. Maybe I should buy one from Sean when he gets back to business.
Posts: 495
Threads: 26
Joined: Jun 2019
Reputation:
31
I'd be happy to maintain a 'release' fork from the master, and aid in the testing process. Anybody has a spare hat around - I'll be happy to buy it off of you. Sean, what do you think?