Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Allowing the ability to force a sensor pod as a leak sensor #101

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bassrock
Copy link

I currently have 2 smartthings leak sensors that were showing up as contact sensors in HomeKit and Wink. This patch allows you to force a contact sensor to be a leak sensor like you can with outlets.

@sibartlett
Copy link
Owner

Thanks for the pull requests!

I've been thinking about updating this plugin to support device-specific configurations... so that devices like this can work out of the box, rather than users having to rely on configuration options.

Would you mind sharing the JSON for the device?

@bassrock
Copy link
Author

The Json from winkathome?

@sibartlett
Copy link
Owner

Yes, the JSON from winkathome would be great.

BTW, I just published version 2.0.0 of this plugin. I've removed the dependency on babel, so now there's no build step - it was always a stumbling block for hobbyists. It does mean the minimum node version is now 8.9.0 though.

@bassrock
Copy link
Author

So wink actually doesn’t see the sensors as a leak sensor either. Just a contact sensor.

@sibartlett
Copy link
Owner

I'm thinking we can categorize weird devices by manufacturer/product name or something though.

@bassrock
Copy link
Author

bassrock commented Aug 14, 2018

{
  "last_event": {
    "brightness_occurred_at": null,
    "loudness_occurred_at": null,
    "vibration_occurred_at": null
  },
  "object_type": "sensor_pod",
  "object_id": "424998",
  "uuid": "25acccd2-289c-42bd-84d4-97bb8a22be24",
  "created_at": 1510709957,
  "updated_at": 1534010683,
  "icon_id": null,
  "icon_code": null,
  "desired_state": {},
  "last_reading": {
    "opened": true,
    "opened_updated_at": 1525815613.9481874,
    "battery": 1.0,
    "battery_updated_at": 1510709960.2297821,
    "connection": false,
    "connection_updated_at": 1534255428.4678955,
    "agent_session_id": null,
    "agent_session_id_updated_at": null,
    "firmware_version": "1.0b01 / 5.1b00",
    "firmware_version_updated_at": 1510709960.2297821,
    "firmware_date_code": "����������������",
    "firmware_date_code_updated_at": 1510709960.2297821,
    "opened_changed_at": 1525815613.9481874,
    "battery_changed_at": 1510709960.2297821,
    "connection_changed_at": 1526103644.0507164,
    "firmware_version_changed_at": 1510709960.2297821,
    "firmware_date_code_changed_at": 1510709960.2297821
  },
  "subscription": {
    "pubnub": {
      "subscribe_key": "***",
      "channel": "***"
    }
  },
  "sensor_pod_id": "424998",
  "name": "Kitchen Sink",
  "locale": "en_us",
  "units": {},
  "hidden_at": null,
  "capabilities": {
    "is_generic": true,
    "home_security_device": true,
    "sensor_types": [
      {
        "type": "boolean",
        "field": "opened",
        "mutability": "read-only"
      },
      {
        "type": "percentage",
        "field": "battery",
        "mutability": "read-only"
      }
    ],
    "desired_state_fields": []
  },
  "triggers": [],
  "manufacturer_device_model": "generic_zigbee",
  "manufacturer_device_id": null,
  "device_manufacturer": "generic_zigbee",
  "model_name": "Generic Zigbee Sensor",
  "upc_id": "322",
  "upc_code": "generic_zigbee_sensor_pod",
  "primary_upc_code": "generic_zigbee_sensor_pod",
  "gang_id": null,
  "hub_id": "509242",
  "local_id": "86",
  "radio_type": "zigbee",
  "linked_service_id": null,
  "lat_lng": [
    ***,
    ***
  ],
  "location": "****"
}

@bassrock
Copy link
Author

Ok I like that idea, could basically start or use (if one exists) a Zigbee/Z-Wave Device Type Database.

@sibartlett
Copy link
Owner

Hmmm, ok - I didn't realize all the attributes would just say "generic_zigbee".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants