Wink errors/reconfiguration

Receiving the following problem from the wink component:

pywink.api.WinkAPIException: 401 Response from Wink API. Maybe Bearer token is expired?

When I try to change to developer authentication, none of the functions for updating beeper state/alarm mode/etc work from within automations.

alias: Front Door Lock Beeper State Disable
trigger:
   platform: state
   entity_id: input_boolean.front_door_lock_beeper_state
   to: 'off'
   from: 'on'
condition:
   condition: template
   value_template: "{{ not is_state('sensor.front_door_lock_beeper_state', 'False') }}"
 action:
   - service: wink.wink_set_lock_beeper_state
     data_template:
       entity_id: lock.front_door
       enabled: False
   - service: wink.refresh_state_from_wink

Is there something that needs to change for these to work?

Thanks,

Chris

I just noticed that Wink isn’t working at all for me right now. When I restarted HASS that is the error I received. The Wink app on my phone appears to be working, but I haven’t tried to re-authenticate to it. Are you able to use any of your Wink devices?

If I comment out the email and password fields and use developer auth, I’m able to use the lock and my motion sensor appears to work.

However, none of the custom functions seem to work.

See my comment over here Wink email/password broken?

@DarthSebulba04 not sure why your beep automation wouldn’t work… The form of authentication doesn’t change the method being called.

I kinda suspected that, too. That’s why I changed the auth method.

I’m a little confused about why these automations don’t appear to be working. Even running the functions manually doesn’t update the online state or the lock.

Ideas?

Can you turn on debug logging then issue the command (manually is fine) then PM me the logs? There could be sensitive info that’s why I suggest the PM.

I don’t have time tonight to continue testing, but I just tried the beeper mode and it works to enable, set it to true, but doesn’t work to disable, set it to false… So idk what that’s about, but if you can confirm the same behavior that would be cool.

I’ll figure out what’s going on tomorrow.

I’m seeing the same issue here. Just started today. About the same time as I got the Wink app update on my phone…

1 Like

Exactly the same issue for me too. Was working fine, no HASS changes, then this alongside a Wink app update.

That does appear to be the case. I was able to manually enable, but not disable, the beeper.

It also appears the states don’t update when changed from the wink app. When I turned the beeper off, I don’t see a change of the lock attributes.

So nothing in the code stands out… Do you have local_control: True in your config? I am wondering if these attributes can’t be set locally? If you have local_control enabled try disabling it and see if that fixes the problem. If it does, I need to make a change to python-wink (The library Home Assistants uses for Wink support).

I am not seeing the updating issue you are talking about though. Any change I make in the app shows up in HA.

So, the other issue with username/password for all the other people in this thread, I am going to get an update for HA together that removes this as a form of authentication. developer.wink.com auth will be the only valid way from now on.

I do have the setting for local control set. I will try to disable later today and see if it helps.

Thanks!

OK, in preparation for the change to using only the developer.wink.com authentication, I started down that path. I got as far as the New API request screen, and then got stuck. I apologize if this is obvious to everyone else, but it’s not clear to me how to fill out the New API request. What are appropriate entries for website and redirect-url? And is there some kind of infrastructure required there? Any guidance would be appreciated. Thanks!

I’m having the same problem. It appears the API is not responding.
In troubleshooting I noticed that
https://winkbearertoken.appspot.com/
no longer works.
Local control setting made no difference.

redirect URI should be something like this

http://192.168.1.5:8123/auth/wink/callback

Where the IP is the local IP address of your HA box.

I don’t think the website matters at all. I have it set to the external address of my HA box.

No special infrastructure required.

The local_control setting has nothing to do with the 401 error reported by https://winkbearertoken.appspot.com/

You will no longer be able to authenticate with that method. Check out the docs here https://home-assistant.io/components/wink/ on how to setup developer.wink.com authentication.

Thanks a bunch! I think maybe the Wink component docs could stand to be updated with that information. After I’m successful with getting the account and authenticating, I’ll look into how I can contribute to making an update to the documentation.

Sounds good. I may beat you to it, I need to remove the username/password stuff anyway.

The process of getting a Wink account and authenticating could use a better description.

1 Like

Good news is I applied for my developer account last night and already received my credentials this morning. So everything is back up and running.

FYI as @w1ll1am23 said earlier, for website it appears you can use anything, I just put my email address.

1 Like