having loading CarPiHat software issues

gwynethh
Posts: 29
Joined: Sat Aug 09, 2025 4:53 pm

having loading CarPiHat software issues

Post by gwynethh »

Noob on the loose.
Anyone know of an active forum for issuee installing CarPiHat support software. We ran into an issue with the real time clock software and the shutdown script.
"Add the following to "/etc/rc.local"
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
sudo hwclock -s
date"

We cannot find "/etc/rc.local" in Trixie

also when we try to
"pip install rpi-lgpio" for the shutdown script we gat a load error message

Email to the guys(?) who designed the CarPihat have gotten no responce.
gwynethh
Posts: 29
Joined: Sat Aug 09, 2025 4:53 pm

Re: having loading CarPiHat software issues

Post by gwynethh »

After getting more familiar with the Pi Linux file browser file search feature. I verified there is no file in Trixie called "rc.local". If I want to use the posted script with the CarPi Hat should I redo installation using "Bookworm"?
alex124.rh
Posts: 125
Joined: Thu Jul 31, 2025 9:18 am

Re: having loading CarPiHat software issues

Post by alex124.rh »

I added stuff to the hudiy start up .sh for the line python3 carpihat.py &

maybe you can try adding stuff there?
gwynethh
Posts: 29
Joined: Sat Aug 09, 2025 4:53 pm

Re: having loading CarPiHat software issues

Post by gwynethh »

A little more web research notes that "/etc/rc.local" was "depreciated" back at bookworm. People have built their own rc.local and made it functional. We will try that this week.
Hiphouser
Posts: 16
Joined: Thu Nov 20, 2025 12:42 am
Location: France
Contact:

Re: having loading CarPiHat software issues

Post by Hiphouser »

Hello.
I Have the same issue with bookworm on my Pi5 and carPiHat pro 5...
It's an Audi Rns-e upgrade project.

Edit: I'm now under Trixie
Last edited by Hiphouser on Sat Jan 24, 2026 10:57 am, edited 1 time in total.
gwynethh
Posts: 29
Joined: Sat Aug 09, 2025 4:53 pm

Re: having loading CarPiHat software issues

Post by gwynethh »

It would be nice if the designers/original programmers of/for the CarPiHat resolved this problem for everyone. My planned work around is delayed while I do some hardware tweaks.
hudiy
Site Admin
Posts: 440
Joined: Mon Jul 14, 2025 7:42 pm

Re: having loading CarPiHat software issues

Post by hudiy »

Which script exactly are you trying to run via rc.local? From a general Linux perspective, rc.local is a legacy autostart mechanism. A more modern approach is to create a service and manage it through systemd. If you share the script here, we can help you convert it into a systemd service.

More details about systemd/Services: https://wiki.debian.org/systemd/Services
gwynethh
Posts: 29
Joined: Sat Aug 09, 2025 4:53 pm

Re: having loading CarPiHat software issues

Post by gwynethh »

The real time clock and shutdown scripts at https://github.com/SamT-J/CarPiHat/wiki ... tart-Guide under "Real Time Clock" and "Safe Shutdown Example:". Both need the depreciated RC.local The shutdown script also failed me right of when I tried to "pip install rpi-lgpio" and then the need for RC.local at "Then add the following to "/etc/rc.local"

python /home/pi/carPiHat.py &"
to set the script as a service.

Safe shutdown seems wise in a car environment. TIA
hudiy
Site Admin
Posts: 440
Joined: Mon Jul 14, 2025 7:42 pm

Re: having loading CarPiHat software issues

Post by hudiy »

Please check the attachment. pi-shutdown.py is based on the link you provided and also includes the commands mentioned in the Real Time Clock chapter. pi-shutdown.service contains the systemd service declaration:

In order to use it, please execute following commands:

1. Unpack the archive

Code: Select all

tar -xzvf pi-shutdown.tar.gz
2. Install dependencies

Code: Select all

sudo apt install python3-gpiozero
3. Prepare the service

Code: Select all

sudo cp pi-shutdown.py /usr/local/bin/
sudo cp pi-shutdown.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable pi-shutdown.service
sudo systemctl start pi-shutdown.service
Attachments
pi-shutdown.tar.gz
(813 Bytes) Downloaded 17 times
Hiphouser
Posts: 16
Joined: Thu Nov 20, 2025 12:42 am
Location: France
Contact:

Re: having loading CarPiHat software issues

Post by Hiphouser »

I'm testing that...

not working for me
Post Reply