HA stops reporting Wink state changes

@w1ll1am23 Just curious if door bell support added with the latest release (0.37)?

I also noticed that I lost the Ecobee occupancy sensors via Wink, I actually don’t mind since I just hide them and use the native Ecobee component, but curious if that was intentional. Temperature still show up.

{
  "object_type": "binary_switch",
  "object_id": "383692",
  "uuid": "5bfceb54-28bc-41de-966c-f1f6257b1afc",
  "icon_id": "52",
  "icon_code": "binary_switch-light_bulb_dumb",
  "desired_state": {
    "opened": true,
    "identify_mode": false
  },
  "last_reading": {
    "connection": false,
    "connection_updated_at": 1485723151.1496468,
    "opened": true,
    "opened_updated_at": 1485720584.6081653,
    "identify_mode": false,
    "identify_mode_updated_at": 1485720584.6081653,
    "last_event": null,
    "last_event_updated_at": null,
    "battery": 1.0,
    "battery_updated_at": 1485720584.6081653,
    "firmware_version": "0.0b00 / 0.0b19",
    "firmware_version_updated_at": 1485720584.6081653,
    "firmware_date_code": "20150723",
    "firmware_date_code_updated_at": 1485720584.6081653,
    "desired_opened_updated_at": 1485562578.0845749,
    "desired_identify_mode_updated_at": 1485562700.4856005,
    "connection_changed_at": 1485721609.4953206,
    "opened_changed_at": 1485562578.0012438,
    "firmware_date_code_changed_at": 1485462807.4100585,
    "battery_changed_at": 1485462807.4100585,
    "identify_mode_changed_at": 1485462807.4100585,
    "firmware_version_changed_at": 1485463188.7705858,
    "desired_opened_changed_at": 1485562578.0845749,
    "desired_identify_mode_changed_at": 1485462991.2863882
  },
  "subscription": {
    "pubnub": {
      "subscribe_key": xxxxx,
      "channel": "8efd650aabe470340e8f080d176e03cf95644e0b|binary_switch-383692|user-252560"
    }
  },
  "binary_switch_id": "383692",
  "name": "Water Valve",
  "locale": "en_us",
  "units": {},
  "created_at": 1485462804,
  "hidden_at": null,
  "capabilities": {
    "fields": [
      {
        "type": "boolean",
        "field": "connection",
        "mutability": "read-only"
      },
      {
        "type": "boolean",
        "field": "opened",
        "mutability": "read-write",
        "attribute_id": 1
      },
      {
        "type": "boolean",
        "field": "identify_mode",
        "mutability": "read-write",
        "attribute_id": 258048
      },
      {
        "type": "selection",
        "field": "last_event",
        "choices": [
          "no_event",
          "monthly_cycle_start",
          "monthly_cycle_success",
          "monthly_cycle_skipped",
          "valve_operation_failure"
        ],
        "mutability": "read-only"
      },
      {
        "type": "percentage",
        "field": "battery",
        "mutability": "read-only",
        "attribute_id": 127009
      }
    ],
    "automation_robots": [
      {
        "name": "Auto Shutoff Valve",
        "causes": [
          {
            "value": "true",
            "operator": "==",
            "observed_field": "liquid_detected.or",
            "observed_object_id": "**SPECIAL_GROUP**:.sensors",
            "observed_object_type": "Group"
          }
        ],
        "effects": [
          {
            "scene": {
              "members": [
                {
                  "object_id": "**SELF**:id",
                  "object_type": "**SELF**:api_name",
                  "desired_state": {
                    "opened": false
                  }
                }
              ]
            }
          }
        ],
        "enabled": false,
        "automation_mode": "valve_auto_close"
      }
    ],
    "notification_robots": [
      "operation_failure_notification",
      "low_battery_notification",
      "offline_notification"
    ]
  },
  "triggers": [],
  "manufacturer_device_model": "leaksmart_valve",
  "manufacturer_device_id": null,
  "device_manufacturer": "leaksmart",
  "model_name": "leakSMART Valve",
  "upc_id": "463",
  "upc_code": "waxman_shutoff_valve",
  "gang_id": null,
  "hub_id": "236929",
  "local_id": "187",
  "radio_type": "zigbee",
  "linked_service_id": null,
  "current_budget": null,
  "lat_lng": [
    xxxxxx,
    xxxxxx
  ],
  "location": xxxxxxxxxxxxx,
  "order": 0
}

