I'm trying to remotely change a state in ha by sending a post request. This works fine when using my local ha instance but doesn't when I try to connect remotely.
I'm using this command:
C:\Users\User>curl -X POST "http://xxxxxxxxx.ui.nabu.casa:8123/api/states/input_select.tomi_home" -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "Content-Type: application/json" -d "{"state": "AWAY"}"
I get this error:
curl: (28) Failed to connect to xxxxxxxxx.ui.nabu.casa port 8123 after 21046 ms: Couldn't connect to server