Page 1 of 1
Custom Gauges / Display
Posted: Mon Jun 15, 2026 8:06 pm
by EnDy500
I've been reading through all the github examples and I'm completely lost and I'm hoping someone can help. I have an ESP32 that's already reading sensor data. I can send the data to the Pi that's running HUDIY via UART but I have no idea how to get this data into the form of a gauge or simple numbers that's shows up on the HUDIY screen. Can some please guide me or help me with this?
Re: Custom Gauges / Display
Posted: Mon Jun 15, 2026 9:08 pm
by hudiy
To refresh data in HTML in real-time, it is best to use a WebSocket. Depending on the language you use to read your UART data (e.g., Python), you can create a WebSocket server in your script/program, then connect to it from HTML and transmit the UART data whenever it changes (e.g., in binary format or as JSON).
Another option is to use a REST API. In your script/program, you can create an endpoint that responds to an HTTP REQUEST from your HTML with UART data (an approach called polling). You can then use a timer in your HTML to periodically poll the script for the current value.
How do you read data from UART? Is it a Python script?
Re: Custom Gauges / Display
Posted: Thu Jun 18, 2026 7:58 pm
by EnDy500
So far I got to receiving the data via a python script. I just didn't know where to go from there. I will look into option 1 that you mentioned (creating a WebSocket), I'm not too familiar with this stuff so I may have follow up questions. Assuming I do get the websocket working and broudcasting the UART data, is there a simple way to use some of the example gauges in the github and just change the source from the OBD to this new websocket?
Re: Custom Gauges / Display
Posted: Wed Jun 24, 2026 4:40 pm
by EnDy500
Update
I was able to transfer my data via UART and I have a script that creates a websocket and broadcasts the data. I tried to understand how the example gauges worked and how I could just replace the source with data from my websocket server but I wasn't able to. I did find another user's code on here that was for an inclinometer which was pulling data from a websocket server and I modified it to work. I would prefer the gauges but I'm not familiar enough with coding and html to make that happen.
Re: Custom Gauges / Display
Posted: Wed Jun 24, 2026 11:27 pm
by hudiy
We have added a mock to the obd charts example. You can use it to implement fetching your own data over UART and then convert it to an ELM327-compatible format. This way, all the widgets from the example will work out of the box.
https://github.com/wiboma/hudiy/blob/ma ... ts_mock.py