examples/device_control/README.md
Demonstrate how to control an IoT device like a lightbulb. The dashboard UI is bound to the device's properties and events, allowing real-time interaction and logging.
power_changed, brightness_changed, and log_message eventslightbulb.power = True and lightbulb.brightness = 75# Create device
lightbulb = Lightbulb()
# Control via properties
lightbulb.power = True
lightbulb.brightness = 75
# Subscribe to events
lightbulb.power_changed.subscribe(handle_power_change)
lightbulb.log_message.subscribe(log.push)
python main.py
Turn on the lightbulb to see autonomous heartbeat logging.
Ideal for IoT devices, smart home controls, industrial equipment, robotics, and hardware interfaces where you need event-driven communication between device logic and UI.