Runnable Script

Don’t want to wait for the custom Internet Timebox hardware to ship or too broke to buy another thing..? Well then we’ve got good news for you! With a bit of technical wit you can start using the Internet Timebox today!

Below you’ll find instructions on how to convert an existing router running OpenWRT to use the Internet Timebox script.

Mechanics of Install

The Internet Timebox hardware is designed as a kit router which runs OpenWRT. On top of that OpenWRT install lives a custom script (and daemon) that is compatible with being dropped into any OpenWRT install. You can use the custom OpenWRT script and daemon today to get offline; the difference / what you’ll miss by not buying the custom router kit is that you won’t have nice LED displays and dials to adjust your online/offline timeboxes. But that’s ok because these hardware features are redudant and can all be tweaked from the software side as well.

Installation Instructions:

  1. Connect to the UART or SSH into your OpenWRT router as root.
  2. Install the script prerequistes: opkg update && opkg install libuci-lua luasocket
  3. Download the timebox.lua script and mark it as executable: wget http://timebox.milesalan.com/openwrt_script/timebox.lua -O /root/timebox.lua chmod +x /timebox.lua
  4. Download the daemon script and mark it as executable: wget http://timebox.milesalan.com/openwrt_script/timebox -O /etc/init.d/timebox chmod +x /etc/init.d/timebox
  5. Alter the settings for your online timebox, offline timebox, and target interface as desired: uci set s_online 20 uci set s_offline 20
  6. Enable the daemon /etc/init.d/timebox enable
  7. Reboot your router and enjoy the periodic silence!

Parameters your free to toggle

There are a number of variables you can change which are stored in OpenWRT’s UCI interface.

After any of these changes, you must commit and restart the daemon: uci commit && /etc/init.d/timebox restart