HACP - WebSocket Connection Closed - Reconnecting

Hi All,

I’ve installed the incredible Home Assistant Control Panel - http://reformedreality.com/home-assistant-control-panel - however I am struggling to get a response out of the web-socket when a button is pressed to trigger an action via the API - I have spoken to Lee, who is the Dev of HACP - and unfortunately it looks like the websocket on my HASS install is not sending back a response. Looking at the debug logs - I am just seeing ‘WebSocket Connection Closed - Reconnecting’

I know the API is working as expected - as when I press a tile - the relative action is performed, however, I am not getting any feedback to show the current status of the device (on/off etc)

Setup is Ubuntu 18.04, Python Container

Any ideas?


Did you ever get this to work? This dashboard looks so promising but just can’t get it to work

I didn’t unfortunately - gutted, as like you I love the layout!

i am getting this error in home assistant log for websocket_api and same thing i dont get feedback as well. any help?

Auth message incorrectly formatted: extra keys not allowed @ data[‘event_type’]. Got ‘state_changed’
extra keys not allowed @ data[‘id’]. Got 1
not a valid value for dictionary value @ data[‘type’]. Got ‘subscribe_events’

Old thread but sadly still relevant today.

It’s due to the lack of authentification when the websocket is open.
Just edit the open listener in hass.html :

ws.addEventListener(‘open’, function (event) {
// Auth
ws.send(’{“type”: “auth”, “api_password”: “’ + $scope.settings.server_api_password + '”}’);
ws.send(’{“id”: 1, “type”: “subscribe_events”, “event_type”: “state_changed”}\n’);

And normally you should have access to the Haas events.

Unfortunately, the HTTPS certificate on https://reformedreality.com is currently out-of-date, and generate lots of errors (background images can’t be loaded, etc.).
But this is a problem that should be discuss with the project owner… :confused:

Hi Mysteriosis,

Thanks for coming back to this thread, I would love to get this component working - I’ve tried making your changes to the hass.html - but I’m still getting the same issue where the icon’s don’t update when you press them. Can I just clarify, line 3 above - where you put “api_password” are you expecting the password in clear text here, or are you just passing through an earlier variable?