You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
743 B

2 years ago
2 years ago
2 years ago
2 years ago
  1. package main
  2. import (
  3. lucifer3 "git.aiterp.net/lucifer3/server"
  4. "git.aiterp.net/lucifer3/server/commands"
  5. "git.aiterp.net/lucifer3/server/services"
  6. "git.aiterp.net/lucifer3/server/services/hue"
  7. "git.aiterp.net/lucifer3/server/services/nanoleaf"
  8. "time"
  9. )
  10. func main() {
  11. bus := lucifer3.EventBus{}
  12. resolver := services.NewResolver()
  13. sceneMap := services.NewSceneMap(resolver)
  14. bus.JoinPrivileged(resolver)
  15. bus.JoinPrivileged(sceneMap)
  16. bus.Join(services.NewEffectEnforcer(resolver, sceneMap))
  17. bus.Join(nanoleaf.NewService())
  18. bus.Join(hue.NewService())
  19. bus.RunCommand(commands.ConnectDevice{ID: "hue:10.80.1.5", APIKey: "0-Ch5MKQtYnXrA3b8jvE4408mS3tHo9Vn57Zv8pt"})
  20. time.Sleep(time.Hour)
  21. }
  22. func p[T any](v T) *T {
  23. return &v
  24. }