top | item 46719958

Building a Real-Time HN Display for $15

63 points| kylegalbraith | 1 month ago |medium.com

21 comments

order

rcarmo|1 month ago

I love this because it uses UDP _and_ a CYD (Cheap Yellow Display, which is what we hardware nerds have taken to calling these). I have two or three of these around, one as a 3D printer remote, another as a pseudo logic analyzer, and a caseless one that I use as a Micro Python sandbox.

I've been using UDP to send CPU stats for my machines for ages (https://github.com/rcarmo/raspi-cluster/blob/master/tools/se... is a good example), and in modern networks it has become very much reliable (99.99% so on a LAN). Keeping an eye out for UDP on an ESP32 and running Wireguard might be a little power intensive to ever get this running on battery even if it had an e-paper display, though.

mlhpdx|1 month ago

WireGuard doesn’t add noticeable battery drain in my experience. I have a fleet of Xiao ESP32-C3 devices with DS1820 temperature sensors that run on batteries and send samples over WireGuard.

The battery drain is 100% a function of the transmit time, so by pre-encrypting the buffers before powering on the radio I save a bit. Likewise for the response handshake - get the packet, shut down the radio, then decrypt it.

When sending samples between handshakes, I don’t have to wait for an ACK of any kind - I just send the packet and shut down the radio. That saves a ton of power compared to TCP.

jeroenhd|1 month ago

I kinda wonder what the packet loss story of UDP is like for simple protocols like these in the modern day. Clearly, it's good enough that this application runs without issue.

> Instead of bolting TLS onto every application protocol (HTTP, MQTT, CoAP, etc.), what if we secure the network layer once and then use simple protocols on top?

IPSec, coming back with a vengeance!

This also makes me wonder what takes less space in ROM, a basic WireGuard implementation or a basic, stripped-down IPSec implementation (with only the ciphers and configuration necessary for the server compiled in). WireGuard has the advantage of being designed for simplicity, but IPSec has its 90s every-cycle-counts legacy that a lot of modern software has ignored since.

prashnts|1 month ago

> packet-loss

For one it can adequately show if your WiFi is performing well...

In a home network setting I've got a UDP display sink (64x64px, RGB) with a custom protocol. It works fine-- no hard number as the performance varies based on other factors, including congestion. I've been able to push it to >90fps, but around 42fps there is virtually no flicker.

For context in my protocol I use all 512bytes, with 3 first being the "line number and such" data and the rest containing ~128 pixels.

mlhpdx|1 month ago

WireGuard is far smaller in my experience. I don’t set aside the possibility that someone more clever than me can get IPsec condensed down to something tiny but I never could — it’s just too much in one bag, so to speak.

augusteo|1 month ago

Nice project. The $15 price point is genuinely impressive for something like this.

I've been curious about e-ink displays for a while but haven't taken the plunge. What's the refresh rate like in practice? And does it actually help you notice interesting posts you'd otherwise miss, or is it more of a fun desk decoration?

mlhpdx|1 month ago

The refresh rate must be something like 20fps when scrolling the text of long posts. I’m not sure and haven’t measured.

While I’m working I glance at it from time to time and get a sense of the wide breadth of conversations going on at any moment.

retired|1 month ago

> The $15 price point is genuinely impressive

That $15 price is only possible because AliExpress operates within a Chinese export system that is indirectly subsidised by the state. AliExpress benefits from significant Chinese government support.

cyode|1 month ago

Satisfying to see all the payload request and response sizes in bytes not kb.

Q: the display just starts at 0 and increments comment id by 1 every 10 seconds. Has the device caught up to latest? If you power cycle it, do you have to run through all historical comments?

mlhpdx|1 month ago

The zero is just a magic number to indicate grab the newest. So it’s just showing the most recent comments.

lormayna|1 month ago

Why not using MQTT? A Lambda that fetch new comments from HN, parse them into Markdown and push into MQTT; the ESP only needs to subscribes a topic on MQTT and render the messages.

password4321|1 month ago

The snarky answer is that MQTT doesn't require the author's UDP to AWS Lambda gateway SaaS⁰.

I did find MQTT flavors that support UDP but neither MQTT/UDP nor MQTT-SN seem concerned with WireGuard-level security.

⁰(This article is AI-assisted content marketing good enough that I didn't realize it until ¾ through.)

hyperbolablabla|1 month ago

This is awesome. I've been meaning to check out WireGuard for some time, and this project has been inspiring for me. Thanks!

password4321|1 month ago

> The client always sends the last ID it received.

Contrary to the second half of the article the display is not stateless (especially not WireGuard). However, the combination of minimum viable state and giving payment details to cloud services does simplify IoT projects.

nottorp|1 month ago

It's a great fun project but...

There isn't much of a difference between this and having all notifications enabled.

Yes it's a separate screen but you'll put it where you can see it while working or there is no point in it. And then it will distract you.

Terretta|1 month ago

Fantastic project, and imma save it for several ambient info things I'm looking to do.

But the LLM patterns and wording are tedious, especially:

No this. No that. No the other. Just much, sameness, repeated.

- And the bulleted question call and response? Too much of that too.

szundi|1 month ago

[deleted]