Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nook Dashboard

A lightweight smart home dashboard for the Barnes & Noble Nook Simple Touch (BNRV300) — an e-ink Android 2.1 device repurposed as a wall-mounted home control panel. Controls WiZ smart bulbs over local UDP, shows live weather, and runs entirely on a Raspberry Pi Zero 2W with no cloud dependency.


Screenshots

Home screen — clock, device tiles, weather summary and scenes at a glance

Home screen showing clock, 8 device tiles, weather and scene grid


Fullscreen clock — tap the clock on the home screen to expand; hours and minutes fill the panel with date on the right

Fullscreen clock view with large hour and minute digits


Weather detail — tap the weather panel for a split view: left panel shows current conditions (date, icon, big temperature, rain/humidity/UV, daily L/H range) on a grey background; right panel shows a 7-day forecast with day, icon, condition and temperature range

Weather detail view showing current conditions and 7-day forecast


Fullscreen weather — tap temperature or rain % to expand a single stat edge-to-edge

Fullscreen weather view showing temperature and rain chance in large type


Device drawer — tap any device tile to slide up per-bulb controls: power, brightness and colour temperature presets

Device control drawer showing power toggle, brightness and colour options


First: root your Nook with NookManager

This project requires a rooted Nook. The easiest way is NookManager — a graphical one-click rooter created by @jeff_kz on XDA Developers.

Full credit to both for keeping this ancient hardware alive and useful.


Prepare the Nook

Do these steps once, right after rooting and connecting ADB. They remove B&N's home app, prevent the screen from ever sleeping, and auto-launch the browser on every boot.

1. Remove the B&N home app

The B&N launcher runs its own sleep timer that overrides Android's screen timeout and shows a screensaver. Remove it permanently:

adb shell "su -c 'mount -o rw,remount /dev/block/mmcblk0p5 /system \
  && rm /system/app/Home.apk \
  && mount -o ro,remount /dev/block/mmcblk0p5 /system'"

Android's stock launcher (com.android.launcher) or ADW Launcher take over as fallback — neither interferes with always-on browser use.

2. Keep screen on and auto-open browser at boot

Android 2.1 has no sqlite3 or content command to raise the screen timeout beyond 1 hour. The fix is a userinit.sh that Android executes on every boot:

  • svc power stayon true — keeps screen on while charging
  • Kernel wake lock — prevents CPU suspend
  • Periodic touch event every 50 min — resets the screen-off timer before the 1-hour limit fires (handles the battery/unplugged case)
  • am start — opens the dashboard in NakedBrowser automatically
cat > /tmp/userinit.sh << 'EOF'
#!/system/bin/sh
svc power stayon true
echo "nook-dashboard" > /sys/power/wake_lock
am start -n com.fevdev.nakedbrowser/.NakedBrowserActivity -d "http://<your-pi-ip>:<port>"
(while true; do
  sleep 3000
  sendevent /dev/input/event2 3 0 10
  sendevent /dev/input/event2 3 1 790
  sendevent /dev/input/event2 1 330 1
  sendevent /dev/input/event2 0 0 0
  sendevent /dev/input/event2 1 330 0
  sendevent /dev/input/event2 0 0 0
done) &
EOF
adb push /tmp/userinit.sh /data/local/userinit.sh
adb shell "su -c 'chmod 755 /data/local/userinit.sh'"

Replace <your-pi-ip>:<port> with your actual server address before pushing.


What this is

Once rooted, the Nook makes a surprisingly good always-on home dashboard. E-ink draws near-zero power when the image is static, the screen is large enough to read across a room, and the hardware is nearly free second-hand.

This project gives you:

  • Clock & date — tap to expand fullscreen
  • Live weather — current conditions + 7-day forecast via Open-Meteo (no API key needed), tap panels to expand; weather detail shows a split layout with big current conditions on the left and the 7-day forecast on the right
  • Device controls — per-bulb on/off, brightness, colour temperature, RGB colour via a slide-up drawer; ON state renders in dark grey (not black) to prevent e-ink ghosting
  • Scenes — one-tap lighting presets
  • Fully local — Pi sends UDP commands directly to WiZ bulbs and Xiaomi/Mi devices; no cloud required for light control
  • Offline resilience — if the server goes down, the dashboard automatically switches to the clock view (which keeps ticking client-side) and shows a SERVER OFFLINE badge until it reconnects

Hardware

Part Notes
Nook Simple Touch BNRV300 Android 2.1, 800×600 e-ink, rooted via NookManager
Raspberry Pi Zero 2W Runs the Node.js server; any Pi or always-on machine works
WiZ smart bulbs Any WiZ bulb reachable by local IP
Xiaomi / Mi / Yeelight bulbs Optional; requires python-miio on the Pi (see below)

Setup

1. Clone and configure

