homebridge-smartsystem 5.14.1 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/duotecno/master.js +2 -2
- package/duotecno/protocol.js +4 -4
- package/index.js +2 -2
- package/index.spec.js +1 -1
- package/index.spec.ts +3 -2
- package/index.ts +3 -2
- package/package.json +8 -7
- package/server/base.js +3 -3
- package/server/base.ts +3 -3
- package/server/platform.js +21 -20
- package/server/platform.ts +23 -21
- package/server/smartapp.js +9 -10
- package/server/smartapp.ts +1 -1
- package/server/somfy.js +3 -2
- package/server/webapp.js +2 -2
- package/server/webapp.ts +2 -2
- package/www/0-es2015.js 2.map +0 -1
- package/www/0-es2015.js 3.map +0 -1
- package/www/0-es5.js 2.map +0 -1
- package/www/0-es5.js 3.map +0 -1
- package/www/1-es2015.js 2.map +0 -1
- package/www/1-es2015.js 3.map +0 -1
- package/www/1-es5.js 2.map +0 -1
- package/www/1-es5.js 3.map +0 -1
- package/www/10-es2015.js 2.map +0 -1
- package/www/10-es2015.js 3.map +0 -1
- package/www/10-es5.js 2.map +0 -1
- package/www/10-es5.js 3.map +0 -1
- package/www/11-es2015.js 2.map +0 -1
- package/www/11-es2015.js 3.map +0 -1
- package/www/11-es5.js 2.map +0 -1
- package/www/11-es5.js 3.map +0 -1
- package/www/12-es2015.js 2.map +0 -1
- package/www/12-es2015.js 3.map +0 -1
- package/www/12-es5.js 2.map +0 -1
- package/www/12-es5.js 3.map +0 -1
- package/www/13-es2015.js 2.map +0 -1
- package/www/13-es2015.js 3.map +0 -1
- package/www/13-es5.js 2.map +0 -1
- package/www/13-es5.js 3.map +0 -1
- package/www/14-es2015.js 2.map +0 -1
- package/www/14-es2015.js 3.map +0 -1
- package/www/14-es5.js 2.map +0 -1
- package/www/14-es5.js 3.map +0 -1
- package/www/15-es2015.js 2.map +0 -1
- package/www/15-es2015.js 3.map +0 -1
- package/www/15-es5.js 2.map +0 -1
- package/www/15-es5.js 3.map +0 -1
- package/www/16-es2015.js 2.map +0 -1
- package/www/16-es2015.js 3.map +0 -1
- package/www/16-es5.js 2.map +0 -1
- package/www/16-es5.js 3.map +0 -1
- package/www/17-es2015.js 2.map +0 -1
- package/www/17-es2015.js 3.map +0 -1
- package/www/17-es5.js 2.map +0 -1
- package/www/17-es5.js 3.map +0 -1
- package/www/18-es2015.js 2.map +0 -1
- package/www/18-es2015.js 3.map +0 -1
- package/www/18-es5.js 2.map +0 -1
- package/www/18-es5.js 3.map +0 -1
- package/www/19-es2015.js 2.map +0 -1
- package/www/19-es2015.js 3.map +0 -1
- package/www/19-es5.js 2.map +0 -1
- package/www/19-es5.js 3.map +0 -1
- package/www/2-es2015.js 2.map +0 -1
- package/www/2-es2015.js 3.map +0 -1
- package/www/2-es5.js 2.map +0 -1
- package/www/2-es5.js 3.map +0 -1
- package/www/20-es2015.js 2.map +0 -1
- package/www/20-es2015.js 3.map +0 -1
- package/www/20-es5.js 2.map +0 -1
- package/www/20-es5.js 3.map +0 -1
- package/www/21-es2015.js 2.map +0 -1
- package/www/21-es2015.js 3.map +0 -1
- package/www/21-es5.js 2.map +0 -1
- package/www/21-es5.js 3.map +0 -1
- package/www/22-es2015.js 2.map +0 -1
- package/www/22-es2015.js 3.map +0 -1
- package/www/22-es5.js 2.map +0 -1
- package/www/22-es5.js 3.map +0 -1
- package/www/23-es2015.js 2.map +0 -1
- package/www/23-es2015.js 3.map +0 -1
- package/www/23-es5.js 2.map +0 -1
- package/www/23-es5.js 3.map +0 -1
- package/www/24-es2015.js 2.map +0 -1
- package/www/24-es2015.js 3.map +0 -1
- package/www/24-es5.js 2.map +0 -1
- package/www/24-es5.js 3.map +0 -1
- package/www/25-es2015.js 2.map +0 -1
- package/www/25-es2015.js 3.map +0 -1
- package/www/25-es5.js 2.map +0 -1
- package/www/25-es5.js 3.map +0 -1
- package/www/26-es2015.js 2.map +0 -1
- package/www/26-es2015.js 3.map +0 -1
- package/www/26-es5.js 2.map +0 -1
- package/www/26-es5.js 3.map +0 -1
- package/www/27-es2015.js 2.map +0 -1
- package/www/27-es2015.js 3.map +0 -1
- package/www/27-es5.js 2.map +0 -1
- package/www/27-es5.js 3.map +0 -1
- package/www/28-es2015.js 2.map +0 -1
- package/www/28-es2015.js 3.map +0 -1
- package/www/28-es5.js 2.map +0 -1
- package/www/28-es5.js 3.map +0 -1
- package/www/29-es2015.js 2.map +0 -1
- package/www/29-es2015.js 3.map +0 -1
- package/www/29-es5.js 2.map +0 -1
- package/www/29-es5.js 3.map +0 -1
- package/www/3-es2015.js 2.map +0 -1
- package/www/3-es2015.js 3.map +0 -1
- package/www/3-es5.js 2.map +0 -1
- package/www/3-es5.js 3.map +0 -1
- package/www/30-es2015.js 2.map +0 -1
- package/www/30-es2015.js 3.map +0 -1
- package/www/30-es5.js 2.map +0 -1
- package/www/30-es5.js 3.map +0 -1
- package/www/31-es2015.js 2.map +0 -1
- package/www/31-es2015.js 3.map +0 -1
- package/www/31-es5.js 2.map +0 -1
- package/www/31-es5.js 3.map +0 -1
- package/www/32-es2015.js 2.map +0 -1
- package/www/32-es2015.js 3.map +0 -1
- package/www/32-es5.js 2.map +0 -1
- package/www/32-es5.js 3.map +0 -1
- package/www/33-es2015.js 2.map +0 -1
- package/www/33-es2015.js 3.map +0 -1
- package/www/33-es5.js 2.map +0 -1
- package/www/33-es5.js 3.map +0 -1
- package/www/34-es2015.js 2.map +0 -1
- package/www/34-es2015.js 3.map +0 -1
- package/www/34-es5.js 2.map +0 -1
- package/www/34-es5.js 3.map +0 -1
- package/www/35-es2015.js 2.map +0 -1
- package/www/35-es2015.js 3.map +0 -1
- package/www/35-es5.js 2.map +0 -1
- package/www/35-es5.js 3.map +0 -1
- package/www/36-es2015.js 2.map +0 -1
- package/www/36-es2015.js 3.map +0 -1
- package/www/36-es5.js 2.map +0 -1
- package/www/36-es5.js 3.map +0 -1
- package/www/37-es2015.js 2.map +0 -1
- package/www/37-es2015.js 3.map +0 -1
- package/www/37-es5.js 2.map +0 -1
- package/www/37-es5.js 3.map +0 -1
- package/www/38-es2015.js 2.map +0 -1
- package/www/38-es2015.js 3.map +0 -1
- package/www/38-es5.js 2.map +0 -1
- package/www/38-es5.js 3.map +0 -1
- package/www/39-es2015.js 2.map +0 -1
- package/www/39-es2015.js 3.map +0 -1
- package/www/39-es5.js 2.map +0 -1
- package/www/39-es5.js 3.map +0 -1
- package/www/3rdpartylicenses.txt +0 -426
- package/www/4-es2015.js 2.map +0 -1
- package/www/4-es2015.js 3.map +0 -1
- package/www/4-es5.js 2.map +0 -1
- package/www/4-es5.js 3.map +0 -1
- package/www/40-es2015.js 2.map +0 -1
- package/www/40-es2015.js 3.map +0 -1
- package/www/40-es5.js 2.map +0 -1
- package/www/40-es5.js 3.map +0 -1
- package/www/41-es2015.js 2.map +0 -1
- package/www/41-es2015.js 3.map +0 -1
- package/www/41-es5.js 2.map +0 -1
- package/www/41-es5.js 3.map +0 -1
- package/www/42-es2015.js 2.map +0 -1
- package/www/42-es2015.js 3.map +0 -1
- package/www/42-es5.js 2.map +0 -1
- package/www/42-es5.js 3.map +0 -1
- package/www/43-es2015.js 2.map +0 -1
- package/www/43-es2015.js 3.map +0 -1
- package/www/43-es5.js 2.map +0 -1
- package/www/43-es5.js 3.map +0 -1
- package/www/44-es2015.js 2.map +0 -1
- package/www/44-es2015.js 3.map +0 -1
- package/www/44-es5.js 2.map +0 -1
- package/www/44-es5.js 3.map +0 -1
- package/www/45-es2015.js 2.map +0 -1
- package/www/45-es2015.js 3.map +0 -1
- package/www/45-es5.js 2.map +0 -1
- package/www/45-es5.js 3.map +0 -1
- package/www/46-es2015.js 2.map +0 -1
- package/www/46-es2015.js 3.map +0 -1
- package/www/46-es5.js 2.map +0 -1
- package/www/46-es5.js 3.map +0 -1
- package/www/47-es2015.js 2.map +0 -1
- package/www/47-es2015.js 3.map +0 -1
- package/www/47-es5.js 2.map +0 -1
- package/www/47-es5.js 3.map +0 -1
- package/www/48-es2015.js 2.map +0 -1
- package/www/48-es2015.js 3.map +0 -1
- package/www/48-es5.js 2.map +0 -1
- package/www/48-es5.js 3.map +0 -1
- package/www/49-es2015.js 2.map +0 -1
- package/www/49-es2015.js 3.map +0 -1
- package/www/49-es5.js 2.map +0 -1
- package/www/49-es5.js 3.map +0 -1
- package/www/5-es2015.js 2.map +0 -1
- package/www/5-es2015.js 3.map +0 -1
- package/www/5-es5.js 2.map +0 -1
- package/www/5-es5.js 3.map +0 -1
- package/www/50-es2015.js 2.map +0 -1
- package/www/50-es2015.js 3.map +0 -1
- package/www/50-es5.js 2.map +0 -1
- package/www/50-es5.js 3.map +0 -1
- package/www/51-es2015.js 2.map +0 -1
- package/www/51-es2015.js 3.map +0 -1
- package/www/51-es5.js 2.map +0 -1
- package/www/51-es5.js 3.map +0 -1
- package/www/52-es2015.js 2.map +0 -1
- package/www/52-es2015.js 3.map +0 -1
- package/www/52-es5.js 2.map +0 -1
- package/www/52-es5.js 3.map +0 -1
- package/www/53-es2015.js 2.map +0 -1
- package/www/53-es2015.js 3.map +0 -1
- package/www/53-es5.js 2.map +0 -1
- package/www/53-es5.js 3.map +0 -1
- package/www/54-es2015.js 2.map +0 -1
- package/www/54-es2015.js 3.map +0 -1
- package/www/54-es5.js 2.map +0 -1
- package/www/54-es5.js 3.map +0 -1
- package/www/55-es2015.js 2.map +0 -1
- package/www/55-es2015.js 3.map +0 -1
- package/www/55-es5.js 2.map +0 -1
- package/www/55-es5.js 3.map +0 -1
- package/www/56-es2015.js 2.map +0 -1
- package/www/56-es2015.js 3.map +0 -1
- package/www/56-es5.js 2.map +0 -1
- package/www/56-es5.js 3.map +0 -1
- package/www/57-es2015.7d1e71790e8f8a161dde.js.LICENSE.txt +0 -11
- package/www/57-es2015.js 2.map +0 -1
- package/www/57-es2015.js 3.map +0 -1
- package/www/57-es5.js 2.map +0 -1
- package/www/57-es5.js 3.map +0 -1
- package/www/58-es2015.js 2.map +0 -1
- package/www/58-es2015.js 3.map +0 -1
- package/www/58-es5.js 2.map +0 -1
- package/www/58-es5.js 3.map +0 -1
- package/www/59-es2015.js 2.map +0 -1
- package/www/59-es2015.js 3.map +0 -1
- package/www/59-es5.js 2.map +0 -1
- package/www/59-es5.js 3.map +0 -1
- package/www/6-es2015.js 2.map +0 -1
- package/www/6-es2015.js 3.map +0 -1
- package/www/6-es5.js 2.map +0 -1
- package/www/6-es5.js 3.map +0 -1
- package/www/60-es2015.js 2.map +0 -1
- package/www/60-es2015.js 3.map +0 -1
- package/www/60-es5.js 2.map +0 -1
- package/www/60-es5.js 3.map +0 -1
- package/www/61-es2015.js 2.map +0 -1
- package/www/61-es2015.js 3.map +0 -1
- package/www/61-es5.js 2.map +0 -1
- package/www/61-es5.js 3.map +0 -1
- package/www/62-es2015.js 2.map +0 -1
- package/www/62-es2015.js 3.map +0 -1
- package/www/62-es5.js 2.map +0 -1
- package/www/62-es5.js 3.map +0 -1
- package/www/63-es2015.js 2.map +0 -1
- package/www/63-es2015.js 3.map +0 -1
- package/www/63-es5.js 2.map +0 -1
- package/www/63-es5.js 3.map +0 -1
- package/www/64-es2015.js 2.map +0 -1
- package/www/64-es2015.js 3.map +0 -1
- package/www/64-es5.js 2.map +0 -1
- package/www/64-es5.js 3.map +0 -1
- package/www/65-es2015.js 2.map +0 -1
- package/www/65-es2015.js 3.map +0 -1
- package/www/65-es5.js 2.map +0 -1
- package/www/65-es5.js 3.map +0 -1
- package/www/66-es2015.js 2.map +0 -1
- package/www/66-es2015.js 3.map +0 -1
- package/www/66-es5.js 2.map +0 -1
- package/www/66-es5.js 3.map +0 -1
- package/www/67-es2015.js 2.map +0 -1
- package/www/67-es2015.js 3.map +0 -1
- package/www/67-es5.js 2.map +0 -1
- package/www/67-es5.js 3.map +0 -1
- package/www/68-es2015.js 2.map +0 -1
- package/www/68-es2015.js 3.map +0 -1
- package/www/68-es5.js 2.map +0 -1
- package/www/68-es5.js 3.map +0 -1
- package/www/69-es2015.js 2.map +0 -1
- package/www/69-es2015.js 3.map +0 -1
- package/www/69-es5.js 2.map +0 -1
- package/www/69-es5.js 3.map +0 -1
- package/www/7-es2015.js 2.map +0 -1
- package/www/7-es2015.js 3.map +0 -1
- package/www/7-es5.js 2.map +0 -1
- package/www/7-es5.js 3.map +0 -1
- package/www/70-es2015.js 2.map +0 -1
- package/www/70-es2015.js 3.map +0 -1
- package/www/70-es5.js 2.map +0 -1
- package/www/70-es5.js 3.map +0 -1
- package/www/71-es2015.js 2.map +0 -1
- package/www/71-es2015.js 3.map +0 -1
- package/www/71-es5.js 2.map +0 -1
- package/www/71-es5.js 3.map +0 -1
- package/www/72-es2015.js 2.map +0 -1
- package/www/72-es2015.js 3.map +0 -1
- package/www/72-es5.js 2.map +0 -1
- package/www/72-es5.js 3.map +0 -1
- package/www/73-es2015.js 2.map +0 -1
- package/www/73-es2015.js 3.map +0 -1
- package/www/73-es5.js 2.map +0 -1
- package/www/73-es5.js 3.map +0 -1
- package/www/74-es2015.js 2.map +0 -1
- package/www/74-es2015.js 3.map +0 -1
- package/www/74-es5.js 2.map +0 -1
- package/www/74-es5.js 3.map +0 -1
- package/www/75-es2015.js 2.map +0 -1
- package/www/75-es2015.js 3.map +0 -1
- package/www/75-es5.js 2.map +0 -1
- package/www/75-es5.js 3.map +0 -1
- package/www/76-es2015.js 2.map +0 -1
- package/www/76-es2015.js 3.map +0 -1
- package/www/76-es5.js 2.map +0 -1
- package/www/76-es5.js 3.map +0 -1
- package/www/8-es2015.js 2.map +0 -1
- package/www/8-es2015.js 3.map +0 -1
- package/www/8-es5.js 2.map +0 -1
- package/www/8-es5.js 3.map +0 -1
- package/www/9-es2015.js 2.map +0 -1
- package/www/9-es2015.js 3.map +0 -1
- package/www/9-es5.js 2.map +0 -1
- package/www/9-es5.js 3.map +0 -1
- package/www/common-es2015.js 2.map +0 -1
- package/www/common-es2015.js 3.map +0 -1
- package/www/common-es5.js 2.map +0 -1
- package/www/common-es5.js 3.map +0 -1
- package/www/core-js-js-es2015.js 2.map +0 -1
- package/www/core-js-js-es2015.js 3.map +0 -1
- package/www/core-js-js-es5.js 2.map +0 -1
- package/www/core-js-js-es5.js 3.map +0 -1
- package/www/css-shim-978387b1-1e75855f-js-es2015.js 2.map +0 -1
- package/www/css-shim-978387b1-1e75855f-js-es2015.js 3.map +0 -1
- package/www/css-shim-978387b1-1e75855f-js-es5.js 2.map +0 -1
- package/www/css-shim-978387b1-1e75855f-js-es5.js 3.map +0 -1
- package/www/dom-76cc7c7d-0a082895-js-es2015.js 2.map +0 -1
- package/www/dom-76cc7c7d-0a082895-js-es2015.js 3.map +0 -1
- package/www/dom-76cc7c7d-0a082895-js-es5.js 2.map +0 -1
- package/www/dom-76cc7c7d-0a082895-js-es5.js 3.map +0 -1
- package/www/dom-js-es2015.js 2.map +0 -1
- package/www/dom-js-es2015.js 3.map +0 -1
- package/www/dom-js-es5.js 2.map +0 -1
- package/www/dom-js-es5.js 3.map +0 -1
- package/www/focus-visible-70713a0c-js-es2015.js 2.map +0 -1
- package/www/focus-visible-70713a0c-js-es2015.js 3.map +0 -1
- package/www/focus-visible-70713a0c-js-es5.js 2.map +0 -1
- package/www/focus-visible-70713a0c-js-es5.js 3.map +0 -1
- package/www/hardware-back-button-5afe3cb0-js-es2015.js 2.map +0 -1
- package/www/hardware-back-button-5afe3cb0-js-es2015.js 3.map +0 -1
- package/www/hardware-back-button-5afe3cb0-js-es5.js 2.map +0 -1
- package/www/hardware-back-button-5afe3cb0-js-es5.js 3.map +0 -1
- package/www/index.html +0 -25
- package/www/input-shims-a4fc53ac-js-es2015.js 2.map +0 -1
- package/www/input-shims-a4fc53ac-js-es2015.js 3.map +0 -1
- package/www/input-shims-a4fc53ac-js-es5.js 2.map +0 -1
- package/www/input-shims-a4fc53ac-js-es5.js 3.map +0 -1
- package/www/ios-transition-1850e475-js-es2015.js 2.map +0 -1
- package/www/ios-transition-1850e475-js-es2015.js 3.map +0 -1
- package/www/ios-transition-1850e475-js-es5.js 2.map +0 -1
- package/www/ios-transition-1850e475-js-es5.js 3.map +0 -1
- package/www/main-es2015.29aba245ff55288da276.js.LICENSE.txt +0 -36
- package/www/main-es2015.2aee1c4665d7383974fc.js.LICENSE.txt +0 -36
- package/www/main-es2015.d3c2de87c5e4e25c179f.js.LICENSE.txt +0 -36
- package/www/main-es2015.js 2.map +0 -1
- package/www/main-es2015.js 3.map +0 -1
- package/www/main-es5.js 2.map +0 -1
- package/www/main-es5.js 3.map +0 -1
- package/www/md-transition-083fcf52-js-es2015.js 2.map +0 -1
- package/www/md-transition-083fcf52-js-es2015.js 3.map +0 -1
- package/www/md-transition-083fcf52-js-es5.js 2.map +0 -1
- package/www/md-transition-083fcf52-js-es5.js 3.map +0 -1
- package/www/polyfills-dom-es2015.9245408aeb114e820beb.js.LICENSE.txt +0 -17
- package/www/polyfills-es2015.51c4f7e8d338ef7e78a0.js.LICENSE.txt +0 -7
- package/www/polyfills-es2015.js 2.map +0 -1
- package/www/polyfills-es2015.js 3.map +0 -1
- package/www/polyfills-es5-es2015.a49d989efcbf8eaab207.js.LICENSE.txt +0 -7
- package/www/polyfills-es5.js 2.map +0 -1
- package/www/polyfills-es5.js 3.map +0 -1
- package/www/runtime-es2015.js 2.map +0 -1
- package/www/runtime-es2015.js 3.map +0 -1
- package/www/runtime-es5.js 2.map +0 -1
- package/www/runtime-es5.js 3.map +0 -1
- package/www/shadow-css-4889ae62-23996f3f-js-es2015.js 2.map +0 -1
- package/www/shadow-css-4889ae62-23996f3f-js-es2015.js 3.map +0 -1
- package/www/shadow-css-4889ae62-23996f3f-js-es5.js 2.map +0 -1
- package/www/shadow-css-4889ae62-23996f3f-js-es5.js 3.map +0 -1
- package/www/status-tap-839e1402-js-es2015.js 2.map +0 -1
- package/www/status-tap-839e1402-js-es2015.js 3.map +0 -1
- package/www/status-tap-839e1402-js-es5.js 2.map +0 -1
- package/www/status-tap-839e1402-js-es5.js 3.map +0 -1
- package/www/styles-es2015.js 2.map +0 -1
- package/www/styles-es2015.js 3.map +0 -1
- package/www/styles-es5.js 2.map +0 -1
- package/www/styles-es5.js 3.map +0 -1
- package/www/styles.a59f3a368f35acaaaff1.css +0 -1
- package/www/styles.e5241ddaca639f9a9abb.css +0 -1
- package/www/swipe-back-d2cdbf9a-js-es2015.js 2.map +0 -1
- package/www/swipe-back-d2cdbf9a-js-es2015.js 3.map +0 -1
- package/www/swipe-back-d2cdbf9a-js-es5.js 2.map +0 -1
- package/www/swipe-back-d2cdbf9a-js-es5.js 3.map +0 -1
- package/www/swiper-bundle-ccdaac54-js-es2015.js 2.map +0 -1
- package/www/swiper-bundle-ccdaac54-js-es2015.js 3.map +0 -1
- package/www/swiper-bundle-ccdaac54-js-es5.js 2.map +0 -1
- package/www/swiper-bundle-ccdaac54-js-es5.js 3.map +0 -1
- package/www/tabs-tabs-tabs-module-es2015.js 2.map +0 -1
- package/www/tabs-tabs-tabs-module-es2015.js 3.map +0 -1
- package/www/tabs-tabs-tabs-module-es5.js 2.map +0 -1
- package/www/tabs-tabs-tabs-module-es5.js 3.map +0 -1
- package/www/tap-click-606f325e-js-es2015.js 2.map +0 -1
- package/www/tap-click-606f325e-js-es2015.js 3.map +0 -1
- package/www/tap-click-606f325e-js-es5.js 2.map +0 -1
- package/www/tap-click-606f325e-js-es5.js 3.map +0 -1
- package/www/vendor-es2015.js 2.map +0 -1
- package/www/vendor-es2015.js 3.map +0 -1
- package/www/vendor-es5.js 2.map +0 -1
- package/www/vendor-es5.js 3.map +0 -1
package/duotecno/master.js
CHANGED
|
@@ -213,7 +213,7 @@ class Master extends base_1.Base {
|
|
|
213
213
|
}
|
|
214
214
|
try {
|
|
215
215
|
// params 3-6: data message, closed, log and error functions
|
|
216
|
-
this.socket = yield smartsocket_1.getSocket(this.config.address, this.config.port, (msg) => {
|
|
216
|
+
this.socket = yield (0, smartsocket_1.getSocket)(this.config.address, this.config.port, (msg) => {
|
|
217
217
|
this.handleData(msg);
|
|
218
218
|
}, (end) => {
|
|
219
219
|
this.isOpen = false;
|
|
@@ -354,7 +354,7 @@ class Master extends base_1.Base {
|
|
|
354
354
|
else {
|
|
355
355
|
if ((next.cmd != protocol_1.Rec.TimeDateStatus) &&
|
|
356
356
|
(next.cmd != protocol_1.Rec.Sensor))
|
|
357
|
-
this.info(protocol_1.recName(next.cmd) + " -> " + ((!next.message) ?
|
|
357
|
+
this.info((0, protocol_1.recName)(next.cmd) + " -> " + ((!next.message) ?
|
|
358
358
|
"--" : ((next.message instanceof Array) ? next.message.join(",") : next.message)));
|
|
359
359
|
this.Q.do();
|
|
360
360
|
if (next.isStatus) {
|
package/duotecno/protocol.js
CHANGED
|
@@ -125,7 +125,7 @@ class Node {
|
|
|
125
125
|
return this.getName().toLowerCase();
|
|
126
126
|
}
|
|
127
127
|
getNumber() {
|
|
128
|
-
return types_1.hex(this.logicalAddress);
|
|
128
|
+
return (0, types_1.hex)(this.logicalAddress);
|
|
129
129
|
}
|
|
130
130
|
getDescription() {
|
|
131
131
|
return this.getName() + ", active: " + this.active + ", type: " + this.typeName() + ", node: " + this.getName();
|
|
@@ -218,7 +218,7 @@ class Unit {
|
|
|
218
218
|
return this.displayName;
|
|
219
219
|
}
|
|
220
220
|
getNumber() {
|
|
221
|
-
return this.node.getNumber() + ";" + types_1.hex(this.logicalAddress);
|
|
221
|
+
return this.node.getNumber() + ";" + (0, types_1.hex)(this.logicalAddress);
|
|
222
222
|
}
|
|
223
223
|
getSort() {
|
|
224
224
|
const name = this.getName().toLowerCase();
|
|
@@ -322,7 +322,7 @@ class Unit {
|
|
|
322
322
|
return "N" + this.logicalNodeAddress + "-U" + this.logicalAddress;
|
|
323
323
|
}
|
|
324
324
|
getModelName() {
|
|
325
|
-
return this.typeName() + " " + types_1.hex(this.node.logicalAddress) + ";" + types_1.hex(this.logicalAddress);
|
|
325
|
+
return this.typeName() + " " + (0, types_1.hex)(this.node.logicalAddress) + ";" + (0, types_1.hex)(this.logicalAddress);
|
|
326
326
|
}
|
|
327
327
|
isCtrl() {
|
|
328
328
|
return this.isSwitch() || this.isDimmer() || this.isUpDown();
|
|
@@ -402,7 +402,7 @@ class Unit {
|
|
|
402
402
|
return (isNaN(aval) ? "-" :
|
|
403
403
|
((aval < 10000) ?
|
|
404
404
|
(aval + " W") :
|
|
405
|
-
(Math.round(aval / 1000) + "." + types_1.two(Math.round(aval % 1000 / 100)) + " kW")));
|
|
405
|
+
(Math.round(aval / 1000) + "." + (0, types_1.two)(Math.round(aval % 1000 / 100)) + " kW")));
|
|
406
406
|
case types_1.UnitExtendedType.kTemperature:
|
|
407
407
|
return isNaN(this.value) ? "-" : ((this.value / 10.0) + 'C');
|
|
408
408
|
case types_1.UnitExtendedType.kCondition:
|
package/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const platform_1 = require("./server/platform");
|
|
4
4
|
console.log("index.ts - running in directory: " + process.cwd());
|
|
5
|
-
module.exports = function (
|
|
5
|
+
module.exports = function (api) {
|
|
6
6
|
console.log("registering Duotecno Platform");
|
|
7
|
-
|
|
7
|
+
api.registerPlatform("homebridge-smartsystem", "DuotecnoPlatform", platform_1.Platform);
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/index.spec.js
CHANGED
|
@@ -12,7 +12,7 @@ function adder(plugin, platform, list) {
|
|
|
12
12
|
console.log("************* plugin: " + plugin + ", platform: " + platform, list);
|
|
13
13
|
}
|
|
14
14
|
function tester() {
|
|
15
|
-
const platform = new platform_1.Platform(console
|
|
15
|
+
const platform = new platform_1.Platform(console, { debug: false, smappee: true, smartapp: true, socapp: false, system: true,
|
|
16
16
|
manufacturer: "Duotecno", platform: "ssoc" }, { registerPlatformAccessories: adder });
|
|
17
17
|
// testing
|
|
18
18
|
let m = new master_1.Master(platform.system, types_1.Sanitizers.masterConfig({ name: "master1", address: "12", port: 21, password: "x", active: true, nodenames: {} }));
|
package/index.spec.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Master } from "./duotecno/master";
|
|
|
5
5
|
import { System } from "./duotecno/system";
|
|
6
6
|
import { SmartApp } from "./server/smartapp";
|
|
7
7
|
import { Smappee } from "./server/smappee";
|
|
8
|
+
import { API } from "homebridge";
|
|
8
9
|
|
|
9
10
|
console.log("running in directory: " + process.cwd());
|
|
10
11
|
|
|
@@ -13,8 +14,8 @@ function adder(plugin: string, platform: string, list: any[]) {
|
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
function tester() {
|
|
16
|
-
const platform = new Platform(console
|
|
17
|
-
manufacturer: "Duotecno", platform: "ssoc"}, {registerPlatformAccessories: adder});
|
|
17
|
+
const platform = new Platform(console, {debug: false, smappee: true, smartapp: true, socapp: false, system: true,
|
|
18
|
+
manufacturer: "Duotecno", platform: "ssoc"}, <API>{registerPlatformAccessories: adder});
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
// testing
|
package/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { API } from "homebridge";
|
|
1
2
|
import { Platform } from "./server/platform";
|
|
2
3
|
|
|
3
4
|
console.log("index.ts - running in directory: " + process.cwd());
|
|
4
5
|
|
|
5
|
-
module.exports = function (
|
|
6
|
+
module.exports = function (api: API) {
|
|
6
7
|
console.log("registering Duotecno Platform");
|
|
7
|
-
|
|
8
|
+
api.registerPlatform("homebridge-smartsystem", "DuotecnoPlatform", Platform);
|
|
8
9
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-smartsystem",
|
|
3
|
-
"displayname": "
|
|
4
|
-
"version": "
|
|
3
|
+
"displayname": "Duotecno Bridge",
|
|
4
|
+
"version": "6.0.2",
|
|
5
5
|
"description": "SmartServer (Proxy Websockets to TCP sockets, Smappee MQTT, Duotecno IP Nodes, Homekit interface)",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"author": "Johan Coppieters",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"watch": "npx tsc --build . --watch"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
|
-
"node": ">=
|
|
16
|
-
"homebridge": ">=
|
|
15
|
+
"node": ">=14.18.1",
|
|
16
|
+
"homebridge": ">=1.3.5"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
19
|
"websockets",
|
|
@@ -34,12 +34,13 @@
|
|
|
34
34
|
"mqtt": "^4.3.7",
|
|
35
35
|
"node-fetch": "^3.2.4",
|
|
36
36
|
"rpi-gpio": "^2.1.7",
|
|
37
|
-
"typescript": "^4.0.5",
|
|
38
37
|
"ws": "^7.4.6"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
40
|
"@types/mime-types": "^2.1.0",
|
|
42
|
-
"@types/node": "^
|
|
43
|
-
"@types/ws": "^6.0.4"
|
|
41
|
+
"@types/node": "^16.10.9",
|
|
42
|
+
"@types/ws": "^6.0.4",
|
|
43
|
+
"typescript": "^4.7.4",
|
|
44
|
+
"homebridge": "^1.3.9"
|
|
44
45
|
}
|
|
45
46
|
}
|
package/server/base.js
CHANGED
|
@@ -10,11 +10,11 @@ const types_1 = require("../duotecno/types");
|
|
|
10
10
|
class Base {
|
|
11
11
|
constructor(type, logger, config) {
|
|
12
12
|
this.type = type || "base";
|
|
13
|
+
this.logger = logger || console.log;
|
|
13
14
|
if (config)
|
|
14
15
|
this.config = config;
|
|
15
16
|
else
|
|
16
17
|
this.readConfig();
|
|
17
|
-
this.logger = logger || console.log;
|
|
18
18
|
// logger("==== read config -> ", JSON.stringify(this.config));
|
|
19
19
|
if (this.debug)
|
|
20
20
|
protocol_1.Protocol.setLogger(this.logger, this.logger);
|
|
@@ -30,7 +30,7 @@ class Base {
|
|
|
30
30
|
this.logger("[" + this.type + "] " + msg);
|
|
31
31
|
}
|
|
32
32
|
err(msg) {
|
|
33
|
-
this.logger("[" + this.type + "] *** " + types_1.now() + " *** " + msg + " ***");
|
|
33
|
+
this.logger("[" + this.type + "] *** " + (0, types_1.now)() + " *** " + msg + " ***");
|
|
34
34
|
}
|
|
35
35
|
//////////////////
|
|
36
36
|
// Config stuff //
|
|
@@ -43,7 +43,7 @@ class Base {
|
|
|
43
43
|
this.write(this.type, this.config);
|
|
44
44
|
}
|
|
45
45
|
read(type, fname = "") {
|
|
46
|
-
const fn = fname || ('
|
|
46
|
+
const fn = fname || (__dirname + 'config.' + type + '.json');
|
|
47
47
|
let config = null;
|
|
48
48
|
try {
|
|
49
49
|
const configBuf = fs.readFileSync(fn);
|
package/server/base.ts
CHANGED
|
@@ -15,13 +15,13 @@ export class Base {
|
|
|
15
15
|
|
|
16
16
|
constructor(type: string, logger?: LogFunction, config?) {
|
|
17
17
|
this.type = type || "base";
|
|
18
|
+
this.logger = logger || console.log;
|
|
19
|
+
|
|
18
20
|
if (config)
|
|
19
21
|
this.config = config;
|
|
20
22
|
else
|
|
21
23
|
this.readConfig();
|
|
22
24
|
|
|
23
|
-
this.logger = logger || console.log;
|
|
24
|
-
|
|
25
25
|
// logger("==== read config -> ", JSON.stringify(this.config));
|
|
26
26
|
|
|
27
27
|
if (this.debug)
|
|
@@ -57,7 +57,7 @@ export class Base {
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
read(type: string, fname: string = "") {
|
|
60
|
-
const fn = fname || ('
|
|
60
|
+
const fn = fname || (__dirname + 'config.' + type + '.json');
|
|
61
61
|
let config = null;
|
|
62
62
|
|
|
63
63
|
try {
|
package/server/platform.js
CHANGED
|
@@ -26,27 +26,27 @@ const socapp_1 = require("./socapp");
|
|
|
26
26
|
const door_1 = require("../accessories/door");
|
|
27
27
|
const lock_1 = require("../accessories/lock");
|
|
28
28
|
class Platform extends base_1.Base {
|
|
29
|
-
constructor(log, config,
|
|
29
|
+
constructor(log, config, api) {
|
|
30
30
|
// set debug to true for new config files
|
|
31
|
-
super("homebridge", log);
|
|
31
|
+
super("homebridge", log.info);
|
|
32
32
|
this.accessoryList = [];
|
|
33
33
|
this.ready = false;
|
|
34
34
|
this.startWaiting = 0;
|
|
35
35
|
this.config = Object.assign({}, config);
|
|
36
36
|
this.config.debug = (config && ("debug" in config)) ? config.debug : false;
|
|
37
|
-
log("running in directory: " + process.cwd());
|
|
38
|
-
log("with config:" + JSON.stringify(config, null, 2));
|
|
39
|
-
// log("homebridge object:",
|
|
40
|
-
this.
|
|
37
|
+
this.log("running in directory: " + process.cwd());
|
|
38
|
+
this.log("with config:" + JSON.stringify(config, null, 2));
|
|
39
|
+
// this.log("homebridge object:", api);
|
|
40
|
+
this.homebridgeAPI = api;
|
|
41
41
|
if (this.config.system) {
|
|
42
42
|
try {
|
|
43
|
-
this.system = new system_1.System(log, false);
|
|
43
|
+
this.system = new system_1.System(log.info, false);
|
|
44
44
|
this.system.openMasters(true);
|
|
45
45
|
this.system.emitter.on('ready', this.systemReady.bind(this));
|
|
46
46
|
this.system.emitter.on('update', this.updateState.bind(this));
|
|
47
47
|
}
|
|
48
48
|
catch (err) {
|
|
49
|
-
log(err);
|
|
49
|
+
this.log(err);
|
|
50
50
|
if (!this.system) {
|
|
51
51
|
this.log("platform - Can't run without a System.");
|
|
52
52
|
return;
|
|
@@ -60,7 +60,7 @@ class Platform extends base_1.Base {
|
|
|
60
60
|
// startup a Smappee MQTT subscriber, if one is configured
|
|
61
61
|
if (this.config.smappee) {
|
|
62
62
|
try {
|
|
63
|
-
this.smappee = new smappee_1.Smappee(this.system, log);
|
|
63
|
+
this.smappee = new smappee_1.Smappee(this.system, log.info);
|
|
64
64
|
}
|
|
65
65
|
catch (err) {
|
|
66
66
|
this.log(err);
|
|
@@ -75,7 +75,7 @@ class Platform extends base_1.Base {
|
|
|
75
75
|
// startup a smartApp if configured -> only on Raspberry's
|
|
76
76
|
if (this.config.smartapp) {
|
|
77
77
|
try {
|
|
78
|
-
this.smartapp = new smartapp_1.SmartApp(this.system, this.smappee, this, log, false);
|
|
78
|
+
this.smartapp = new smartapp_1.SmartApp(this.system, this.smappee, this, log.info, false);
|
|
79
79
|
this.smartapp.serve();
|
|
80
80
|
}
|
|
81
81
|
catch (err) {
|
|
@@ -92,7 +92,7 @@ class Platform extends base_1.Base {
|
|
|
92
92
|
if (this.config.socapp) {
|
|
93
93
|
try {
|
|
94
94
|
// reuse the config file from the smartapp
|
|
95
|
-
this.smartsoc = new socapp_1.SocApp(this.system, 'smartapp', log);
|
|
95
|
+
this.smartsoc = new socapp_1.SocApp(this.system, 'smartapp', log.info);
|
|
96
96
|
this.smartsoc.serve();
|
|
97
97
|
}
|
|
98
98
|
catch (err) {
|
|
@@ -130,6 +130,7 @@ class Platform extends base_1.Base {
|
|
|
130
130
|
const kMaxWaiting = 5 * 60;
|
|
131
131
|
const inConfig = this.system.activeUnitsConfig().length;
|
|
132
132
|
const inSystem = this.system.allActiveUnits().length;
|
|
133
|
+
this.ready = (inSystem == inConfig);
|
|
133
134
|
if (this.ready) {
|
|
134
135
|
this.log("=== running after timeout of " + this.startWaiting + " secs --> " +
|
|
135
136
|
inSystem + " == " + inConfig + " units -> " + (inConfig == inSystem) + ", will start in 10 seconds ===");
|
|
@@ -174,34 +175,34 @@ class Platform extends base_1.Base {
|
|
|
174
175
|
this.log("adding accessory: " + unit.getDescription());
|
|
175
176
|
switch (unit.getType()) {
|
|
176
177
|
case types_1.UnitExtendedType.kDimmer:
|
|
177
|
-
this.accessoryList.push(new dimmer_1.Dimmer(logger, this.
|
|
178
|
+
this.accessoryList.push(new dimmer_1.Dimmer(logger, this.homebridgeAPI, unit));
|
|
178
179
|
break;
|
|
179
180
|
case types_1.UnitExtendedType.kSwitch:
|
|
180
|
-
this.accessoryList.push(new switch_1.Switch(logger, this.
|
|
181
|
+
this.accessoryList.push(new switch_1.Switch(logger, this.homebridgeAPI, unit));
|
|
181
182
|
break;
|
|
182
183
|
case types_1.UnitExtendedType.kLightbulb:
|
|
183
|
-
this.accessoryList.push(new bulb_1.Bulb(logger, this.
|
|
184
|
+
this.accessoryList.push(new bulb_1.Bulb(logger, this.homebridgeAPI, unit));
|
|
184
185
|
break;
|
|
185
186
|
case types_1.UnitExtendedType.kSwitchingMotor:
|
|
186
|
-
this.accessoryList.push(new windowcovering_1.WindowCovering(logger, this.
|
|
187
|
+
this.accessoryList.push(new windowcovering_1.WindowCovering(logger, this.homebridgeAPI, unit));
|
|
187
188
|
break;
|
|
188
189
|
case types_1.UnitExtendedType.kGarageDoor:
|
|
189
|
-
this.accessoryList.push(new garagedoor_1.GarageDoor(logger, this.
|
|
190
|
+
this.accessoryList.push(new garagedoor_1.GarageDoor(logger, this.homebridgeAPI, unit));
|
|
190
191
|
break;
|
|
191
192
|
case types_1.UnitExtendedType.kDoor:
|
|
192
|
-
this.accessoryList.push(new door_1.Door(logger, this.
|
|
193
|
+
this.accessoryList.push(new door_1.Door(logger, this.homebridgeAPI, unit));
|
|
193
194
|
break;
|
|
194
195
|
case types_1.UnitExtendedType.kLock:
|
|
195
196
|
case types_1.UnitExtendedType.kUnlocker:
|
|
196
|
-
this.accessoryList.push(new lock_1.Lock(logger, this.
|
|
197
|
+
this.accessoryList.push(new lock_1.Lock(logger, this.homebridgeAPI, unit));
|
|
197
198
|
break;
|
|
198
199
|
case types_1.UnitExtendedType.kMood:
|
|
199
200
|
case types_1.UnitExtendedType.kCondition:
|
|
200
201
|
case types_1.UnitExtendedType.kInput:
|
|
201
|
-
this.accessoryList.push(new mood_1.Mood(logger, this.
|
|
202
|
+
this.accessoryList.push(new mood_1.Mood(logger, this.homebridgeAPI, unit));
|
|
202
203
|
break;
|
|
203
204
|
case types_1.UnitExtendedType.kTemperature:
|
|
204
|
-
this.accessoryList.push(new temperature_1.Temperature(logger, this.
|
|
205
|
+
this.accessoryList.push(new temperature_1.Temperature(logger, this.homebridgeAPI, unit));
|
|
205
206
|
break;
|
|
206
207
|
default:
|
|
207
208
|
this.log("platform - addAccessories: accessory type not yet supported: " + unit.typeName() +
|
package/server/platform.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LogFunction, PlatformConfig, UnitExtendedType } from "../duotecno/types";
|
|
2
|
+
import { API, Logger } from "homebridge";
|
|
2
3
|
import { System } from "../duotecno/system";
|
|
3
4
|
import { Smappee } from "./smappee";
|
|
4
5
|
import { SmartApp } from "./smartapp";
|
|
@@ -18,7 +19,7 @@ import { Lock } from "../accessories/lock";
|
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
export class Platform extends Base {
|
|
21
|
-
|
|
22
|
+
homebridgeAPI: API;
|
|
22
23
|
config: PlatformConfig;
|
|
23
24
|
system: System;
|
|
24
25
|
smappee: Smappee;
|
|
@@ -28,29 +29,29 @@ export class Platform extends Base {
|
|
|
28
29
|
ready = false;
|
|
29
30
|
startWaiting = 0;
|
|
30
31
|
|
|
31
|
-
constructor(log:
|
|
32
|
+
constructor(log: Logger, config: PlatformConfig, api: API) {
|
|
32
33
|
// set debug to true for new config files
|
|
33
|
-
super("homebridge", log);
|
|
34
|
+
super("homebridge", log.info);
|
|
34
35
|
|
|
35
36
|
this.config = {... config};
|
|
36
37
|
this.config.debug = (config && ("debug" in config)) ? config.debug : false;
|
|
37
38
|
|
|
38
|
-
log("running in directory: " + process.cwd());
|
|
39
|
-
log("with config:" + JSON.stringify(config, null, 2));
|
|
40
|
-
// log("homebridge object:",
|
|
39
|
+
this.log("running in directory: " + process.cwd());
|
|
40
|
+
this.log("with config:" + JSON.stringify(config, null, 2));
|
|
41
|
+
// this.log("homebridge object:", api);
|
|
41
42
|
|
|
42
|
-
this.
|
|
43
|
+
this.homebridgeAPI = api;
|
|
43
44
|
|
|
44
45
|
if (this.config.system) {
|
|
45
46
|
try {
|
|
46
|
-
this.system = new System(log, false);
|
|
47
|
+
this.system = new System(log.info, false);
|
|
47
48
|
this.system.openMasters(true);
|
|
48
49
|
|
|
49
50
|
this.system.emitter.on('ready', this.systemReady.bind(this));
|
|
50
51
|
this.system.emitter.on('update', this.updateState.bind(this));
|
|
51
52
|
|
|
52
53
|
} catch(err) {
|
|
53
|
-
log(err);
|
|
54
|
+
this.log(err);
|
|
54
55
|
if (!this.system) {
|
|
55
56
|
this.log("platform - Can't run without a System.");
|
|
56
57
|
return;
|
|
@@ -64,7 +65,7 @@ export class Platform extends Base {
|
|
|
64
65
|
// startup a Smappee MQTT subscriber, if one is configured
|
|
65
66
|
if (this.config.smappee) {
|
|
66
67
|
try {
|
|
67
|
-
this.smappee = new Smappee(this.system, log);
|
|
68
|
+
this.smappee = new Smappee(this.system, log.info);
|
|
68
69
|
|
|
69
70
|
} catch(err) {
|
|
70
71
|
this.log(err);
|
|
@@ -79,7 +80,7 @@ export class Platform extends Base {
|
|
|
79
80
|
// startup a smartApp if configured -> only on Raspberry's
|
|
80
81
|
if (this.config.smartapp) {
|
|
81
82
|
try {
|
|
82
|
-
this.smartapp = new SmartApp(this.system, this.smappee, this, log, false);
|
|
83
|
+
this.smartapp = new SmartApp(this.system, this.smappee, this, log.info, false);
|
|
83
84
|
this.smartapp.serve();
|
|
84
85
|
|
|
85
86
|
} catch(err) {
|
|
@@ -96,7 +97,7 @@ export class Platform extends Base {
|
|
|
96
97
|
if (this.config.socapp) {
|
|
97
98
|
try {
|
|
98
99
|
// reuse the config file from the smartapp
|
|
99
|
-
this.smartsoc = new SocApp(this.system, 'smartapp', log);
|
|
100
|
+
this.smartsoc = new SocApp(this.system, 'smartapp', log.info);
|
|
100
101
|
this.smartsoc.serve();
|
|
101
102
|
|
|
102
103
|
} catch(err) {
|
|
@@ -139,6 +140,7 @@ export class Platform extends Base {
|
|
|
139
140
|
const kMaxWaiting = 5 * 60;
|
|
140
141
|
const inConfig = this.system.activeUnitsConfig().length;
|
|
141
142
|
const inSystem = this.system.allActiveUnits().length;
|
|
143
|
+
this.ready = (inSystem == inConfig);
|
|
142
144
|
|
|
143
145
|
if (this.ready) {
|
|
144
146
|
this.log("=== running after timeout of " + this.startWaiting + " secs --> " +
|
|
@@ -189,42 +191,42 @@ export class Platform extends Base {
|
|
|
189
191
|
this.log("adding accessory: " + unit.getDescription());
|
|
190
192
|
switch (unit.getType()) {
|
|
191
193
|
case UnitExtendedType.kDimmer:
|
|
192
|
-
this.accessoryList.push( new Dimmer(logger, this.
|
|
194
|
+
this.accessoryList.push( new Dimmer(logger, this.homebridgeAPI, unit) );
|
|
193
195
|
break;
|
|
194
196
|
|
|
195
197
|
case UnitExtendedType.kSwitch:
|
|
196
|
-
this.accessoryList.push( new Switch(logger, this.
|
|
198
|
+
this.accessoryList.push( new Switch(logger, this.homebridgeAPI, unit) );
|
|
197
199
|
break;
|
|
198
200
|
|
|
199
201
|
case UnitExtendedType.kLightbulb:
|
|
200
|
-
this.accessoryList.push( new Bulb(logger, this.
|
|
202
|
+
this.accessoryList.push( new Bulb(logger, this.homebridgeAPI, unit) );
|
|
201
203
|
break;
|
|
202
204
|
|
|
203
205
|
case UnitExtendedType.kSwitchingMotor:
|
|
204
|
-
this.accessoryList.push( new WindowCovering(logger, this.
|
|
206
|
+
this.accessoryList.push( new WindowCovering(logger, this.homebridgeAPI, unit) );
|
|
205
207
|
break;
|
|
206
208
|
|
|
207
209
|
case UnitExtendedType.kGarageDoor:
|
|
208
|
-
this.accessoryList.push( new GarageDoor(logger, this.
|
|
210
|
+
this.accessoryList.push( new GarageDoor(logger, this.homebridgeAPI, unit) );
|
|
209
211
|
break;
|
|
210
212
|
|
|
211
213
|
case UnitExtendedType.kDoor:
|
|
212
|
-
this.accessoryList.push( new Door(logger, this.
|
|
214
|
+
this.accessoryList.push( new Door(logger, this.homebridgeAPI, unit) );
|
|
213
215
|
break;
|
|
214
216
|
|
|
215
217
|
case UnitExtendedType.kLock:
|
|
216
218
|
case UnitExtendedType.kUnlocker:
|
|
217
|
-
this.accessoryList.push( new Lock(logger, this.
|
|
219
|
+
this.accessoryList.push( new Lock(logger, this.homebridgeAPI, unit) );
|
|
218
220
|
break;
|
|
219
221
|
|
|
220
222
|
case UnitExtendedType.kMood:
|
|
221
223
|
case UnitExtendedType.kCondition:
|
|
222
224
|
case UnitExtendedType.kInput:
|
|
223
|
-
this.accessoryList.push( new Mood(logger, this.
|
|
225
|
+
this.accessoryList.push( new Mood(logger, this.homebridgeAPI, unit) );
|
|
224
226
|
break;
|
|
225
227
|
|
|
226
228
|
case UnitExtendedType.kTemperature:
|
|
227
|
-
this.accessoryList.push( new Temperature(logger, this.
|
|
229
|
+
this.accessoryList.push( new Temperature(logger, this.homebridgeAPI, unit) );
|
|
228
230
|
break;
|
|
229
231
|
|
|
230
232
|
default:
|
package/server/smartapp.js
CHANGED
|
@@ -19,7 +19,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.SmartApp = void 0;
|
|
22
|
-
const os_1 = require("os");
|
|
23
22
|
const webapp_1 = require("./webapp");
|
|
24
23
|
const types_1 = require("../duotecno/types");
|
|
25
24
|
const protocol_1 = require("../duotecno/protocol");
|
|
@@ -53,7 +52,7 @@ const kAccessoryPins = {
|
|
|
53
52
|
"577-03-010": "CC:22:3D:E3:A1:0A"
|
|
54
53
|
};
|
|
55
54
|
// Mac file system -> write locally
|
|
56
|
-
const isMac = fs_1.existsSync("/Volumes");
|
|
55
|
+
const isMac = (0, fs_1.existsSync)("/Volumes");
|
|
57
56
|
const kDHCPConfigFile = isMac ? "./config.dhcpcd" : "/etc/dhcpcd.conf";
|
|
58
57
|
var ContentType;
|
|
59
58
|
(function (ContentType) {
|
|
@@ -187,7 +186,7 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
187
186
|
let unit = null;
|
|
188
187
|
let logicalNodeAddress, logicalAddress;
|
|
189
188
|
let name = context.getParam({ name: "unit" + boundary, type: "string", default: "--" });
|
|
190
|
-
const value = types_1.actionValue(context.getParam({ name: "value" + boundary, type: "string", default: "0" }));
|
|
189
|
+
const value = (0, types_1.actionValue)(context.getParam({ name: "value" + boundary, type: "string", default: "0" }));
|
|
191
190
|
// hex addresses or name
|
|
192
191
|
if ((name[0] === "0") && (name[1] === "x")) {
|
|
193
192
|
({ logicalNodeAddress, logicalAddress } = context.addr(name));
|
|
@@ -245,7 +244,7 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
245
244
|
writeDHCP(context, config) {
|
|
246
245
|
try {
|
|
247
246
|
this.resetDHCP(context);
|
|
248
|
-
fs_1.writeFileSync(kDHCPConfigFile, this.DHCPdFile(config.network));
|
|
247
|
+
(0, fs_1.writeFileSync)(kDHCPConfigFile, this.DHCPdFile(config.network));
|
|
249
248
|
}
|
|
250
249
|
catch (err) {
|
|
251
250
|
context.message = JSON.stringify(err);
|
|
@@ -253,8 +252,8 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
253
252
|
}
|
|
254
253
|
resetDHCP(context) {
|
|
255
254
|
try {
|
|
256
|
-
if (fs_1.existsSync(kDHCPConfigFile))
|
|
257
|
-
fs_1.truncateSync(kDHCPConfigFile);
|
|
255
|
+
if ((0, fs_1.existsSync)(kDHCPConfigFile))
|
|
256
|
+
(0, fs_1.truncateSync)(kDHCPConfigFile);
|
|
258
257
|
}
|
|
259
258
|
catch (err) {
|
|
260
259
|
context.message = JSON.stringify(err);
|
|
@@ -283,7 +282,7 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
283
282
|
doRequest: { get: () => super.doRequest }
|
|
284
283
|
});
|
|
285
284
|
return __awaiter(this, void 0, void 0, function* () {
|
|
286
|
-
const kDir =
|
|
285
|
+
const kDir = "./";
|
|
287
286
|
const kFN = kDir + "config.json";
|
|
288
287
|
let message;
|
|
289
288
|
let config;
|
|
@@ -297,8 +296,8 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
297
296
|
}
|
|
298
297
|
else if (context.action === "save") {
|
|
299
298
|
const bridge = this.scrapePlatformConfig(context);
|
|
300
|
-
if (!fs_1.existsSync(kDir))
|
|
301
|
-
fs_1.mkdirSync(kDir);
|
|
299
|
+
if (!(0, fs_1.existsSync)(kDir))
|
|
300
|
+
(0, fs_1.mkdirSync)(kDir);
|
|
302
301
|
config = this.read("homebridge", kFN);
|
|
303
302
|
config.bridge = bridge;
|
|
304
303
|
this.log("writing config");
|
|
@@ -424,7 +423,7 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
424
423
|
swtch.status = swtch.unit.status;
|
|
425
424
|
}
|
|
426
425
|
else {
|
|
427
|
-
this.log("** error ** missing unit: " + types_1.hex(swtch.logicalNodeAddress) + "/" + types_1.hex(swtch.logicalAddress) + " **");
|
|
426
|
+
this.log("** error ** missing unit: " + (0, types_1.hex)(swtch.logicalNodeAddress) + "/" + (0, types_1.hex)(swtch.logicalAddress) + " **");
|
|
428
427
|
}
|
|
429
428
|
}
|
|
430
429
|
});
|
package/server/smartapp.ts
CHANGED
|
@@ -302,7 +302,7 @@ export class SmartApp extends WebApp {
|
|
|
302
302
|
// Homekit //
|
|
303
303
|
//////////////////////////////
|
|
304
304
|
async doHomekit(context: Context): Promise<HttpResponse> {
|
|
305
|
-
const kDir =
|
|
305
|
+
const kDir = "./";
|
|
306
306
|
const kFN = kDir + "config.json";
|
|
307
307
|
let message;
|
|
308
308
|
let config;
|
package/server/somfy.js
CHANGED
|
@@ -36,7 +36,7 @@ function setlogger(logF) {
|
|
|
36
36
|
}
|
|
37
37
|
exports.setlogger = setlogger;
|
|
38
38
|
function myLogger(msg) {
|
|
39
|
-
console.log("[" + types_1.now() + "] [somfy] " + msg);
|
|
39
|
+
console.log("[" + (0, types_1.now)() + "] [somfy] " + msg);
|
|
40
40
|
}
|
|
41
41
|
function mS(nr) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -75,7 +75,8 @@ function toggle(pin) {
|
|
|
75
75
|
}
|
|
76
76
|
function selected(screen) {
|
|
77
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
const screens = [false,
|
|
78
|
+
const screens = [false,
|
|
79
|
+
!(yield gpio.read(sScreen1)),
|
|
79
80
|
!(yield gpio.read(sScreen2)),
|
|
80
81
|
!(yield gpio.read(sScreen3)),
|
|
81
82
|
!(yield gpio.read(sScreen4))];
|
package/server/webapp.js
CHANGED
|
@@ -215,7 +215,7 @@ class WebApp extends base_1.Base {
|
|
|
215
215
|
this.server.listen(this.port, onConnected);
|
|
216
216
|
}
|
|
217
217
|
addFile(name, filename, type, enc) {
|
|
218
|
-
this.addContent(name, fs.readFileSync(filename, enc || 'utf-8'), type || "text/html", filename);
|
|
218
|
+
this.addContent(name, fs.readFileSync(filename, { encoding: enc || 'utf-8' }), type || "text/html", filename);
|
|
219
219
|
}
|
|
220
220
|
addContent(name, content, type, filename) {
|
|
221
221
|
this.files[name] = { content, type, filename };
|
|
@@ -322,7 +322,7 @@ class WebApp extends base_1.Base {
|
|
|
322
322
|
// 2) add file to sudo
|
|
323
323
|
// sudo /etc/sudoers.d/mysudoersfile
|
|
324
324
|
return new Promise((resolve, reject) => {
|
|
325
|
-
child_process_1.exec("sudo shutdown -r now", (error, stdout, stderr) => {
|
|
325
|
+
(0, child_process_1.exec)("sudo shutdown -r now", (error, stdout, stderr) => {
|
|
326
326
|
if (error) {
|
|
327
327
|
// context.message = stderr;
|
|
328
328
|
// console.log("error shutting down: ", error, stdout, stderr);
|
package/server/webapp.ts
CHANGED
|
@@ -269,8 +269,8 @@ export class WebApp extends Base {
|
|
|
269
269
|
this.server.listen(this.port, onConnected);
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
addFile(name: string, filename: string, type?: string, enc?:
|
|
273
|
-
this.addContent(name, fs.readFileSync(filename, enc || 'utf-8'), type || "text/html", filename);
|
|
272
|
+
addFile(name: string, filename: string, type?: string, enc?: BufferEncoding) {
|
|
273
|
+
this.addContent(name, fs.readFileSync(filename, {encoding: enc || 'utf-8'}), type || "text/html", filename);
|
|
274
274
|
}
|
|
275
275
|
addContent(name: string, content: string, type: string, filename: string) {
|
|
276
276
|
this.files[name] = { content, type, filename };
|