EBOOZ/TeamsStatus

Status is always unknown

Opened this issue · 4 comments

Hi, very excited about this method of updating Teams status. However, the status is always showing as unknown. Is there a log I can look at or another way to tell what it is doing?

Does this work with NabuCasa?
chrome_Aa0YY7amrh

I rebooted and now the status is always offline. I noticed this if I run the powershell myself, every time the status changes:

Invoke-RestMethod : 404: Not Found
At C:\scripts\Get-TeamsStatus.ps1:164 char:5

  • Invoke-RestMethod -Uri "$HAUrl/api/states/$entityStatus" -Method  ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
      eption
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Check your Home Assistant URL in the Settings.ps1 file. Can you access that URL outside of the script?

Similar issue here, but I get a 401 error..
`Invoke-RestMethod : 401: Unauthorized
At C:\Scripts\TeamsStatus-main\Get-TeamsStatus.ps1:164 char:5

  • Invoke-RestMethod -Uri "$HAUrl/api/states/$entityStatus" -Method  ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
      eption
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand`

Same issue here.

Anyone managed to fix this?