Near: Bluetooth low energy
Phones and small objects pass a note to whatever is close by. Roughly 10 to 50 m per hop, less through walls and people. No internet needed. A passing phone can carry a note across a gap.
Town: long-range low-power radio
Small rooftop radios hand tiny messages from roof to roof. Roughly a few hundred metres per hop in built-up streets, up to a few kilometres with a clear line of sight. Hills and buildings block it, so a relay on high ground helps. No internet needed. It moves very little data, slowly, and it needs small dedicated hardware.
World: internet relays
Servers that anyone can run pass small signed notes along. The sender's key signs each note, so there are no accounts, and a home can use several relays at once. Any distance, as long as both ends are online.
The signal
Who, lit or snuffed, and when. Nothing else. That is a few dozen bytes, small enough to ride any of the three layers. Any node can hold a signal and pass it on later, when a path appears.
What a web page can do today
It can talk to internet relays. It generally cannot form a Bluetooth mesh by itself; that takes an app or the object itself. The radio layer needs its own small hardware on a roof or a windowsill.
About this sketch
Every range here is approximate and depends on walls, height and line of sight. In this town the Near reach is drawn at about 30 m and the rooftop reach at about 230 m, so the hill matters. Hop times are slowed down so you can watch them. The town is invented.
This is not a safety or emergency service. Signals can arrive late or not at all. Each owner decides whether their home is on or off.