scripting system, hue fixes and such
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"git.aiterp.net/lucifer3/server/commands"
|
||||
"git.aiterp.net/lucifer3/server/effects"
|
||||
"git.aiterp.net/lucifer3/server/events"
|
||||
"git.aiterp.net/lucifer3/server/services/script"
|
||||
"git.aiterp.net/lucifer3/server/services/uistate"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
@@ -52,6 +53,8 @@ func New(addr string) (lucifer3.Service, error) {
|
||||
})
|
||||
case input.PairDevice != nil:
|
||||
bus.RunCommand(*input.PairDevice)
|
||||
case input.ConnectDevice != nil:
|
||||
bus.RunCommand(*input.ConnectDevice)
|
||||
case input.ForgetDevice != nil:
|
||||
bus.RunCommand(*input.ForgetDevice)
|
||||
case input.SearchDevices != nil:
|
||||
@@ -60,6 +63,10 @@ func New(addr string) (lucifer3.Service, error) {
|
||||
bus.RunCommand(*input.AddAlias)
|
||||
case input.RemoveAlias != nil:
|
||||
bus.RunCommand(*input.RemoveAlias)
|
||||
case input.UpdateScript != nil:
|
||||
bus.RunCommand(*input.UpdateScript)
|
||||
case input.ExecuteScript != nil:
|
||||
bus.RunCommand(*input.ExecuteScript)
|
||||
default:
|
||||
return c.String(400, "No supported command found in input")
|
||||
}
|
||||
@@ -113,8 +120,11 @@ type commandInput struct {
|
||||
AddAlias *commands.AddAlias `json:"addAlias,omitempty"`
|
||||
RemoveAlias *commands.RemoveAlias `json:"removeAlias,omitempty"`
|
||||
PairDevice *commands.PairDevice `json:"pairDevice,omitempty"`
|
||||
ConnectDevice *commands.ConnectDevice `json:"connectDevice,omitempty"`
|
||||
SearchDevices *commands.SearchDevices `json:"searchDevices,omitempty"`
|
||||
ForgetDevice *commands.ForgetDevice `json:"forgetDevice,omitempty"`
|
||||
UpdateScript *script.UpdateScript `json:"updateScript,omitempty"`
|
||||
ExecuteScript *script.ExecuteScript `json:"executeScript,omitempty"`
|
||||
}
|
||||
|
||||
type assignInput struct {
|
||||
|
||||
Reference in New Issue
Block a user