i8beef / HomeAutio.Mqtt.GoogleHome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1.3.0 changes, "_" - Message not received on google/home/execution/...

sognen opened this issue · comments

Hi,
With the latest 1.3.x releases will "_" continue to work for parameterless commands? For example, I used to have action.devices.commands.mediaStop under the TransportContol trait defined as:

"action.devices.commands.mediaStop": {
"_": "homie/livingroom-hts/kodi/mediaStop/set"

After the 1.3 release I revised it to:

"action.devices.commands.mediaStop": {}, and were expecting to see incoming messages/commands on /google/home/....

But I am now getting a voice message saying "looks like homeautio is not available anymore" (both with the old and new way), and no incoming messages. Other commands such as changing tv channels work fine, so it appears it is limited to parameterless commands.

Do you know what could be wrong? I did set up homegraph earlier today to see if I could get devices to report online. That did not work and while they continue to respond to commands they are still reported as offline in the Nest Hub. The log says device synced with homegraph. Not sure if these two issues are related?

Cato

Hi,
Under you can find parts of the log I believe is relevant.

2020-11-16 17:14:41.927 +00:00 [Information] Received EXECUTE intent for commands: action.devices.commands.mediaPause
2020-11-16 17:14:41.928 +00:00 [Verbose] "Action Filter": Before executing "OnActionExecuted" on filter "Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter".
2020-11-16 17:14:41.928 +00:00 [Verbose] "Action Filter": After executing "OnActionExecuted" on filter "Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter".
2020-11-16 17:14:41.928 +00:00 [Verbose] "Action Filter": After executing "OnActionExecutionAsync" on filter "Microsoft.AspNetCore.Mvc.Filters.ControllerActionFilter".
2020-11-16 17:14:41.929 +00:00 [Verbose] "Resource Filter": Before executing "OnResourceExecuted" on filter "Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter".
2020-11-16 17:14:41.929 +00:00 [Verbose] "Resource Filter": After executing "OnResourceExecuted" on filter "Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter".
2020-11-16 17:14:41.930 +00:00 [Information] Executed action "HomeAutio.Mqtt.GoogleHome.Controllers.GoogleHomeController.Post (HomeAutio.Mqtt.GoogleHome)" in 5.4537ms
2020-11-16 17:14:41.930 +00:00 [Information] Executed endpoint '"HomeAutio.Mqtt.GoogleHome.Controllers.GoogleHomeController.Post (HomeAutio.Mqtt.GoogleHome)"'
2020-11-16 17:14:41.931 +00:00 [Error] Connection id ""0HM4A68BUTB4B"", Request id ""0HM4A68BUTB4B:00000001"": An unhandled exception was thrown by the application.
System.NullReferenceException: Object reference not set to an instance of an object.
at HomeAutio.Mqtt.GoogleHome.DictionaryExtensions.ToFlatDictionary(IDictionary2 source, String delimiter) in /app/HomeAutio.Mqtt.GoogleHome/DictionaryExtensions.cs:line 21 at HomeAutio.Mqtt.GoogleHome.IntentHandlers.ExecuteIntentHandler.Handle(ExecuteIntent intent) in /app/HomeAutio.Mqtt.GoogleHome/IntentHandlers/ExecuteIntentHandler.cs:line 112 at HomeAutio.Mqtt.GoogleHome.Controllers.GoogleHomeController.Post(Request request) in /app/HomeAutio.Mqtt.GoogleHome/Controllers/GoogleHomeController.cs:line 75 at lambda_method(Closure , Object , Object[] ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at HomeAutio.Mqtt.GoogleHome.RequestResponseLoggingMiddleware.LogResponse(HttpContext context) in /app/HomeAutio.Mqtt.GoogleHome/RequestResponseLoggingMiddleware.cs:line 108 at HomeAutio.Mqtt.GoogleHome.RequestResponseLoggingMiddleware.Invoke(HttpContext context) in /app/HomeAutio.Mqtt.GoogleHome/RequestResponseLoggingMiddleware.cs:line 42 at Microsoft.AspNetCore.Builder.Extensions.UsePathBaseMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application)

  1. "_" will no longer work. Instead it should ALWAYS publish the full command piece to the generated MQTT topic structure specified in the #103 changes. My thought here is that this app can work in a "generic bridge" mode where it always spits out the full command by default to a standardized MQTT topic structure, instead of requiring setup on that.
  2. Your issue is likely something I messed up with commands that have no params at all like this one. Let me take a look.

Try that version I just released. Before, it would have bypassed any further execution once it identified as a delegate command. Now it just ALWAYS sends the delegate command, and then continues on executing and trying to build a response, so some of the latter code needed a touch up. Let me know if that gets you there or not.

Thank you. Delegated command messages are now received on google/home/execution/...

Closing as fixed.