git clone https://github.com/paras-pathak/nook-dashboard.git
cd nook-dashboard
cp config.example.json config.json

Edit config.json:

  • port — port for the server (default 3001)
  • location — your latitude/longitude and city name (used for weather only)
  • devices — your bulbs with local IPs and MAC addresses (WiZ and/or Xiaomi)
  • scenes — lighting presets (see Scene commands below)

Finding bulb IPs: WiZ app → bulb → Device Info, or check your router's DHCP table. Set static DHCP leases by MAC address in your router so IPs never change.

Xiaomi / Mi / Yeelight devices (optional)

Xiaomi devices use the miio protocol instead of WiZ UDP. Add "type": "miio" plus deviceId and token to their config entry:

{ "ip": "192.168.1.103", "mac": "AA:BB:CC:DD:EE:03", "name": "Bedside Lamp", "room": "Bedroom",
  "type": "miio", "deviceId": 123456789, "token": "your32charhextoken0000000000000000" }

The server uses python-miio to talk to these devices. Install it on your Pi:

pip3 install python-miio --break-system-packages

Finding your token: The easiest way is Xiaomi Cloud Tokens Extractor by @PiotrMachowski — run it on any machine, log in with your Mi Home credentials, and it prints tokens for all your devices. Full credit to PiotrMachowski for maintaining this tool.

git clone https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor.git
cd Xiaomi-cloud-tokens-extractor && pip3 install -r requirements.txt
python3 token_extractor.py

2. Run the server

Option A — systemd (recommended, auto-starts on boot):

# Copy and edit the service file
cp nook-dashboard.service /etc/systemd/system/nook-dashboard.service
nano /etc/systemd/system/nook-dashboard.service  # set User, WorkingDirectory, ExecStart

Find your node path first:

which node || which nodejs
# If installed via Homebridge: find /opt -name node -type f

Then enable and start:

sudo systemctl daemon-reload
sudo systemctl enable nook-dashboard
sudo systemctl start nook-dashboard
sudo systemctl status nook-dashboard

Option B — manual:

nohup node server.js > server.log 2>&1 &

Open http://<your-pi-ip>:<port> in a browser to confirm it works.

3. Open on the Nook

If you set up userinit.sh above, the browser opens automatically on every boot. Otherwise navigate manually to http://<your-pi-ip>:<port> in the Nook's browser.

Add ?v=1 to the URL (increment each time) if you need to force a cache refresh — the old WebKit caches aggressively.


Scene commands

Each scene is a list of commands. Each command targets all devices, a room, or a specific bulb by MAC:

{ "all": true, "state": false }
{ "room": "Living Room", "state": true, "dimming": 50, "temp": 3000 }
{ "mac": "AA:BB:CC:DD:EE:01", "state": true, "r": 180, "g": 0, "b": 180 }
Field Type Description
state boolean on / off
dimming 10–100 brightness %
temp 2200–6500 colour temperature in Kelvin
r g b 0–255 RGB colour (overrides temp)

API

Endpoint Method Description
/api/state GET Full state: weather, device states, config
/api/device/:mac POST Set bulb params (state, dimming, temp, r, g, b)
/api/scene/:index POST Trigger scene by index
/api/admin/config POST Save updated device/scene config

Hard-won Android 2.1 WebKit lessons

If you want to modify the frontend, these will save you hours:

  • No display:flex — use -webkit-box with -webkit-box-orient, -webkit-box-direction, -webkit-box-align, -webkit-box-pack
  • No CSS Grid, no gap, no inset — use floats and margins
  • Scroll driftoverflow:hidden alone isn't enough; add position:fixed to html,body
  • onclick on large divs is unreliable — always add a visible tappable back button; don't rely solely on tap-anywhere handlers
  • Aggressive caching — the browser caches JS and HTML even with Cache-Control: no-cache; use versioned URLs (?v=N) on the Nook to force fresh loads
  • Timezone — old Android reports UTC regardless of system timezone; correct it server-side by sending the Pi's UTC offset and recalculating in JS
  • Portrait on wake — after sleep the browser sometimes resets to portrait; CSS @media (orientation:portrait) with rotate(90deg) and swapped width/height forces landscape back
  • @font-face with TTF files fails silently — even with a correct MIME type, old WebKit may refuse to load font files over HTTP; embed the font as a base64 data URI in the src: of @font-face to bypass this entirely
  • E-ink ghosting — avoid large pure-black (#000) filled areas that stay on screen for extended periods; use dark grey (#444 or similar) for persistent ON states
  • Matter devices — WiZ Matter bulbs still respond to direct UDP on local IP; no hub needed for basic on/off/dim/colour control

License

MIT

About

E-ink smart home dashboard for Nook Simple Touch (BNRV300) + WiZ bulbs on Raspberry Pi

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages