Index of every page on this site: llms.txt
All skills
romit07 avatar

/android-home-server

@b45fb6a
Run it yourself

Set up and operate a spare non-rooted Android phone as a Linux home server and home-automation hub (Termux + SSH, Tailscale, ADB over network) to control WiZ lamps, a Sony Bravia TV, camera apps and phone settings remotely. Use when asked to set up, check, repair or use the Android home server, lamps, TV or phone automation.

  • 22 files
  • 44.7 KB
  • Updated 3 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/romit07/android-home-server/android-home-server

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

docswiz-lamps.md

≈656 tokens on demand. Your agent reads this file only when SKILL.md points to it.

WiZ lamps

WiZ bulbs accept JSON over UDP port 38899 on the local network, no cloud or account needed. The controller isn't on your LAN, so the phone sends the packets:

adb shell 'echo "{\"method\":\"setPilot\",\"params\":{\"state\":true,\"sceneId\":12,\"dimming\":100}}" | nc -u -w 2 192.168.1.50 38899'
# reply: {"method":"setPilot","env":"pro","result":{"success":true}}

(or from Termux over SSH: echo '{...}' | nc -u -w2 <bulb-ip> 38899)

Methods

Method Params
getPilot {} current state, scene, dimming, rssi
setPilot state true/false
sceneId see below
dimming 10–100
temp 2200–6500 (K)
r,g,b 0–255
getSystemConfig {} MAC, firmware

Scene ids

1 Ocean · 2 Romance · 3 Sunset · 4 Party · 5 Fireplace · 6 Cozy · 7 Forest · 8 Pastel colors · 9 Wake up · 10 Bedtime · 11 Warm white · 12 Daylight · 13 Cool white · 14 Night light · 15 Focus · 16 Relax · 17 True colors · 18 TV time · 19 Plantgrowth · 20 Spring · 21 Summer · 22 Fall · 23 Deepdive · 24 Jungle · 25 Mojito · 26 Club · 27 Christmas · 28 Halloween · 29 Candlelight · 30 Golden white · 31 Pulse · 32 Steampunk

Room = all bulbs together

scripts/lamps.py sends the same command to every bulb in BULB_MACS, with 3 attempts, and only reports ok when every bulb answered success:true.

Discovery by MAC

Bulb IPs change after power cuts and router restarts. MACs never change. lamps.py discover:

  1. ping-sweeps LAN_PREFIX.2-254 from the phone (fills the ARP table),
  2. reads ip neigh,
  3. maps BULB_MACS → IPs and caches them in bulbs.json. It runs automatically when the first attempt fails.

Schedule

scripts/scheduler.py reads LAMP_SCHEDULE (default 18:00=day,22:00=on,02:00=night,04:00=off). Each slot fires once, no catch-up (a slot missed by more than SCHEDULE_GRACE_MIN is skipped) and restarting the scheduler never re-applies the current slot.

Backup in the WiZ app: create the same schedules in the app (Automation → Schedules → add, pick the room/all bulbs, fixed time, Sun–Sat, mode, no end time). These run on the bulbs themselves, so they work even when the phone or controller is offline, as long as the bulbs are on Wi-Fi. Running both is harmless, since they set the same modes.

Gotchas

  • Bulbs that drop off the extender overnight will miss both schedules. Restart the extender or move the bulb closer to the main router.
  • nc on Android/Termux: use -u -w 2, and wrap in timeout 4 so it never hangs.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at b45fb6a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 3 weeks ago

README badge

README badge for romit07/android-home-server