HACC - Home Assistant Command Center

@stban1983 I think this is a bug, can you open a GitHub issue for this? In the meantime, you’ll want to put a 1x1 tile as the first tile and then save the layout which should fix the drop positions.

Obviously you should be able to have whatever tile you want as the first tile, so I’ll get that sorted out. :slightly_smiling_face:

@squirtbrnr Can you tell me all of the attributes on your person entity on the States tab in HA?

ok with a 1x1 tile as the first tile it works.
I also have the same problem than @squirtbrnr with person tile.
here is the entity attributes:
State: home

editable: true
id: b92c2f0fd2de40d0b43362f2a567c9d8
latitude: xx.2088516
longitude: -x.5758987
gps_accuracy: 17.888999938964844
source: device_tracker.ubv7n18320010643
user_id: b6886eb28e884cd0a57d8ac30f2603ce
friendly_name: Stephane

It may not work because you don’t have an entity_picture attribute, but it should display a no-picture silhouette :bust_in_silhouette: or something like that. Can you open a bug for this? My HA instance is currently broken (SD card died) but I’m hoping to have it fixed later today so I can experiment with this then and see what the issue is.

ok i will, thanks a lot for your time and yout work.
I hope one day we will be able to add thermostat tile ? :slight_smile: :slight_smile:

1 Like

Yes! Thermostat/climate is on my list - and I’ll add a bug to track that on GitHub!

Great! and sorry for your SD card. Try to go with an SSD :slight_smile:
I think i’m gonna re use my old Windows Phone to control HA, it runs well on it!

Good work! Sadly, it seems that it doesn’t work on old iPad Gen 1. It just shows loading placeholder on buttons/entities.

What version of iOS? That version of Safari may not be able to handle the necessary JavaScript unfortunately.

same here. iOS 9.3.5 doesn’t load except for the pulsing squares. Probably similar to why the native HA app or even the frontend doesn’t load.

Maybe not. It just may be MY ignorance that caused me to include both. Lol

Just letting you know I successfully compiled and ran this project on my RaspberryPi 3B. There were initially a pile of compile errors, but then I saw that “npm install” needed to be run to download the node_modules - that’s all that it needed to compile with no errors. The rough command sequence I used were:

Follow the instructions for installing dotnet-sdk-2.2.401-linux-arm

export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
dotnet dev-certs https --trust

npm install
dotnet build HADotNet.CommandCenter.sln
dotnet publish -r linux-arm

./HADotNet.CommandCenter --urls http://*:8095

pi@raspberrypi:~/Downloads/HADotNet.CommandCenter-master/HADotNet.CommandCenter/bin/Debug/netcoreapp2.2/linux-arm/publish $ ./HADotNet.CommandCenter --urls http://*:8095
Hosting environment: Production
Content root path: /home/pi/Downloads/HADotNet.CommandCenter-master/HADotNet.CommandCenter/bin/Debug/netcoreapp2.2/linux-arm/publish
Now listening on: http://[::]:8095
Application started. Press Ctrl+C to shut down.

I skipped the specific folder paths above but hopefully that is enough for those willing to figure out their own compile. Nice project. Here’s my new dashboard:

Great - when will be a docker image for RPi? :wink:

Hi @qJake

So when I try to hit “save layout settings” I get an error (see below). I have managed to add 3 tiles.

When I hit “save layout” under tile layout, I can successfully save it but again I get nothing in my dashboard :frowning:

Also under the layout I dont see any tile(s), therefore I cannot arrange any tile.

Here is my dashboard:

This is my error:



System.Exception: Unexpected response code 502 from Home Assistant API endpoint /api/states/light.gateway_light_34ce00908ea4.


   at HADotNet.Core.BaseClient.Get[T](String path)


   at HADotNet.Core.Clients.StatesClient.GetState(String entityId)


   at HADotNet.CommandCenter.Hubs.TileHub.RequestTileState(String tileName) in /src/HADotNet.CommandCenter-0.3.2/HADotNet.CommandCenter/Hubs/TileHub.cs:line 49


   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteHubMethod(ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments)


   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.Invoke(HubMethodDescriptor descriptor, HubConnectionContext connection, HubMethodInvocationMessage hubMethodInvocationMessage, Boolean isStreamedInvocation)


fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]


      Failed to invoke hub method 'RequestTileState'.


System.Exception: Unexpected response code 502 from Home Assistant API endpoint /api/states/switch.bedroom_lights.


   at HADotNet.Core.BaseClient.Get[T](String path)


   at HADotNet.Core.Clients.StatesClient.GetState(String entityId)


   at HADotNet.CommandCenter.Hubs.TileHub.RequestTileState(String tileName) in /src/HADotNet.CommandCenter-0.3.2/HADotNet.CommandCenter/Hubs/TileHub.cs:line 49


   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteHubMethod(ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments)


   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.Invoke(HubMethodDescriptor descriptor, HubConnectionContext connection, HubMethodInvocationMessage hubMethodInvocationMessage, Boolean isStreamedInvocation)


fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]


      Failed to invoke hub method 'RequestTileState'.


System.Exception: Unexpected response code 502 from Home Assistant API endpoint /api/states/light.gateway_light_34ce00908ea4.


   at HADotNet.Core.BaseClient.Get[T](String path)


   at HADotNet.Core.Clients.StatesClient.GetState(String entityId)


   at HADotNet.CommandCenter.Hubs.TileHub.RequestTileState(String tileName) in /src/HADotNet.CommandCenter-0.3.2/HADotNet.CommandCenter/Hubs/TileHub.cs:line 49


   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteHubMethod(ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments)


   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.Invoke(HubMethodDescriptor descriptor, HubConnectionContext connection, HubMethodInvocationMessage hubMethodInvocationMessage, Boolean isStreamedInvocation)

so when I use this (but adjusted for my enviroment) it works, but when I enter the long lived token and base url in the app and hit save, it just refreshes the page, I assume its unable to write to the file for some reason ?

my path is /home/username/docker/hacc/app/config.json

is this because its in my user folder? other containers seem to be able to access their files in there but hacc doesnt seem to be happy

edit: yep seems im right:

HACC    | System.UnauthorizedAccessException: Access to the path '/app/config.json' is denied. ---> System.IO.IOException: Permission denied
Creating HACC ... done                                                                                                                                                                                                                                                                                       Attaching to HACC
HACC    | Hosting environment: Production
HACC    | Content root path: /app
HACC    | Now listening on: http://[::]:8095
HACC    | Application started. Press Ctrl+C to shut down.
HACC    | fail: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery[7]
HACC    |       An exception was thrown while deserializing the token.
HACC    | Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. ---> System.Security.Cryptography.CryptographicException: The key {e5670cf7-f592-4838-8a73-290e690fb3ef} was not found in the key ring.
HACC    |    at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)
HACC    |    at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked)
HACC    |    at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)
HACC    |    at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
HACC    |    --- End of inner exception stack trace ---
HACC    |    at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
HACC    |    at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)
HACC    | fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
HACC    |       An unhandled exception has occurred while executing the request.
HACC    | System.UnauthorizedAccessException: Access to the path '/app/config.json' is denied. ---> System.IO.IOException: Permission denied
HACC    |    --- End of inner exception stack trace ---
HACC    |    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
HACC    |    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
HACC    |    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
HACC    |    at System.IO.File.AsyncStreamWriter(String path, Encoding encoding, Boolean append)
HACC    |    at System.IO.File.WriteAllTextAsync(String path, String contents, Encoding encoding, CancellationToken cancellationToken)
HACC    |    at HADotNet.CommandCenter.Services.JsonConfigStore.SaveConfigAsync(ConfigRoot config) in /src/HADotNet.CommandCenter-0.4.1/HADotNet.CommandCenter/Services/JsonConfigStore.cs:line 91
HACC    |    at HADotNet.CommandCenter.Services.JsonConfigStore.ManipulateConfig(Action`1[] changes) in /src/HADotNet.CommandCenter-0.4.1/HADotNet.CommandCenter/Services/JsonConfigStore.cs:line 58
HACC    |    at HADotNet.CommandCenter.Controllers.AdminController.Settings(SystemSettings newSettings) in /src/HADotNet.CommandCenter-0.4.1/HADotNet.CommandCenter/Controllers/AdminController.cs:line 108
HACC    |    at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
HACC    |    at System.Threading.Tasks.ValueTask`1.get_Result()
HACC    |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
HACC    |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
HACC    |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
HACC    |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
HACC    |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
HACC    |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
HACC    |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
HACC    |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
HACC    |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
HACC    |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
HACC    |    at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
HACC    |    at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
HACC    |    at HADotNet.CommandCenter.Middleware.HAClientInitialization.InvokeAsync(HttpContext context) in /src/HADotNet.CommandCenter-0.4.1/HADotNet.CommandCenter/Middleware/HAClientInitialization.cs:line 48
HACC    |    at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
HACC    |    at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
HACC    | info: HADotNet.CommandCenter.Middleware.HAClientInitialization[0]
HACC    |       Client factory is not initialized, redirecting user to settings area...

@CountParadox Yep, that’s a Docker config issue, not sure why it can’t write to that directory.

@bachoo786 Enter in some values for the four layout settings (good starting points are: 960, 855, 100, and 6, from top to bottom) and press “Save Layout Settings”. You’ll see the tile layout UI appear on the right, and then press “Save Layout” which will make your tiles visible.

when I first ran the container, it created the folder with root:root owner:group. This will prevent you from being able to write the config. Make sure your’s is setup with the correct user:group for the directory and contents

1 Like

Did you create a blank config.json file in the mapped directory

there is one there, I didnt create it though

I think its something to do with this but I cant igure out what…