MSR Not Recognizing Old HASS on New VM
-
Try adding
ignore_cert: true
in theconfig
section for HassController (aftersource
and same indent level). You may additionally need to change thews://
in the source towss://
. If that works, SSL/TLS is enabled in Hass and you are on a self-signed or invalid certificate (but no changes to Hass needed).Also, if your Hass
http
component configuration hasssl_certificate
then SSL/TLS is enabled. That's another way to tell.@toggledbits tried setting
ignore_cert: true
and this is what came up in the logs tried bothws://
andwss//
. I do not have thehttp
component in my HA config file[latest-22258]2022-09-21T02:52:29.492Z <HassController:NOTICE> HassController#hass connecting to ws://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:52:29.493Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [TypeError]TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:" [latest-22258]2022-09-21T02:53:29.501Z <HassController:NOTICE> HassController#hass connecting to ws://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:53:29.502Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [TypeError]TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:" [latest-22258]2022-09-21T02:54:29.507Z <HassController:NOTICE> HassController#hass connecting to ws://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:54:29.509Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [TypeError]TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:" [latest-22258]2022-09-21T02:55:29.519Z <HassController:NOTICE> HassController#hass connecting to ws://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:55:29.519Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [TypeError]TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:" [latest-22258]2022-09-21T02:56:21.052Z <VeraController:INFO> VeraController#vera 0 dead entities older than 86400000s purged [latest-22258]2022-09-21T02:56:29.528Z <HassController:NOTICE> HassController#hass connecting to ws://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:56:29.529Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [TypeError]TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:" [latest-22258]2022-09-21T02:57:29.530Z <HassController:NOTICE> HassController#hass connecting to ws://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:57:29.531Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [TypeError]TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:" [latest-22258]2022-09-21T02:58:20.106Z <Rule:INFO> "10 Min Light Polling" (Rule#rule-grpqldnna5) starting evaluation; because timer-trigger Timer#rule-grpqldnna5 [latest-22258]2022-09-21T02:58:20.107Z <Rule:INFO> "10 Min Light Polling" (Rule#rule-grpqldnna5) evaluated; rule state transition from RESET to SET! [latest-22258]2022-09-21T02:58:20.124Z <Rule:INFO> "45 Min Light Polling" (Rule#rule-l6whyfqd) starting evaluation; because data-changed Data#states:cs-rule-grpqldnna5 [latest-22258]2022-09-21T02:58:20.124Z <Rule:INFO> "10 Min Light Polling" (Rule#rule-grpqldnna5) evaluation complete [latest-22258]2022-09-21T02:58:20.125Z <Rule:INFO> "45 Min Light Polling" (Rule#rule-l6whyfqd) evaluated; trigger state unchanged (false); rule state remains RESET [latest-22258]2022-09-21T02:58:20.126Z <Rule:INFO> "45 Min Light Polling" (Rule#rule-l6whyfqd) evaluation complete [latest-22258]2022-09-21T02:58:20.126Z <Engine:INFO> Enqueueing ""10 Min Light Polling<SET>"" (rule-grpqldnna5:S) [latest-22258]2022-09-21T02:58:20.139Z <Engine:NOTICE> Starting reaction "10 Min Light Polling<SET>" (rule-grpqldnna5:S) [latest-22258]2022-09-21T02:58:20.140Z <HassController:null> HassController#hass: sending payload for x_hass_system.call_service on System#hass>system action: [Object]{ "type": "call_service", "service_data": { "entity_id": "light.island_lights" }, "domain": "zwave_js", "service": "refresh_value" } [latest-22258]2022-09-21T02:58:20.141Z <HassController:ERR> HassController#hass request 1663729100140<2022-09-20, 7:58:20 p.m.> (call_service) failed: [Error]Error: WebSocket not connected [latest-22258]2022-09-21T02:58:20.143Z <Engine:INFO> Resuming reaction "10 Min Light Polling<SET>" (rule-grpqldnna5:S) from step 1"
Not sure if this is useful but here are some logs pertaining to web socket from HA Supervisor
22-09-20 19:39:48 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token 22-09-20 19:58:33 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize 22-09-20 19:58:33 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_vscode 22-09-20 19:58:33 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running 22-09-20 19:58:38 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
-
The log snippet shows the
ws://
result but nowss://
result. I'd like to see that, because it's probably a different message and maybe more useful. The messages you are showing clearly indicate it wants you to usewss://
. -
The log snippet shows the
ws://
result but nowss://
result. I'd like to see that, because it's probably a different message and maybe more useful. The messages you are showing clearly indicate it wants you to usewss://
.@toggledbits logs attached using
wss://
[latest-22258]2022-09-21T02:38:34.723Z <HassController:WARN> HassController#hass websocket error during open/negotation: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:38:34.723Z <HassController:NOTICE> HassController#hass websocket to wss://192.168.8.113:8123/api/websocket closed during open/negotiation [latest-22258]2022-09-21T02:38:34.723Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:38:39.737Z <HassController:NOTICE> HassController#hass connecting to wss://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:38:54.745Z <HassController:WARN> HassController#hass websocket error during open/negotation: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:38:54.745Z <HassController:NOTICE> HassController#hass websocket to wss://192.168.8.113:8123/api/websocket closed during open/negotiation [latest-22258]2022-09-21T02:38:54.746Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:38:59.748Z <HassController:NOTICE> HassController#hass connecting to wss://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:39:14.751Z <HassController:WARN> HassController#hass websocket error during open/negotation: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:39:14.752Z <HassController:NOTICE> HassController#hass websocket to wss://192.168.8.113:8123/api/websocket closed during open/negotiation [latest-22258]2022-09-21T02:39:14.752Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:39:19.759Z <HassController:NOTICE> HassController#hass connecting to wss://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:39:28.763Z <VeraController:INFO> VeraController#vera 0 dead entities older than 86400000s purged [latest-22258]2022-09-21T02:39:34.765Z <HassController:WARN> HassController#hass websocket error during open/negotation: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:39:34.765Z <HassController:NOTICE> HassController#hass websocket to wss://192.168.8.113:8123/api/websocket closed during open/negotiation [latest-22258]2022-09-21T02:39:34.765Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:39:39.771Z <HassController:NOTICE> HassController#hass connecting to wss://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:39:54.776Z <HassController:WARN> HassController#hass websocket error during open/negotation: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:39:54.777Z <HassController:NOTICE> HassController#hass websocket to wss://192.168.8.113:8123/api/websocket closed during open/negotiation [latest-22258]2022-09-21T02:39:54.777Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:40:04.779Z <HassController:NOTICE> HassController#hass connecting to wss://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:40:19.786Z <HassController:WARN> HassController#hass websocket error during open/negotation: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:40:19.787Z <HassController:NOTICE> HassController#hass websocket to wss://192.168.8.113:8123/api/websocket closed during open/negotiation [latest-22258]2022-09-21T02:40:19.788Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:40:34.791Z <HassController:NOTICE> HassController#hass connecting to wss://192.168.8.113:8123/api/websocket [latest-22258]2022-09-21T02:40:49.796Z <HassController:WARN> HassController#hass websocket error during open/negotation: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:40:49.797Z <HassController:NOTICE> HassController#hass websocket to wss://192.168.8.113:8123/api/websocket closed during open/negotiation [latest-22258]2022-09-21T02:40:49.798Z <HassController:WARN> HassController#hass failed to connect/initialize communication: [Error]Error: Opening handshake has timed out [latest-22258]2022-09-21T02:41:00.728Z <Rule:INFO> Inside Light Polling (Rule#rule-grpqlebtkk) starting evaluation; because timer-trigger Timer#rule-grpqlebtkk
-
And that's also with
ignore_cert: true
, correct? -
And that's also with
ignore_cert: true
, correct?@toggledbits correct
-
OK. All I can suggest at this point is that maybe you have the old IP address of the previous system in Hass' configuration somewhere and it's messing things up. Beyond that, I'm out of ideas. Maybe shut down that VM, create a new one, install Hass fresh and clean without restoring the prior configuration, just use a default configuration, and see if you can connect to it. If you can, it's definitely something in the old config/restored install. If you can't, maybe something in the VM configuration... I don't know. This usually isn't much of a challenge, and HassController isn't doing anything tricky, it uses a standard Websocket library in wide use for its connections, so I'm doubtful there's suddenly some bug or incompatibility there.
-
OK. All I can suggest at this point is that maybe you have the old IP address of the previous system in Hass' configuration somewhere and it's messing things up. Beyond that, I'm out of ideas. Maybe shut down that VM, create a new one, install Hass fresh and clean without restoring the prior configuration, just use a default configuration, and see if you can connect to it. If you can, it's definitely something in the old config/restored install. If you can't, maybe something in the VM configuration... I don't know. This usually isn't much of a challenge, and HassController isn't doing anything tricky, it uses a standard Websocket library in wide use for its connections, so I'm doubtful there's suddenly some bug or incompatibility there.
@toggledbits Will try creating a new Hass install and see if I can get MSR to work. In terms of the existing config, none of the entities will get auto deleted since the controller is offline right? Also if I clear out he Hass config completely from MSR, restart MSR then reconfigure as if its the first time entering a Hass config in will this overwrite all my existing Hass entities?
-
Just use a different ID for the new HassController instance... so if you had
id: hass
in the first config, usehass2
in the second.It probably won't matter anyway, as the IDs should be stable... the new entities would have the same IDs as the old, be of the same type, etc.
-
Just use a different ID for the new HassController instance... so if you had
id: hass
in the first config, usehass2
in the second.It probably won't matter anyway, as the IDs should be stable... the new entities would have the same IDs as the old, be of the same type, etc.
@toggledbits Just quickly set up a new Hass VM and am seeing the same errors. Tried with both
ignore_cert: true
andfalse
no luck. This seems to be a VMware issue, I did do look through settings but couldn't really see anything that would stop MSR from connecting. -
To be specific, you need to try
ws://
(ignore_cert
does not matter for this case), andwss://
withignore_cert: true
. Both cases.Beyond that, I'm at a loss. Are you running Hass in docker? Are you running Reactor in docker? I'd look at all of that, too...
-
To be specific, you need to try
ws://
(ignore_cert
does not matter for this case), andwss://
withignore_cert: true
. Both cases.Beyond that, I'm at a loss. Are you running Hass in docker? Are you running Reactor in docker? I'd look at all of that, too...
@toggledbits Neither are running in docker, both run on their own VM on the same host. Just the difference now is Reactor is running on a VirutalBox VM and MSR is on a VMware VM
-
@toggledbits Neither are running in docker, both run on their own VM on the same host. Just the difference now is Reactor is running on a VirutalBox VM and MSR is on a VMware VM
@pabla said in MSR Not Recognizing Old HASS on New VM:
Just the difference now is Reactor is running on a VirutalBox VM and MSR is on a VMware VM
Huh?
-
@pabla said in MSR Not Recognizing Old HASS on New VM:
Just the difference now is Reactor is running on a VirutalBox VM and MSR is on a VMware VM
Huh?
-
T toggledbits locked this topic on