Status is always unknown
Opened this issue · 4 comments
bluckau commented
bluckau commented
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
- CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
ImaBadCoder commented
Check your Home Assistant URL in the Settings.ps1 file. Can you access that URL outside of the script?
OCNice commented
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`
- CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
umutcelebi commented
Same issue here.
Anyone managed to fix this?