package de.nanoleaf.server.test;

import java.util.List;

import io.github.rowak.nanoleafapi.NanoleafDevice;
import io.github.rowak.nanoleafapi.util.NanoleafDeviceMeta;
import io.github.rowak.nanoleafapi.util.NanoleafSetup;

public class NanoleafEventServer {
	
	
    public static void main(String[] args) {
        int timeout = 2000;
//        List<NanoleafDeviceMeta> devices = NanoleafSetup.findNanoleafDevices(timeout);
//        NanoleafDeviceMeta meta = devices.get(0); // Beispiel: Erster Gerät in der Liste
//        String accessToken = NanoleafSetup.createAccessToken(meta.getHostName(), meta.getPort());
//        NanoleafDevice device = NanoleafSetup.createDevice(meta, accessToken);
//
//        // Event Handling
//        device.setOnStateChangedListener(state -> {
//            System.out.println("State changed: " + state.isOn());
//        });

        // Weitere Event-Listener hinzufügen, falls erforderlich
    }
}