For the Leaksmart Valve.

Awesome, thanks. You can go ahead and remove it now, or at least remove the subscription key field.

Yes, door bell sensors should be present. As for the ecobee sensors, do you mean an attribute on the ecobee thermostat or was it a separate device? If it was a separate device I didn’t even know they showed up. If you could send me the JSON for one of them from the wink@home site I’ll look into why they are missing.

Well I lied, looks like I forgot to add the two lines needed to make door bells work to the home-assistant code. I will make sure this gets added to the next release.

Do you know what the identify mode is?

They used to show up as a separate device for occupancy as a binary_sensor.

Example: binary_sensor.bedroom

I actually don’t see them on Wink@home as a separate device. Honestly not sure if they ever did. At any rate I don’t think it’s that big of a problem, if someone has an Ecobee they would be better off using the native component support thus making it redundant. I always just hid them and disabled recorder for them.

I think when I first paired it there was an identify valve option or something like that to make the lights blink. I just looked at the options now and there’s nothing that seems similar to that, aside from a note saying the device will blink when being renamed…other than that I’m not sure.

Okay, thanks. I’ll ignore that field.

Just a heads up, the valve shows up currently as a switch in HA, but always shows off no matter the actual state.

Thanks, looks like that is because they are using the field “opened” and not “powered” like they do with every other binary_switch. Wink has to make things difficult. I’ll get this fixed too.

Thanks once again, w1ll1am23. All my Wink devices are running and reporting properly now. Response is excellent. You’ve made a great contribution to both HA and Wink.

3 Likes

@w1ll1am23 - I could swear when I was testing I saw my Ring doorbell, but using the production code I’m not seeing it. I checked binary_sensors and sensors but no sign of it.

I went to the app and re-authenticated with Ring, then restarted HA but still no sign of it. It does show in wink@home.

Any ideas? I can send you the JSON via PM if it will help.

Somehow I forgot to add the two lines needed to make them work to the hass code. It has been added to the most recent PR I have open. Should be in the next release.

1 Like

So glad it wasn’t just me! I looked through the PR and saw the doorbell code (bless you for documenting your code so well!) and I see that it will show as a binary sensor so I’ll know where to look.

How will this change state? Will it be a momentary state when the doorbell is pressed or will it be on until the notification alert is answered in Wink or Ring? I ask because I recently turned off the Wink alerts because it was silly to me to have to open Wink, then use it to open the Ring app when I could just open from the Ring from the Ring notification directly.

Not sure good question. I would think it is most likely a momentary on for maybe a few seconds.

So kind of like the Binary sensor keys for the lock (now that I know what they actually do LOL) behave. That works for me! I’d like to get the Ring to turn on the front door light after hours and I’d rather use HA than the Wink App.

If this can be tested using custom_components, let me know and I’ll be glad to test. Otherwise I can set up the venv for hasstest again.

Should be pretty simple to test. Add this https://hastebin.com/udalazovek.py as custom_components/binary_sensor/wink.py and restart.

Doing that now… thanks!

Oh, cool! I get two Ring binary_sensors; one for the button press and one for motion.

Too bad my Ring’s motion sensor figuratively trips whenever the freaking wind blows! Maybe I can play with that though. It’s nice to have the sensor though. Seems to be working great. I’ll test the states a little later.

Thanks!

Sweet glad it work.

1 Like