ilcato / homebridge-Fibaro-HC2

Homebridge plugin for Fibaro Home Center 2 (and Home Center Lite ...)
Apache License 2.0
66 stars 27 forks source link

Fibaro CO sensor - CO values missing #95

Closed HajLender closed 6 years ago

HajLender commented 6 years ago

Hello, I have a Home Center Lite with Fibaro CO sensor connected. In homekit it shows me the temperature value only, is there any chance to have info about CO level in homekit?

Thank you

David

ilcato commented 6 years ago

This device is not yet supported in the plugin. In order to support it I need some info from you since I do not have this device. Can you send me the output of the following request:

http://YOUR_HCL_IP_ADDRESS/docs/#!/devices/getDevice

with the device ID of your sensor?

HajLender commented 6 years ago

I see that the CO sensor shows up in home center up as three devices with thre IDs:

ID 6 - device kind: com.fibaro.heatDetector ID 7 - device kind: temperature sensor ID 8 - device kind: com.fibaro.FGCD001

I made that request with ID 6, the result is this:

{ "id": 6, "name": "5.0", "roomID": 5, "type": "com.fibaro.FGCD001", "baseType": "com.fibaro.coDetector", "enabled": true, "visible": true, "isPlugin": false, "parentId": 5, "remoteGatewayId": 0, "interfaces": [ "battery", "fibaroBreach", "fibaroFirmwareUpdate", "tamper", "zwave", "zwaveAlarm", "zwaveMultiChannelAssociation", "zwaveWakeup" ], "properties": { "parameters": [ { "id": 2, "lastReportedValue": 0, "lastSetValue": 0, "size": 1, "value": 0 }, { "id": 3, "lastReportedValue": 0, "lastSetValue": 0, "size": 1, "value": 0 }, { "id": 4, "lastReportedValue": 0, "lastSetValue": 0, "size": 1, "value": 0 }, { "id": 7, "lastReportedValue": 63, "lastSetValue": 63, "size": 1, "value": 63 }, { "id": 10, "lastReportedValue": 3, "lastSetValue": 3, "size": 1, "value": 3 }, { "id": 11, "lastReportedValue": 255, "lastSetValue": 255, "size": 2, "value": 255 }, { "id": 12, "lastReportedValue": 0, "lastSetValue": 0, "size": 2, "value": 0 }, { "id": 13, "lastReportedValue": 3, "lastSetValue": 3, "size": 1, "value": 3 }, { "id": 14, "lastReportedValue": 40, "lastSetValue": 40, "size": 2, "value": 40 }, { "id": 15, "lastReportedValue": 0, "lastSetValue": 0, "size": 2, "value": 0 }, { "id": 16, "lastReportedValue": 255, "lastSetValue": 255, "size": 2, "value": 255 }, { "id": 17, "lastReportedValue": 25, "lastSetValue": 25, "size": 2, "value": 25 }, { "id": 19, "lastReportedValue": 0, "lastSetValue": 0, "size": 2, "value": 0 }, { "id": 20, "lastReportedValue": 0, "lastSetValue": 0, "size": 2, "value": 0 }, { "id": 21, "lastReportedValue": 2, "lastSetValue": 2, "size": 1, "value": 2 }, { "id": 22, "lastReportedValue": 55, "lastSetValue": 55, "size": 1, "value": 55 }, { "id": 23, "lastReportedValue": 1, "lastSetValue": 1, "size": 1, "value": 1 }, { "id": 25, "lastReportedValue": 2, "lastSetValue": 2, "size": 1, "value": 2 }, { "id": 26, "lastReportedValue": 30, "lastSetValue": 10, "size": 2, "value": 30 } ], "pollingTimeSec": 0, "wakeUpTime": 3600, "zwaveCompany": "Fibargroup", "zwaveInfo": "3,4,38", "zwaveVersion": "3.2", "alarmLevel": "0", "alarmType": "0", "batteryLevel": "100", "batteryLowNotification": "true", "concentration": "0", "configured": true, "dead": "false", "defInterval": "0", "deviceControlType": "0", "deviceIcon": "118", "emailNotificationID": "0", "emailNotificationType": "0", "endPointId": "0", "firmwareUpdate": "{\"info\":\"\",\"progress\":0,\"status\":\"UpToDate\",\"updateVersion\":\"3.2\"}", "icon": "{\"path\":\"fibaro/icons/com.fibaro.FGCD001/com.fibaro.FGCD001-healthy.png\",\"source\":\"HC\"}", "lastBreached": "0", "lastHealthy": "0", "lastModerate": "0", "liliOffCommand": "", "liliOnCommand": "", "log": "", "logTemp": "", "manufacturer": "", "markAsDead": "true", "maxConcentration": "0", "maxInterval": "0", "minInterval": "0", "model": "", "nodeId": "2", "parametersTemplate": "783", "productInfo": "1,15,18,1,16,0,3,2", "pushNotificationID": "0", "pushNotificationType": "0", "remoteGatewayId": "0", "saveLogs": "true", "serialNumber": "h'0000000000001bab", "smsNotificationID": "0", "smsNotificationType": "0", "state": "0", "stepInterval": "0", "tamper": "false", "unit": "ppm", "updateVersion": "", "useTemplate": "true", "userDescription": "", "value": "false", "warningNotificationActive": "true" }, "actions": { "abortUpdate": 1, "forceArm": 0, "meetArmConditions": 0, "reconfigure": 0, "reset": 0, "retryUpdate": 1, "setArmed": 1, "setInterval": 1, "startUpdate": 1, "updateFirmware": 1 }, "created": 26, "modified": 26, "sortOrder": 7 }

ilcato commented 6 years ago

Ok, will try to implement the support in the next days.

HajLender commented 6 years ago

Great thank you very much

ilcato commented 6 years ago

Can you test the implementation by replacing the following files in your setup and restarting homebridge?

https://raw.githubusercontent.com/ilcato/homebridge-Fibaro-HC2/master/dist/getFunctions.js https://raw.githubusercontent.com/ilcato/homebridge-Fibaro-HC2/master/dist/shadows.js

HajLender commented 6 years ago

It works! Huge thank you for that. Any chance to get info about battery status of the CO sensor?

ilcato commented 6 years ago

Done, can you test it? Can you also attach a screenshot of the home app showing the device?

HajLender commented 6 years ago

It shows up like 2 devices: CO sensor and temp. sensor. Do you mean the battery indicator is done? I downloaded again the files from the links above but battery indicator is not there. I am attaching pictures. img_3394 img_3395 img_3396

ilcato commented 6 years ago

Ok. The Apple Home app doesn't show battery level. Other Homekit App yes, for example MyHome. Can we close the issue? I will insert the update in the next release.

HajLender commented 6 years ago

It does not show the battery even in myhome app, but I can easily live with it. Thank you. You can close it.