NOOB question

Post Reply
Beaniepud
Posts: 4
Joined: Sat Dec 06, 2025 1:28 pm

NOOB question

Post by Beaniepud »

Hello!
I'm new to all this, recently moving over from OAP, which was much easier to set up

I'm trying to work out, how I can make a way that a 3.3v connection (stepped down from the lights of the car) received into a GPIO pin, could trigger dark mode to switch on and off.

I've created a script that edits the dark theme line in the main config file (which does nothing until hudiy is restarted)

And I've been looking at using the API, but there is no simple, clear documentation on how to set this up, or use it at all for those of us who haven't done things like this before!

I'm also looking for a way to make my waveshare screen dim when this GPIO is triggered too

Any help appreciated
In dumb terms please 😂
Thanks
hudiy
Site Admin
Posts: 440
Joined: Mon Jul 14, 2025 7:42 pm

Re: NOOB question

Post by hudiy »

Hello,
On Trixie you can just execute following commands to install API dependencies:

Code: Select all

sudo apt install python3-protobuf
sudo apt install python3-websocket
then clone the hudiy repository

Code: Select all

cd
git clone git@github.com:wiboma/hudiy.git
and just execute the DarkMode.py example:

Code: Select all

cd hudiy/examples/api/python/
python3 DarkMode.py
You can then add handling GPIO to the DarkMode.py script.

If you are not familiar with Python, you can use an AI chat (Gemini, ChatGPT or any other) to modify the DarkMode.py example and add GPIO support.
Beaniepud
Posts: 4
Joined: Sat Dec 06, 2025 1:28 pm

Re: NOOB question

Post by Beaniepud »

Interesting, thank you

Would there be a way to edit that dark mode script, or, sort of slice it into two pieces

One to turn dark mode on
And one to turn it off

Instead of it being a toggle? As a toggle script wouldn't really work with the GPIO system


Also, do I have to use the API system? Could I not just run that script on its own?

I'm so new to all this and it's been so difficult to get started!

Thank you
Post Reply