diff --git a/machinery/go.mod b/machinery/go.mod index 1f278d67..4bf35960 100644 --- a/machinery/go.mod +++ b/machinery/go.mod @@ -21,7 +21,7 @@ require ( github.com/gorilla/websocket v1.5.3 github.com/kellydunn/golang-geo v0.7.0 github.com/kerberos-io/joy4 v1.0.64 - github.com/kerberos-io/onvif v1.0.0 + github.com/kerberos-io/onvif v0.0.14 github.com/minio/minio-go/v6 v6.0.57 github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 github.com/pion/interceptor v0.1.37 @@ -93,10 +93,8 @@ require ( github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 // indirect github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect - github.com/icholy/digest v0.1.23 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/juju/errors v1.0.0 // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/klauspost/cpuid v1.2.3 // indirect github.com/klauspost/cpuid/v2 v2.2.10 // indirect diff --git a/machinery/go.sum b/machinery/go.sum index 5f4acc1c..85968a01 100644 --- a/machinery/go.sum +++ b/machinery/go.sum @@ -286,8 +286,6 @@ github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjG github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/icholy/digest v0.1.23 h1:4hX2pIloP0aDx7RJW0JewhPPy3R8kU+vWKdxPsCCGtY= -github.com/icholy/digest v0.1.23/go.mod h1:QNrsSGQ5v7v9cReDI0+eyjsXGUoRSUZQHeQ5C4XLa0Y= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= @@ -297,16 +295,14 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/errors v1.0.0 h1:yiq7kjCLll1BiaRuNY53MGI0+EQ3rF6GB+wvboZDefM= -github.com/juju/errors v1.0.0/go.mod h1:B5x9thDqx0wIMH3+aLIMP9HjItInYWObRovoCFM5Qe8= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kellydunn/golang-geo v0.7.0 h1:A5j0/BvNgGwY6Yb6inXQxzYwlPHc6WVZR+MrarZYNNg= github.com/kellydunn/golang-geo v0.7.0/go.mod h1:YYlQPJ+DPEzrHx8kT3oPHC/NjyvCCXE+IuKGKdrjrcU= github.com/kerberos-io/joy4 v1.0.64 h1:gTUSotHSOhp9mNqEecgq88tQHvpj7TjmrvPUsPm0idg= github.com/kerberos-io/joy4 v1.0.64/go.mod h1:nZp4AjvKvTOXRrmDyAIOw+Da+JA5OcSo/JundGfOlFU= -github.com/kerberos-io/onvif v1.0.0 h1:pLJrK6skPkK+5Bj4XfqHUkQ2I+p5pwELnp+kQTJWXiQ= -github.com/kerberos-io/onvif v1.0.0/go.mod h1:P1kUcCfeotJSlL1jwGseH6NSnCwWiuJLl3gAzafnLbA= +github.com/kerberos-io/onvif v0.0.14 h1:ZcpsIAFbuR/mEuTmMnyHM2sLX7OsnQ5sCjmhsgL33VI= +github.com/kerberos-io/onvif v0.0.14/go.mod h1:NAsn+VuMB/hvrm40xULWyiLJ/ArB5nAecX5hvDo5gcA= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= @@ -907,10 +903,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/machinery/src/cloud/Cloud.go b/machinery/src/cloud/Cloud.go index d6ba5b34..64b4b975 100644 --- a/machinery/src/cloud/Cloud.go +++ b/machinery/src/cloud/Cloud.go @@ -366,7 +366,7 @@ loop: if pullPointAddressInitialState == "" && pullPointAddressLoopState == "" { var events []onvif.ONVIFEvents - outputs, err := onvif.GetRelayOutputs(device) + /*outputs, err := onvif.GetRelayOutputs(device) if err != nil { log.Log.Debug("cloud.HandleHeartBeat(): error while getting relay outputs: " + err.Error()) } else { @@ -394,7 +394,7 @@ loop: } events = append(events, event) } - } + }*/ // Marshal the events onvifEventsList, err = json.Marshal(events) diff --git a/machinery/src/onvif/main.go b/machinery/src/onvif/main.go index 45623d77..8778177a 100644 --- a/machinery/src/onvif/main.go +++ b/machinery/src/onvif/main.go @@ -1268,13 +1268,13 @@ func TriggerRelayOutput(dev *onvif.Device, output string) (err error) { err = nil // Get all outputs - relayoutputs, err := GetRelayOutputs(dev) + //relayoutputs, err := GetRelayOutputs(dev) // For the moment we expect a single output // However in theory there might be multiple outputs. We might need to change // this in the future "kerberos-io/onvif" library. if err == nil { - token := relayoutputs.RelayOutputs[0].Token + /*token := relayoutputs.RelayOutputs[0].Token if output == string(token+"-output") { outputState := device.SetRelayOutputState{ RelayOutputToken: token, @@ -1293,9 +1293,9 @@ func TriggerRelayOutput(dev *onvif.Device, output string) (err error) { } else { log.Log.Error("onvif.main.TriggerRelayOutput(): " + stringBody) } - } else { - log.Log.Error("onvif.main.TriggerRelayOutput(): could not find relay output (" + output + ")") - } + } else {*/ + log.Log.Error("onvif.main.TriggerRelayOutput(): could not find relay output (" + output + ")") + //} } else { log.Log.Error("onvif.main.TriggerRelayOutput(): something went wrong while getting the relay outputs " + err.Error()) } diff --git a/machinery/src/routers/http/methods.go b/machinery/src/routers/http/methods.go index b8d0aa1b..aa4a48a5 100644 --- a/machinery/src/routers/http/methods.go +++ b/machinery/src/routers/http/methods.go @@ -377,7 +377,7 @@ func GoToOnvifPreset(c *gin.Context) { // @Description Will get the digital inputs from the ONVIF device. // @Success 200 {object} models.APIResponse func DoGetDigitalInputs(c *gin.Context) { - var onvifCredentials models.OnvifCredentials + /*var onvifCredentials models.OnvifCredentials err := c.BindJSON(&onvifCredentials) if err == nil && onvifCredentials.ONVIFXAddr != "" { @@ -450,7 +450,7 @@ func DoGetDigitalInputs(c *gin.Context) { c.JSON(400, gin.H{ "data": "Something went wrong: " + err.Error(), }) - } + }*/ } // DoGetRelayOutputs godoc