The UI is a really good addition to the excellent Zigbee2Mqtt. The only issue I found is this.
The docker run command line shown in readme fails when MQTT password contains special characters like !#@.
Expected behavior
It was expected that the container would start Z2MA and connect to the MQTT broker
Steps I took to try resolve the problem
I succeeded by going into the Z2MA docker container and configure appconfiguration.json to reflect the right MQTT password. Then the container would run OK.
Installation
Version of Zigbee2MqttAssistant (this software): 0.3.157 (0.3.157+Branch.master.Sha.ea388c3bbc2d43c4c9c62f27bb6764911ba4acc9) Release
Version of Zigbee2Mqtt: 1.16.2
Coordinator version: 20190608
Installation type (HASS.IO, Docker...): Docker
Docker version + CPU type (amd64, arm arm64...): version 20.10.1 (containerd 1.4.3), architecture linux/arm
Pertinent logs
Starting Zigbee2MqttAssistant v0.3.157+Branch.master.Sha.ea388c3bbc2d43c4c9c62f27bb6764911ba4acc9...,
warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60],
Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.,
Hosting environment: Production,
Content root path: /app,
Now listening on: http://[::]:80,
Application started. Press Ctrl+C to shut down.,
Application is shutting down...,
Starting Zigbee2MqttAssistant v0.3.157+Branch.master.Sha.ea388c3bbc2d43c4c9c62f27bb6764911ba4acc9...,
warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60],
Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.,
Hosting environment: Production,
Content root path: /app,
Now listening on: http://[::]:80,
Application started. Press Ctrl+C to shut down.,
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1],
An unhandled exception has occurred while executing the request.,
System.InvalidOperationException: Another remove in progress for this device.,
at Zigbee2MqttAssistant.Services.MqttConnectionService.RemoveDeviceAndWait(String deviceFriendlyName, Boolean forceRemove) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 744,
at Zigbee2MqttAssistant.Services.BrigeOperationService.RemoveDeviceById(String deviceId, Boolean forceRemove) in d:\a\1\s\Zigbee2MqttAssistant\Services\BrigeOperationService.cs:line 27,
at Zigbee2MqttAssistant.Controllers.HomeController.RemoveDevice(String id, Boolean forceRemove) in d:\a\1\s\Zigbee2MqttAssistant\Controllers\HomeController.cs:line 110,
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments),
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask),
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.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.gAwaited|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.gAwaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope),
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger),
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.gAwaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task),
Application is shutting down...,
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0],
Disconnected from MQTT server 192.168.68.64.,
System.Threading.Tasks.TaskCanceledException: A task was canceled.,
at MQTTnet.Client.MqttClient.TrySendKeepAliveMessagesAsync(CancellationToken cancellationToken),
==> after applying the work around the logs shows this and app works excellent
Starting Zigbee2MqttAssistant v0.3.157+Branch.master.Sha.ea388c3bbc2d43c4c9c62f27bb6764911ba4acc9...,
warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60],
Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.,
Hosting environment: Production,
Content root path: /app,
Now listening on: http://[::]:80,
Application started. Press Ctrl+C to shut down.,
Describe the bug
The UI is a really good addition to the excellent Zigbee2Mqtt. The only issue I found is this. The docker run command line shown in readme fails when MQTT password contains special characters like !#@.
To Reproduce
Steps to reproduce the behavior:
Expected behavior It was expected that the container would start Z2MA and connect to the MQTT broker
Steps I took to try resolve the problem
I succeeded by going into the Z2MA docker container and configure appconfiguration.json to reflect the right MQTT password. Then the container would run OK.
Installation
Pertinent logs
Starting Zigbee2MqttAssistant v0.3.157+Branch.master.Sha.ea388c3bbc2d43c4c9c62f27bb6764911ba4acc9..., warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60], Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed., Hosting environment: Production, Content root path: /app, Now listening on: http://[::]:80, Application started. Press Ctrl+C to shut down., Application is shutting down..., Starting Zigbee2MqttAssistant v0.3.157+Branch.master.Sha.ea388c3bbc2d43c4c9c62f27bb6764911ba4acc9..., warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60], Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed., Hosting environment: Production, Content root path: /app, Now listening on: http://[::]:80, Application started. Press Ctrl+C to shut down., fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1], An unhandled exception has occurred while executing the request., System.InvalidOperationException: Another remove in progress for this device., at Zigbee2MqttAssistant.Services.MqttConnectionService.RemoveDeviceAndWait(String deviceFriendlyName, Boolean forceRemove) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 744, at Zigbee2MqttAssistant.Services.BrigeOperationService.RemoveDeviceById(String deviceId, Boolean forceRemove) in d:\a\1\s\Zigbee2MqttAssistant\Services\BrigeOperationService.cs:line 27, at Zigbee2MqttAssistant.Controllers.HomeController.RemoveDevice(String id, Boolean forceRemove) in d:\a\1\s\Zigbee2MqttAssistant\Controllers\HomeController.cs:line 110, at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments), at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask),
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.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.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.gAwaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope),
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger),
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task),
Application is shutting down...,
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0],
Disconnected from MQTT server 192.168.68.64.,
System.Threading.Tasks.TaskCanceledException: A task was canceled.,
at MQTTnet.Client.MqttClient.TrySendKeepAliveMessagesAsync(CancellationToken cancellationToken),
==> after applying the work around the logs shows this and app works excellent Starting Zigbee2MqttAssistant v0.3.157+Branch.master.Sha.ea388c3bbc2d43c4c9c62f27bb6764911ba4acc9..., warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60], Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed., Hosting environment: Production, Content root path: /app, Now listening on: http://[::]:80, Application started. Press Ctrl+C to shut down.,