Puckmote - Universal Remote Control

Posted on
  • Project: https://benjaminbenben.com/puckmote
    Source: https://github.com/benfoxall/puckmote
    Video: https://photos.app.goo.gl/7MuC2SxdMbTUpC­8g9

    I've been hacking on a page that allows you load IR codes for a tv/projector/etc, and send them on to your Puck.

    • It's installable as a progressive web app, so you can "Save" a controller on your phone homescreen
    • pronto codes are generated on the fly using a webassembly build of MakeHex
    • Repeat presses are faster/cached because the IR codes can be quite large

    Back story - I made a remote control for my TV last year, though I thought it could be interesting/handy to let you pick devices from a list.


    1 Attachment

    • Screenshot 2021-05-05 at 11.26.56.png
  • Wed 2021.05.05

    Well, you have out done yourself this time @benjaminbenben  !!

    The video clip demos the extensive pass-through web page commands to actual device task requested.

    My vote for the project of the year here. Nicely done, indeed!

  • This is great - thanks Ben! And you even did the MakeHex wasm build too? And this pulls direct from IRDB, or are all the codes actually built into it?

    Is it worth adding a 'Try it now' link to https://benjaminbenben.com/puckmote/ from https://github.com/benfoxall/puckmote ?

    Also just a note for others that the 2v08 firmware had a bug where the IR transmitter on Puck.js v2 would get left on after a command. So it's worth upgrading to 2v09 or later so your battery isn't killed ;)

    This kind of thing would be really cool as a configurator... The PWA is great as an actual TV remote from your phone, but I guess there could be a way to configure something like:

    • short-press: button 0, button 1, button 9, ok
    • long-press: TV power button

    So you could set one up to do specific tasks very easily - either for yourself, or for an elderly relative who just wants to press a button at 7PM and switch to antiques roadshow :)

  • Thanks a lot @Robin, glad you like it!!

    @Gordon, yep I built the MakeHex wasm - was my first time using WebAssembly; don't think it's the best example of it! It pulls directly from IRDB, so any updates should appear here too. I've been in touch with the IRBD maintainers about using this approach to rebuild irdb.tk (it's been down for the last few months).

    Oh my, a configurator would be amazing. Especially being able to chain together commands - you could do all sorts of things.

    Good shout on the Try It Now link - I'll add that to the readme.

    Thanks for checking it out!

  • MakeHex wasm

    Hah, you obviously haven't seen my attempt at heatshrink.js :) That looks great - and honestly the Wasm bit is never going to be pretty :)

    Actually having that as a generic irdb.js that anyone could pull in from a CDN seems like it'd be amazing.

    rebuild irdb.tk (it's been down for the last few months)

    Wow, that's a massive shame! Has there been any interest from them? I'd have thought a static site would reduce the burden of hosting it to pretty much zero - they could even serve from GitHub.

    I'm not sure if there's interest, but if I was allowed to have a 'upload to Puck.js' button on irdb.tk it feels like it'd be worth me paying them some kind of maintenance money or taking over hosting it?

  • Hehe, I'll need to check out heatshrink.js to make me feel better about my wasm-ing!

    Ah yeah, an irdb.js could be great! I've got a tiny bit of wrapper code which splits/regexes lines and parses csv files which could be a starting point.

    The irdb.tk site is being discussed on https://github.com/probonopd/irdb/issues­/28

    It sounds like there's interest in getting it back online (and maybe migrating to GitHub pages), though sounds like they might be struggling with time. I'm sure they'd love to hear any offers of hosting or "upload to Puck.js" opportunities!

  • I have just tries wasm -ing makehex when I found your project. It works great!

    I found only one drawback: there are some protocols where definitions are not embed into the C file (https://github.com/probonopd/MakeHex/blo­b/master/EncodeIR.cpp), but require an additional IRP file. For example Sony formats.. What do you think, which one is more simple: adding the missing definitions to EncodeIR.cpp, or making these IRP files somehow available? I'm still very noob with wasm, I think I'm going to try the first version - any advice is welcomed :)

  • Hey @user132453! Great, I'm glad you found it!

    I'm not sure, but I think adding the definitions to the EncodeIR.cpp file seems like a good idea to me too. It seems like there was a PR that added them but couldn't be merged probonopd/MakeHex#5, so maybe they'd be up for a new one?

    You may have come across this already, but I plonked some very rough notes about wasming the code: https://github.com/benfoxall/puckmote/tr­ee/main/src/wasm (just added a diff of the cpp file that I'd left off before)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Puckmote - Universal Remote Control

Posted by Avatar for benjaminbenben @benjaminbenben

Actions