I tried to refresh a sensor from an external call via Rest, I got this error.
500 Internal Server Error
Server got itself in trouble
I snipped the token to shorten it for this post.
I shorten for testing the json also, but I do want to use a more complex one.
It doesn’t matter if I do it from localhost or IP from external, the log didn’t tells interesting things.
I tried also Port 8123 and 8132.
I use Home Assistant in docker.
I removed -x POST
because i read that is implicit in -d
.
curl -v -H "Authorization: Bearer ey[...]qs" -H "Content-Type: application/json" -d '{"state":"10"}' "http://localhost:8123/api/states/adapter1_raw"
Console Output:
* Trying 127.0.0.1:8123...
* Connected to localhost (127.0.0.1) port 8123 (#0)
> POST /api/states/adapter1_raw HTTP/1.1
> Host: localhost:8123
> User-Agent: curl/7.83.1
> Accept: */*
> Authorization: Bearer ey[...]qs
> Content-Type: application/json
> Content-Length: 14
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain; charset=utf-8
< Content-Length: 55
< Date: Thu, 23 Feb 2023 09:43:33 GMT
< Server: Python/3.10 aiohttp/3.8.1
< Connection: close
<
500 Internal Server Error
* Closing connection 0
Server got itself in trouble
Thanks.