dale3h / python-lovelace

Lovelace UI module and migration tool for Python
MIT License
30 stars 6 forks source link

Support new auth system #6

Open jmtatsch opened 6 years ago

jmtatsch commented 6 years ago

I am unable to get anything more than 404: Not Found from https://homeserver:8123/api with HA 0.77.3, even with legacy auth enabled.

Any hints on how to proceed with HA versions where the new auth system is enabled?

hawkeye217 commented 5 years ago

Same issue here on 0.77.3.

hawkeye217 commented 5 years ago

The curl/stdin method seemed to work fine for me at this point, though.

marklagendijk commented 5 years ago

This worked for me: curl -sSL -X GET -H "Authorization: Bearer LONG_LIVED_TOKEN" -H "content-type: application/json" http://MY_HA_IP:8123/api/states | python3 lovelace_migrate.py -

Note: you can generate your long lived token on the profile page: http://MY_HA_IP:8123/profile

Konstigt commented 5 years ago

Thanks @marklagendijk !

This worked for me, same as above except for HTTPS :)

curl -sSL -X GET -H "Authorization: Bearer <my long lived token created from https:///MY_HA_IP:18123/profile>“ -H "content-type: application/json" https:///MY_HA_IP:18123/api/states | python3 lovelace_migrate.py -