An iroh powered smart fan

(iroh.computer)

89 points | by surprisetalk 3 days ago

4 comments

  • skybrian 5 hours ago
    It's unclear to me why they needed to compile Rust to WebAssembly to write a website. It looks like iroh has a JavaScript API:

    https://docs.iroh.computer/languages/javascript

    Edit: actually, that's a Node.js-specific API. For browsers, it seems like they should have a platform-independent JavaScript/TypeScript API that includes a WebAssembly file (if needed) instead of expecting you to compile WebAssembly yourself.

    • nine_k 5 hours ago
      Not touching JavaScript might be a reason enough. (Though I bet it has a Typescript API, and Typescript is great.)
      • croes 2 hours ago
        Typescript is nothing without JavaScript
        • roblabla 18 minutes ago
          With that logic, C is nothing without assembly.
  • Alien1Being 2 hours ago
    I use a inexpensive 36 AUD Tapo infrared hub to control my fan reliably.

    It links to my Google Home installation and responds to voice commands.

    https://us.store.tapo.com/products/tapo-h110-smart-ir-iot-hu...

    Someone with too much time on their hands might benefit from the iroh solution....

  • shermantanktop 5 hours ago
    This is interesting as an example of just how complicated and elaborate a toolchain you can use to build something dead simple.

    There’s a lot that comes for free by adding all these libraries and crates and steps. But from what I can tell it comes down to:

    let _ = if fan_on { fan.set_high() } else { fan.set_low() };

    • klooj 5 hours ago
      iroh is a peer to peer networking technology so the project example of controlling a fan isn't so much about the fan but rather that it's controllable from anywhere through an esp32 microcontroller that can maintain a resilient connection endpoint even through power cycles and so on. I think iroh was posted about on HN a few weeks ago and I had a similar reaction of like...what in the world is this blog post even saying haha. But I found their docs page and found it pretty fascinating learning! https://docs.iroh.computer/what-is-iroh
      • rwmj 2 hours ago
        I use a fan with an on/off button.
        • cinntaile 1 hour ago
          That's very much not a smart fan. Not really relevant.
          • rwmj 47 minutes ago
            Pretty relevant because I've never seen the reason for "smart" gadgets at all. Physical switches are simply better.
            • bloppe 27 minutes ago
              If your fan isn't Byzantine fault tolerant, you're irrelevant
  • Teknomadix 2 hours ago
    Why.
    • gurjeet 1 hour ago
      In hacker culture, the correct question is "Why not?"

      Somebody wanted to do something, and they did it; it doesn't have to be any more complicated than that :-)

      > Don't be curmudgeonly. Thoughtful criticism is fine, but please don't be rigidly or generically negative.

      Sincerely, HN Guidelines Police :-)

      https://news.ycombinator.com/newsguidelines.html

    • kennywinker 42 minutes ago
      To demonstrate the potential of iroh to enable accessing stuff across complex network structures for iot type use cases
    • Frenchgeek 2 hours ago
      Because Uncle Iroh needs more fans maybe? (should have been a tea kettle)