jerrod-lankford / HAGearS3

Home Assistant user interface for the Samsung Gear S3/S2 (tizen os)
138 stars 45 forks source link

Authentication Issue #13

Open ambarusa opened 5 years ago

ambarusa commented 5 years ago

Hi, I just downloaded the app on my Galaxy Watch, but after typing the URL of my HA, I get a 401 - Unauthorized error message. Isn't it supposed to require some user credentials? Thanks for your help

thangtqviettelpost commented 5 years ago

Me too

SweVictor commented 4 years ago

Me too - after adding a correct token (tested towards the HA api) I get 401 still.


Original issue below, separate issue

Hmm... I get 404 when pressing "send" no matter what I input.

Inspector says Request URL: https://www.hassgalaxy.app/[6 letter code from watch] Request Method: POST Status Code: 404 Not Found

GET for the same page works (obviously)

SweVictor commented 4 years ago

Alright - so, after a small epiphany and reading a lot in different threads: Turn off bluetoot, use Wifi suddenly no more 401 unauthorized for me!

Regarding my other issue (hassgalaxy.app): From other forum threads: Be quicker! You have less than 10 seconds (my estimate) from going to the hassgalaxy.app/code page to hit Send. If you're too slow the websocket is down. To try again: Kill the app on the watch and start again. You will ge a new code and can try again.

irq00 commented 4 years ago

Hi there.

First of all. Thanks so much, Jerrod, for your awesome work.

I've been researching for a solution about my issue with no result.

I follow the steps to connect my Galaxy Watch to my HA (Long life token, hassgalaxy.app, etc). The watch reaches my HA because there's a record in my HA log each time I try to connect:

"2020-06-19 22:15:35 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from... [Public IP]"

In the watch, the message: "An error has occured. Statud code: 401 Message: Unauthorized"

Have anyone idea about how to solve it? Thanks in advance

lordgabriel commented 4 years ago

I also have the same issue described by irq00

Snow4DV commented 4 years ago

Also having the same issue. On the server last hass.io is used.

samhed commented 4 years ago

I'm having the exact same issue as @irq00

michielscj commented 4 years ago

I have also had this issue, for me the solution was quite simple. When I created the longlife token, I selected the token from left to right to copy the token. But I did not select the whole token, I missed the first letters/numbers. Try, before you copy and paste, to place the cursor in the token and press left to check if the cursor is really at the begin of the token. Then select from left to right to copy and paste! That solved it for me. Hopefully it will work for you!

samhed commented 4 years ago

Huh, you're right! The token is displayed in the textbox in a way such that no characters appear clipped. When making sure the entire token is copied, everything works!

Thank you @michielscj

praun commented 4 years ago

Huh, you're right! The token is displayed in the textbox in a way such that no characters appear clipped. When making sure the entire token is copied, everything works!

Thank you @michielscj

And you guys had the "401 unauthorized" error?

samhed commented 4 years ago

@praun I did - yes

arkmodder commented 3 years ago

Is there an easy way of getting the 184 character token into the watch?

NM - Found the Web App.

joaomarioss commented 3 years ago

Huh, you're right! The token is displayed in the textbox in a way such that no characters appear clipped. When making sure the entire token is copied, everything works! Thank you @michielscj

And you guys had the "401 unauthorized" error?

me to... Using galaxy watch 3

haozgit commented 3 years ago

Is there an easy way of getting the 184 character token into the watch?

NM - Found the Web App.

Follow the steps below:

  1. Upon first run of your UI HomeAssistant app in your watch, it should prompts you with a message with url in the format of --> https://www.hassgalaxy.app/[random_value].
  2. Copy and navigate to the URL. If everything work well, you should see a form requesting for your HA url and token. Simply provide both and hit submit.
  3. If step 2 is successful, your app in watch should be automatically triggered. You should see the string token has already been filled up. Make sure the HA url is correct and hit Save.
  4. Done. Enjoy.
jackdrake commented 3 years ago

I'm also struggling a little bit. Using the URL works fine, I can enter both HA URL and Token. Unfortunately, after pressing send a "not found" message appears. I have my watch connected via Bluetooth to my phone. The phone via LTE, not WLAN as my DSL connection is using a DSLite tunnel which makes it impossible to get connections from the internet to my local network. Due to this, connecting the watch to the WLAN is also no option. EDIT: one more test, switch off bluetooth and use hotspot and wlan as connection, unfortunately same error.

Edit 2nd: at least it worked connecting the watch via wifi to my phone working as hotspot and entering Server+Token using my PC's Firefox. Strange, but nice.

spyrpapa6 commented 3 years ago

Good afternoon!! Its working for me, I turned on the wifi of the watch and the bluetooth and I installed the hasio gear. The url appeared and I was placing my address and long life token from mobile...wroong! It has issues with the characters I think from the mobile. I open the chrome browser in my laptop and I placed quickly the url https....from nabu casa and the token and it took it correctly. I tryed everything from my mobile but failed....it needs pc for placing the address correctly and the token...fast moves because socket is closing fast and doesnt allow you to find the watch....you can create token in the hasio app to the user tab down the screen...click and again down to the screen...create long life tokens. Take the link from the remote control and use a text editor. I used notepad. I hope helping you!! It took me two days!! 😅

sbur83 commented 3 years ago

Hi, Does this work on a galaxy watch? It's not s2, s3 or active; just says galaxy on the box.

haozgit commented 3 years ago

Hi, Does this work on a galaxy watch? It's not s2, s3 or active; just says galaxy on the box.

yes. it works on galaxy watch.

sbur83 commented 3 years ago

Nice, I'm having problems connecting. I can get to the web page and my token is working but I can't figure out what address I need. I have nabucasa and tried copying the link in with no luck and tried the host IP too. Not sure if I'm getting the Nabucasa link right tho, can you point me to where I find it please?

haozgit commented 3 years ago

not sure how it works on nabucasa since im not using it. Take note on the following:

  1. If you're connecting your watch directly to the wifi, make sure your wifi is on the same local network as the one your home assistant is connecting to.
  2. If you're tethering internet connection via bluetooth to your galaxy watch, then make sure your phone is connecting (wifi) to the same local network as the one your HA is connecting to.
  3. Lastly, make sure the address provided is correct. It should be in this format http://[your local ip address]:8123
sbur83 commented 3 years ago

Cheers mate, I seen the other threads and tried the solutions with no luck. I'll try again :)

ledyr-sthlm commented 2 years ago

Where do i find the token?

mihaichrapan commented 1 year ago

Its working for me! First I installed G-KEYBOARD PRO on my watch and phone, after that I sent the token created by HA on whatsapp and from the phone I sent the HA Url and Token to the watch.