korapp / plasma-homeassistant

Add Home Assistant to your plasma desktop
GNU General Public License v3.0
54 stars 4 forks source link

Displaying only spinner, can't add entities #4

Closed WallK closed 10 months ago

WallK commented 10 months ago

I've inputted my HA address and API key, but when I try to add entities -- they are not getting saved (or the list is displayed empty) The widget itself is showing only a spinner

Here's couple of messages from journalctl

plasmashell[1250]: qml: Unsupported WebSocket scheme: file
plasmashell[1250]: qml: Messages can only be sent when the socket is open.

What could be causing this? Thank you

korapp commented 10 months ago

There is no such information there but does the URL include the protocol and port? E.g. http://homeassistant.lan:8123

WallK commented 10 months ago

No I tried local domain name and ip address Also tried with http and port just to be sure

korapp commented 10 months ago

Could you provide a screenshot of the configuration and (if you have curl installed) the result of curl -fsS YOUR_HA_ADDRESS/api/ -H "Content-Typeplication/json" ?

WallK commented 10 months ago

$ curl -fsS homeassistant.local/api/ -H "Content-Typeplication/json" curl: (7) Failed to connect to homeassistant.local port 80: Connection refused

$ curl -fsS homeassistant.local:8123/api/ -H "Content-Typeplication/json" curl: (22) The requested URL returned error: 401 Unauthorized

korapp commented 10 months ago

Ok. Just to clarify, did you try http://homeassistant.local:8123 in URL field? If so, is there any error? The message Unsupported WebSocket scheme: file suggests missing http:// part, so it should not occur in this case.

WallK commented 10 months ago

I did, but with ip, not domain Widget with domain in it was still without protocol and maybe I've confused where errors came from It works now! Thank you for going through debugging steps with me Maybe you should specify protocol and port requirements more prominent in the instructions?