Skip to content

Commit

Permalink
Fix polling (old style)
Browse files Browse the repository at this point in the history
  • Loading branch information
ztalbot2000 committed May 22, 2019
1 parent 4e5c3a6 commit adee1f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,7 @@ Cmd4Platform.prototype =
this.setupCharacteristicPolling(accessory);
break;
case 'string':
case 'boolean':
this.log.debug("State polling for '%s'", accessory.name);
this.setupStatePollingPerAccessory(accessory);
break;
Expand Down Expand Up @@ -1450,7 +1451,7 @@ Cmd4Platform.prototype.characteristicPolling = function (accessory, accTypeEnumI
Cmd4Platform.prototype.setupStatePollingPerAccessory = function (accessory)
{
// Make sure the defined characteristics will be polled
let pollingCharacteristicsArray = CMD4_DEVICE_TYPE_ENUM.properties[this.typeIndex].defaultPollingCharacteristics;
let pollingCharacteristicsArray = CMD4_DEVICE_TYPE_ENUM.properties[accessory.typeIndex].defaultPollingCharacteristics;

for (let index = 0; index < pollingCharacteristicsArray.length; index++)
{
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"_from": "[email protected].1",
"_id": "[email protected].2",
"_from": "[email protected].2",
"_id": "[email protected].3",
"_inBundle": false,
"_integrity": "sha512-Q39XXNNaxpBENc4AXvqoWoW+5OVZE24OLYLm+4RqCxJmyQDAGLNsokL+dh2JU++YaZRdycASfnG/8sylpocGAg==",
"_location": "/homebridge-cmd4",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "[email protected].2",
"raw": "[email protected].3",
"name": "homebridge-cmd4",
"escapedName": "homebridge-cmd4",
"rawSpec": "2.1.2",
"rawSpec": "2.1.3",
"saveSpec": null,
"fetchSpec": "2.1.2"
"fetchSpec": "2.1.3"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/homebridge-cmd4/-/homebridge-cmd4-2.1.2.tgz",
"_shasum": "4f49b51f702.1.2df314cf88ea9022.1.2ec3025e7",
"_spec": "[email protected].2",
"_resolved": "https://registry.npmjs.org/homebridge-cmd4/-/homebridge-cmd4-2.1.3.tgz",
"_shasum": "4f49b51f702.1.3df314cf88ea9022.1.3ec3025e7",
"_spec": "[email protected].3",
"_where": "/private/var/root",
"author": {
"name": "John Talbot"
Expand Down Expand Up @@ -86,5 +86,5 @@
"test": "node_modules/.bin/mocha",
"postinstall": "node postinstall.js"
},
"version": "2.1.2"
"version": "2.1.3"
}
3 changes: 2 additions & 1 deletion postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ if (package.version.includes('1.3.0') ||

if (package.version.includes('2.0.0') ||
package.version.includes('2.1.0') ||
package.version.includes('2.1.2'))
package.version.includes('2.1.2') ||
package.version.includes('2.1.3'))
{
console.log("\n%sHomeBridge-Cmd4 Version 2.0 Notes:%s", KUND, KEND);
console.log(" This version changes the philosophy of homebridge-Cmd4 from Accessories that have known characteristics as per the HAP Spec to assigning any characteristic to any Accessory.\n");
Expand Down

0 comments on commit adee1f9

Please sign in to comment.