HA stops reporting Wink state changes

Is there a delay in when the new Wink setup process is complete?

I went through the configurator log in and received the notification everything is setup message but the configurator is still showing and any device I have in Wink are not displaying.

Nope you should be good to go, but you can try to reboot HA and see what happens. I believe the successful page might even say it is a good idea to reboot after the first setup.

If that still doesnā€™t work, it sounds like the .wink.conf in your config directory didnā€™t get written for some reason. Can you check its contents look valid? Should have the client_id and client_secret from your developer.wink.com setup and a refresh and access token.

Since I started the process incorrectly, I deleted the .wink.conf and restarted the system and went through the setup process again. Up and running now.

1 Like

I know this post has become a catch all for wink. Is anyone using namespaces with wink?

I dont think its in the code.

Worked for me, just tried to set it up. It canā€™t be set under wink: it has to be set under each device type. So for example your config would be something like this.

wink:

light:
  - platform: wink
    entity_namespace: holiday_home

switch:
  - platform: wink
    entity_namespace: holiday_home

that was the key i was missing thanks !

I have been encountering this problem for a few days. Previously on Hassio 0.53.1 and now the same behavior on Hassio 0.55.0 Motion sensor states are properly reported on the Wink app but are not reported Hassio (at least most of the state changes are not)ā€¦

I believe this is a wink problem. Yesterday they reported an issue with their core api and claim yo have fixed it. However, I am still having issue with HA and the wink app. The wink app and ha see state changes just not reliably. The wink app does seem somewhat better, but I think that is because they poll their state as well as use pubnub for push updates.

This is being discussed over here Wink push updates

Iā€™m stilling having the issue with my Wink 2nd Gen Hub and itā€™s getting really tiring. I think itā€™s time to make switch to SmartThings.

They have had several outages in the last couple weeks. I would agree it is getting old. Hopefully they are making improvements and thatā€™s what us causing the outages.

This probably isnā€™t the place to ask this, but I know a lot of Wink users are on this thread.

Do any of you own a Wink relay and would you like to test out a new feature for me? I donā€™t have the work done yet but thought I would get this out there now. If so shoot me a PM.

1 Like

Has anyone else had any issue with your wink developer account/application disappearing? Had a power outage last night, and after multiple restarts of HA, I am seeing ā€œInvalid Configā€ for Wink in my console. I went over to developer.wink.com, and my developer application is missing, which could explain why Iā€™m getting the Invalid Config.

Looks like my oath Client ID and Client Secret have expired (didnā€™t realize that would happen). I deleted the .wink.conf file and have re-entered the new ID and secret. But it appears Iā€™ll have to wait until I get home to finish the authorization and complete the process.

Hopefully this https://github.com/home-assistant/home-assistant/pull/11833 will prevent this from happening in the future. If anyone sees this after the next HA release let me know so we can investigate further.

2 Likes

Hi, I know this is an old thread but I seem to be having this issue (HA 0.75.1). I just setup an iHome Smart Plug thing using Wink and I can turn it off but the state still shows up as ā€œOnā€. This thread is the most recent discussion of this problem that I can find. If anyone would like to direct me how to find some logging about this, Iā€™d be more than happy to.

Put this https://hastebin.com/adosokukow.py inside HA_CONFIG_DIR/custom_component/switch/wink.py and restart.

The iHome plugs integration with Winkā€™s API doesnā€™t work well. It is an issue on Winkā€™s side. The above file will make an API call to refresh the state. All other Wink devices update via a push but that doesnā€™t work very well for these plugs the the above file overrides that behavior and pulls the state.

Hmmā€¦ same behavior. I enabled ā€œInfoā€ level logging for homeassistant.components.wink and pywink. My logs show ā€œSetting state via online APIā€ every time I click the toggle switch in HA. Is there something else I need to do in order to enable the custom component?

Edit: changed folder ā€œcustom_componentā€ to ā€œcustom_componentsā€ and now I see ā€œGetting state via online APIā€ in the logs, but the behavior is still the same.

Can you confirm that it is using the custom component? You should see something in the logs towards the beginning that says something like using custom component.

Yeah I see that message, and I also see that itā€™s both ā€œSettingā€¦ā€ and ā€œGetting state via online APIā€ when I click the slider.

Iā€™ve changed the log setting to Debug. Here are the debug logs after ā€œSettingā€¦ā€

2018-08-05 09:59:41 INFO (SyncWorker_6) [pywink.api] Setting state via online API
2018-08-05 09:59:42 DEBUG (SyncWorker_6) [pywink.api] {'data': {'object_type': '
binary_switch', 'object_id': '805077', 'uuid': '68b63aab-92d4-4bdf-9019-863bee02
70a9', 'created_at': 1533441782, 'updated_at': 1533442414, 'icon_id': '258',
'icon_code': 'binary_switch-ihome_smartplug', 'desired_state': {'powered': False}, 
'last_reading': {'connection': True, 'connection_updated_at': 1533441782.9732275
, 'powered': True, 'powered_updated_at': 1533441782.9732275, 'desired_powered': 
False, 'desired_powered_updated_at': 1533484782.0335011, 'connection_changed_at':
1533441782.7954407, 'powered_changed_at': 1533441782.9732275, 'desired_powered
_changed_at': 1533484782.0335011}, 'subscription': {'pubnub': {'subscribe_key': 
'sub-c-f7bf7f7e-0542-11e3-a5e8-02ee2ddab7fe', 'channel': '54ba64bfc32b44ce6c5673
b43a03831b9a5e4e68|binary_switch-805077|user-910251'}}, 'binary_switch_id': '805
077', 'name': 'Back Porch Lights', 'locale': 'en_us', 'units': {}, 'hidden_at': 
None, 'capabilities': {'fields': [{'type': 'boolean', 'field': 'connection',
'mutability': 'read-only'}, {'type': 'boolean', 'field': 'powered', 'mutability': 
'read-write'}]}, 'triggers': [], 'manufacturer_device_model': 'ihome_i_sp100',
'manufacturer_device_id': 'UpgggxA8GDQeVewRw4Q8ym7c', 'device_manufacturer':
'ihome', 'model_name': 'SmartPlug', 'upc_id': '1213', 'upc_code': 'ihome_UGUsr6pMeD8w
9pRRahWr9Pcq', 'primary_upc_code': 'ihome_isp100_smartplug', 'gang_id': None, 
'hub_id': None, 'local_id': None, 'radio_type': None, 'linked_service_id': '1098872',
'current_budget': None, 'lat_lng': [None, None], 'location': '', 'order': 0}
, 'errors': [], 'pagination': {}}

And here are the logs after ā€œGettingā€¦ā€

2018-08-05 09:59:42 INFO (SyncWorker_13) [pywink.api] Getting state via online API
2018-08-05 09:59:42 DEBUG (SyncWorker_13) [pywink.api] {'data': {'object_type':
'binary_switch', 'object_id': '805077', 'uuid': '68b63aab-92d4-4bdf-9019-863bee0270a9', 
'created_at': 1533441782, 'updated_at': 1533442414, 'icon_id': '258', 'icon_code': 
'binary_switch-ihome_smartplug', 'desired_state': {'powered': False}, 'last_reading': 
{'connection': True, 'connection_updated_at': 1533441782.9732275, 'powered': True, 
'powered_updated_at': 1533441782.9732275, 'desired_powered': False, 
'desired_powered_updated_at': 1533484782.0335011, 'connection_changed_at': 
1533441782.7954407, 'powered_changed_at': 1533441782.9732275, 
'desired_powered_changed_at': 1533484782.0335011}, 'subscription': {'pubnub': 
{'subscribe_key': 'sub-c-f7bf7f7e-0542-11e3-a5e8-02ee2ddab7fe', 'channel': 
'54ba64bfc32b44ce6c5673b43a03831b9a5e4e68|binary_switch-805077|user-910251'}}, 
'binary_switch_id': '805077', 'name': 'Back Porch Lights', 'locale': 'en_us', 'units': {}, 
'hidden_at': None, 'capabilities': {'fields': [{'type': 'boolean', 'field': 'connection', 'mutability': 
'read-only'}, {'type': 'boolean', 'field': 'powered', 'mutability': 'read-write'}]}, 'triggers': [], 
'manufacturer_device_model': 'ihome_i_sp100', 'manufacturer_device_id': 
'UpgggxA8GDQeVewRw4Q8ym7c', 'device_manufacturer': 'ihome', 'model_name': 
'SmartPlug', 'upc_id': '1213', 'upc_code': 'ihome_UGUsr6pMeD8w9pRRahWr9Pcq', 
'primary_upc_code': 'ihome_isp100_smartplug', 'gang_id': None, 'hub_id': None, 'local_id': 
None, 'radio_type': None, 'linked_service_id': '1098872', 'current_budget': None, 'lat_lng': 
[None, None], 'location': '', 'order': 0}, 'errors': [], 'pagination': {}}

Can you time this file https://hastebin.com/asonumemej.py this isnt a good way to do it, but I put in a 3 second delay before it calls the update. I am guessing that yours are just taking a little longer to update? Another user had this same problem and the first file fixed their problem.