jimmyeao / TEAMS2HA

23 stars 1 forks source link

Unable to "Pair with Teams" #21

Closed cvanover7 closed 6 months ago

cvanover7 commented 6 months ago

"Pair with Teams" provides no pairing request in Teams. Teams status remains "Disconnected" and MQTT Status is "Connected". Note: This machine is locked down with no admin rights.

Teams2HA version: 1.1.0.242 Teams version 23335.232.2637.4844. The client version is 49/23113028724.

This section of the logs just repeats: 2024-01-25 11:47:18.509 -06:00 [DBG] Attempting reconnection, try 1 of 5 2024-01-25 11:47:22.595 -06:00 [ERR] ConnectAsync: Error connecting to WebSocket System.Net.WebSockets.WebSocketException (0x80004005): Unable to connect to the remote server ---> System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (localhost:8124) ---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it. at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.WebSockets.WebSocketHandle.ConnectAsync(Uri uri, HttpMessageInvoker invoker, CancellationToken cancellationToken, ClientWebSocketOptions options) at System.Net.WebSockets.WebSocketHandle.ConnectAsync(Uri uri, HttpMessageInvoker invoker, CancellationToken cancellationToken, ClientWebSocketOptions options) at System.Net.WebSockets.ClientWebSocket.ConnectAsyncCore(Uri uri, HttpMessageInvoker invoker, CancellationToken cancellationToken) at TEAMS2HA.API.WebSocketClient.ConnectAsync(Uri uri) in C:\Users\jimmy\source\repos\TEAMS2HA\API\Teams.cs:line 125 2024-01-25 11:47:22.597 -06:00 [DBG] Attempting reconnection, try 1 of 5

cvanover7 commented 6 months ago

Fixed. You have to go "Enable API" in teams in order for this to work.

jimmyeao commented 6 months ago

Glad you got it sorted, and thanks for the sponsorship, it’s really appreciated :)

cvanover7 commented 6 months ago

You’re welcome. I’ve been searching how and low for this and found about 1/2 dozen others that had similar functionality but always ran into one issue or another but got yours running with almost no effort. (I had the ‘manage API’ issue because it was a new laptop and I hadn’t enable it yet).

One feature to consider (if possible) would be a standalone EXE that would not require an installation or special privileges, just run it from a temp or home directory. An IT Admin installed this one for me (as a favor) but I think auto updates will fail due to privledges.

Thanks again.

On Thu, Jan 25, 2024 at 5:46 PM Jimmy White @.***> wrote:

Glad you got it sorted, and thanks for the sponsorship, it’s really appreciated :)

— Reply to this email directly, view it on GitHub https://github.com/jimmyeao/TEAMS2HA/issues/21#issuecomment-1911178297, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQBVMPRFC6Q4JJ2M7BNDSDYQLVDRAVCNFSM6AAAAABCK6DA6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJRGE3TQMRZG4 . You are receiving this because you modified the open/close state.Message ID: @.***>