After many days of working with @shire210 I believe we have figured out how to fix the issue! It appears that making an API call to https://api.wink.com/users/me make state changes start up again. This is one of the calls made by the iOS and Android applications when they start up. This should be a pretty simple fix to add to python-wink/pubnubsubhandler however I would like more users that are having this issue test it out first.
To make this easier I have created the following python script which needs to be run once the state changes stop working.
https://hastebin.com/zirihocico.py
This script needs to be run like soā¦
Note: Rename the script to something useful, I called it get_wink_user.py
python3 zirihocico.py -u [email protected] -p winkpassword -s
-u is the username for your Wink account.
-p is the password of your account.
The -s is optional and will suppress the output of the response. Without the -s you should get something like the below printed out. This means it worked.
{
"data": {
"confirmed": true,
"created_at": 1449441909,
"desired_state": {
"current_location": null,
"home_geofence_id": null,
"robot_subscription": null,
"units": null
},
"email": "myemail",
"first_name": "William",
"last_name": "Scanlon",
"last_reading": {
"current_location": null,
"current_location_data": null,
"current_location_data_updated_at": null,
"current_location_updated_at": null,
"desired_current_location_updated_at": 1453091393.6379838,
"desired_home_geofence_id_updated_at": 1453091393.6379838,
"desired_robot_subscription": null,
"desired_robot_subscription_updated_at": null,
"desired_units": null,
"desired_units_updated_at": 1453091233.7842777,
"feature_flags": [
"faster_lights"
],
"feature_flags_updated_at": 1455056917.7954974,
"general_tos_version": "4",
"general_tos_version_updated_at": 1466634432.1567028,
"home_geofence_id": null,
"home_geofence_id_updated_at": null,
"premium_tos_version": null,
"premium_tos_version_updated_at": null,
"robot_subscription": null,
"robot_subscription_updated_at": null,
"units": {
"temperature": "f"
},
"units_updated_at": 1453091233.737727
},
"locale": "en_us",
"object_id": "377857",
"object_type": "user",
"subscription": {
"pubnub": {
"channel": "blah blah",
"subscribe_key": "blah blah"
}
},
"tos_accepted": true,
"units": {},
"user_id": "377857",
"uuid": "5c063d24-4ec0-4076-80ea-XXXXXXXXXXXXXXx"
},
"errors": [],
"pagination": {}
}
After you have manually confirmed that this fixes the problem, you can set it up to run in a HomeAssistant automation using a command line switch https://home-assistant.io/components/switch.command_line/ this will be a temporary workaround until I can get it added into the code, at which point you can remove the automation.