Settings

Theme

Building a Real-Time HN Display for $15

medium.com

63 points by kylegalbraith 2 months ago · 23 comments

Reader

MrBuddyCasino 2 months ago

Great project!

There is another neat board that I like, smaller but looks nicer, the "ESP32-C6 1.47Inch LCD Screen" for just ten bucks: https://aliexpress.com/item/1005008465501661.html

rcarmo 2 months 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 2 months 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 2 months 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 2 months 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 2 months ago

      I monitor packet loss on both sides all day every day. It’s still a thing, but different than I’d imagined:

      - Episodic most often. Something transient causes high loss for a short time. This happens locally and “in the cloud”. - Persistent due to a back connection or very high network load. I only really ever see this locally.

      But I can go days at a time and not lose even one of millions of probes and responses.

      When connections are good, they’re excellent these days. When they’re bad, well that doesn’t seem to have changed.

  • mlhpdx 2 months 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 2 months 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 2 months 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 2 months 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.

  • ofrzeta 2 months ago

    You can get e-paper pricetags quite cheap. Then you can use https://openepaperlink.de/ and configure one of the tags to pull the HN RSS.

cyode 2 months 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 2 months ago

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

lormayna 2 months 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 2 months 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.)

    • mlhpdx 2 months ago

      Fair point that yes I’m eating my own dog food here. And I’ve been called a robot enough times maybe I should keep track.

      To the question, UDP is easier on a battery than MQTT.

      • password4321 2 months ago

        To be clear I understand you are not a robot, but the article reads more as LLM generated especially toward the end which is why I said "AI-assisted".

        Thanks for sharing this project; TIL about AliExpress Dollar Express tiny touch screen ESP32 dev kits for first-time buyers for $9 including shipping.

hyperbolablabla 2 months 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 2 months 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 2 months 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 2 months 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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection