|
@ -62,6 +62,20 @@ func main() { |
|
|
ColorFlags: device.CFlagRGB, |
|
|
ColorFlags: device.CFlagRGB, |
|
|
State: device.State{}, |
|
|
State: device.State{}, |
|
|
}) |
|
|
}) |
|
|
|
|
|
bus.RunEvent(events.HardwareState{ |
|
|
|
|
|
ID: "nanoleaf:10.80.1.11:dead", |
|
|
|
|
|
InternalName: "Hexagon 7", |
|
|
|
|
|
SupportFlags: device.SFlagPower | device.SFlagColor | device.SFlagIntensity, |
|
|
|
|
|
ColorFlags: device.CFlagRGB, |
|
|
|
|
|
State: device.State{}, |
|
|
|
|
|
}) |
|
|
|
|
|
bus.RunEvent(events.HardwareState{ |
|
|
|
|
|
ID: "nanoleaf:10.80.1.11:beef", |
|
|
|
|
|
InternalName: "Hexagon 8", |
|
|
|
|
|
SupportFlags: device.SFlagPower | device.SFlagColor | device.SFlagIntensity, |
|
|
|
|
|
ColorFlags: device.CFlagRGB, |
|
|
|
|
|
State: device.State{}, |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
time.Sleep(time.Millisecond) |
|
|
time.Sleep(time.Millisecond) |
|
|
|
|
|
|
|
@ -78,10 +92,20 @@ func main() { |
|
|
|
|
|
|
|
|
bus.RunCommand(commands.Assign{ |
|
|
bus.RunCommand(commands.Assign{ |
|
|
Match: "**:Hexagon *", |
|
|
Match: "**:Hexagon *", |
|
|
Effect: effects.Manual{ |
|
|
|
|
|
Power: gentools.Ptr(true), |
|
|
|
|
|
Color: gentools.Ptr(color.MustParse("rgb:#ffcc11")), |
|
|
|
|
|
Intensity: gentools.Ptr(1.0), |
|
|
|
|
|
|
|
|
Effect: effects.Pattern{ |
|
|
|
|
|
States: []device.State{ |
|
|
|
|
|
{ |
|
|
|
|
|
Power: gentools.Ptr(true), |
|
|
|
|
|
Color: gentools.Ptr(color.MustParse("rgb:#ff0000")), |
|
|
|
|
|
Intensity: gentools.Ptr(1.0), |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
Power: gentools.Ptr(true), |
|
|
|
|
|
Color: gentools.Ptr(color.MustParse("rgb:#00ff00")), |
|
|
|
|
|
Intensity: gentools.Ptr(0.7), |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
ShiftMS: 1000, |
|
|
}, |
|
|
}, |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
@ -92,4 +116,6 @@ func main() { |
|
|
log.Println("- ID:", dev.ID) |
|
|
log.Println("- ID:", dev.ID) |
|
|
log.Println(" Aliases:", dev.Aliases) |
|
|
log.Println(" Aliases:", dev.Aliases) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
time.Sleep(time.Second * 15) |
|
|
} |
|
|
} |