Open bassrock opened 5 years ago
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?
The Json from winkathome?
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.
So wink actually doesn’t see the sensors as a leak sensor either. Just a contact sensor.
I'm thinking we can categorize weird devices by manufacturer/product name or something though.
{
"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": "****"
}
Ok I like that idea, could basically start or use (if one exists) a Zigbee/Z-Wave Device Type Database.
Hmmm, ok - I didn't realize all the attributes would just say "generic_zigbee".
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.