diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index c5c85ad..0000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,163 +0,0 @@
-module.exports = {
- env: {
- es6: true,
- node: true
- },
- extends: ['eslint:recommended', 'plugin:prettier/recommended'],
- plugins: [],
- ignorePatterns: ['**/doc', '**/build', 'admin/'],
- reportUnusedDisableDirectives: true,
- rules: {
- /* pretier takes care of these two rules
- indent: [
- 'error',
- 4,
- {
- SwitchCase: 1
- }
- ],
- 'array-element-newline': [
- 'error',
- {
- ArrayExpression: 'consistent',
- ArrayPattern: { minItems: 3 }
- }
- ],*/
- curly: 'error',
- 'brace-style': 'error',
- 'arrow-parens': ['error', 'as-needed'],
- 'no-console': 'off',
- 'no-unused-vars': ['error', { argsIgnorePattern: '^_', caughtErrors: 'all' }],
- 'no-useless-escape': 'warn',
- 'no-constant-condition': 'off',
- 'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }],
- 'no-var': 'error',
- 'prefer-const': 'error',
- 'no-throw-literal': 'error',
- 'prefer-promise-reject-errors': 'error',
- 'require-await': 'error',
- 'no-return-await': 'error',
- eqeqeq: ['error', 'always'],
- quotes: [
- 'error',
- 'single',
- {
- avoidEscape: true,
- allowTemplateLiterals: true
- }
- ],
- semi: ['error', 'always'],
- 'comma-dangle': [
- 'error',
- {
- arrays: 'never',
- objects: 'never',
- imports: 'never',
- exports: 'never',
- functions: 'ignore'
- }
- ],
- 'no-trailing-spaces': 'error',
- 'prettier/prettier': 'error',
- 'no-nested-ternary': 'off', // maybe turn this on later
- 'no-unneeded-ternary': 'error'
- },
- parserOptions: {
- ecmaVersion: 2019
- },
- overrides: [
- // we need ts parser for ts files
- {
- parser: '@typescript-eslint/parser',
- parserOptions: {
- ecmaVersion: 2019,
- sourceType: 'module',
- project: './tsconfig.json'
- },
- files: ['**/*.ts', '**/*.tsx'],
- extends: ['plugin:@typescript-eslint/recommended'],
- rules: {
- '@typescript-eslint/no-parameter-properties': 'off',
- '@typescript-eslint/no-explicit-any': 'off',
- '@typescript-eslint/no-use-before-define': [
- 'error',
- {
- functions: false,
- typedefs: false,
- classes: false
- }
- ],
- '@typescript-eslint/no-unused-vars': [
- 'error',
- {
- ignoreRestSiblings: true,
- argsIgnorePattern: '^_'
- }
- ],
- '@typescript-eslint/no-object-literal-type-assertion': 'off',
- '@typescript-eslint/interface-name-prefix': 'off',
- '@typescript-eslint/no-non-null-assertion': 'off', // This is necessary for Map.has()/get()!
- '@typescript-eslint/no-inferrable-types': [
- 'error',
- {
- ignoreProperties: true,
- ignoreParameters: true
- }
- ],
- '@typescript-eslint/ban-ts-comment': [
- 'error',
- {
- 'ts-expect-error': false,
- 'ts-ignore': true,
- 'ts-nocheck': true,
- 'ts-check': false
- }
- ],
- '@typescript-eslint/restrict-template-expressions': [
- 'error',
- {
- allowNumber: true,
- allowBoolean: true,
- // This is necessary to log errors
- // TODO: Consider switching to false when we may annotate catch clauses
- allowAny: true,
- allowNullish: true
- }
- ],
- '@typescript-eslint/no-misused-promises': [
- 'error',
- {
- checksVoidReturn: false
- }
- ],
- // We can turn this on from time to time but in general these rules
- // make our lives harder instead of easier
- '@typescript-eslint/no-unsafe-argument': 'off',
- '@typescript-eslint/no-unsafe-assignment': 'off',
- '@typescript-eslint/no-unsafe-member-access': 'off',
- '@typescript-eslint/no-unsafe-return': 'off',
- '@typescript-eslint/no-unsafe-call': 'off',
-
- // Although this rule makes sense, it takes about a second to execute (and we don't need it)
- '@typescript-eslint/no-implied-eval': 'off',
-
- '@typescript-eslint/explicit-module-boundary-types': [
- 'warn',
- { allowArgumentsExplicitlyTypedAsAny: true }
- ],
- '@typescript-eslint/no-this-alias': 'off',
-
- // Prefer simple property access and declaration without quotes
- 'dot-notation': 'off',
- '@typescript-eslint/dot-notation': [
- 'error',
- {
- allowPrivateClassPropertyAccess: true,
- allowProtectedClassPropertyAccess: true
- }
- ],
- 'quote-props': ['error', 'as-needed']
- }
- }
- ]
-};
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..c7591ae
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,100 @@
+{
+ "root": true,
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "ecmaVersion": 2018,
+ "sourceType": "module",
+ "project": "./tsconfig.json"
+ },
+ "extends": [
+ "plugin:@typescript-eslint/recommended",
+ "plugin:prettier/recommended"
+ ],
+ "plugins": [],
+ "rules": {
+ "@typescript-eslint/no-parameter-properties": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-use-before-define": [
+ "error",
+ {
+ "functions": false,
+ "typedefs": false,
+ "classes": false
+ }
+ ],
+ "@typescript-eslint/no-unused-vars": [
+ "error",
+ {
+ "ignoreRestSiblings": true,
+ "argsIgnorePattern": "^_"
+ }
+ ],
+ "@typescript-eslint/explicit-function-return-type": [
+ "warn",
+ {
+ "allowExpressions": true,
+ "allowTypedFunctionExpressions": true
+ }
+ ],
+ "@typescript-eslint/no-object-literal-type-assertion": "off",
+ "@typescript-eslint/interface-name-prefix": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "no-var": "error",
+ "prefer-const": "error",
+ "no-trailing-spaces": "error",
+ "curly": "error",
+ "brace-style": "error",
+ "arrow-parens": [
+ "error",
+ "as-needed"
+ ],
+ "no-console": "off",
+ "no-unused-vars": [
+ "error",
+ {
+ "argsIgnorePattern": "^_",
+ "caughtErrors": "all"
+ }
+ ],
+ "no-useless-escape": "warn",
+ "no-constant-condition": "off",
+ "no-multiple-empty-lines": [
+ "error",
+ {
+ "max": 1,
+ "maxEOF": 1
+ }
+ ],
+ "no-throw-literal": "error",
+ "prefer-promise-reject-errors": "error",
+ "no-return-await": "error",
+ "eqeqeq": [
+ "error",
+ "always"
+ ],
+ "semi": [
+ "error",
+ "always"
+ ],
+ "comma-dangle": [
+ "error",
+ {
+ "arrays": "never",
+ "objects": "never",
+ "imports": "never",
+ "exports": "never",
+ "functions": "ignore"
+ }
+ ]
+ },
+ "overrides": [
+ {
+ "files": [
+ "*.test.ts"
+ ],
+ "rules": {
+ "@typescript-eslint/explicit-function-return-type": "off"
+ }
+ }
+ ]
+}
diff --git a/README.md b/README.md
index f8792ea..c10ecd6 100644
--- a/README.md
+++ b/README.md
@@ -908,6 +908,11 @@ The adapter is tested with an DENON AVR-X1200W and a Marantz SR5009.
Placeholder for the next version (at the beginning of the line):
### __WORK IN PROGRESS__
-->
+
+### __WORK IN PROGRESS__
+* (foxriver76) typescript port
+* (foxriver76) fixed issues with decoding of input state
+
### 1.13.4 (2022-04-11)
* (foxriver76) we now respect `requestInterval` on determining the AVR model too
diff --git a/build/lib/states.d.ts b/build/lib/states.d.ts
new file mode 100644
index 0000000..031e0ad
--- /dev/null
+++ b/build/lib/states.d.ts
@@ -0,0 +1,7 @@
+///
+export declare const commonCommands: ioBroker.AnyObject[];
+export declare const usCommandsZone: ioBroker.StateObject[];
+export declare const usCommands: ioBroker.StateObject[];
+export declare const lfcCommands: Record;
+export declare const subwooferTwoStates: Record;
+export declare const displayHttpStates: Record;
diff --git a/build/lib/states.js b/build/lib/states.js
new file mode 100644
index 0000000..d9bd7ea
--- /dev/null
+++ b/build/lib/states.js
@@ -0,0 +1,1402 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.displayHttpStates = exports.subwooferTwoStates = exports.lfcCommands = exports.usCommands = exports.usCommandsZone = exports.commonCommands = void 0;
+exports.commonCommands = [
+ {
+ _id: 'info.friendlyName',
+ type: 'state',
+ common: {
+ role: 'info.name',
+ name: 'Friendly Name',
+ type: 'string',
+ read: true,
+ write: false
+ },
+ native: {}
+ },
+ {
+ _id: 'tuner',
+ type: 'channel',
+ common: {
+ name: 'Tuner'
+ },
+ native: {}
+ },
+ {
+ _id: 'tuner.frequencyUp',
+ type: 'state',
+ common: {
+ name: 'Tuner Frequency Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'tuner.frequencyDown',
+ type: 'state',
+ common: {
+ name: 'Tuner Frequency Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'tuner.stationName',
+ type: 'state',
+ common: {
+ name: 'Tuner Station Name',
+ role: 'text',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'tuner.frequency',
+ type: 'state',
+ common: {
+ name: 'Tuner Frequency',
+ role: 'value',
+ type: 'number',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain',
+ type: 'channel',
+ common: {
+ name: 'Main Zone'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.powerZone',
+ type: 'state',
+ common: {
+ name: 'Main Zone Power State',
+ role: 'switch.power.zone',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.volume',
+ type: 'state',
+ common: {
+ name: 'Main Volume',
+ role: 'level.volume',
+ type: 'number',
+ read: true,
+ write: true,
+ min: 0,
+ max: 98
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.volumeUp',
+ type: 'state',
+ common: {
+ name: 'Volume Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.volumeDown',
+ type: 'state',
+ common: {
+ name: 'Volume Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.selectInput',
+ type: 'state',
+ common: {
+ name: 'Select input',
+ role: 'media.input',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'PHONO',
+ 1: 'CD',
+ 2: 'TUNER',
+ 3: 'DVD',
+ 4: 'BD',
+ 5: 'TV',
+ 6: 'SAT/CBL',
+ 7: 'MPLAY',
+ 8: 'GAME',
+ 9: 'NET',
+ 10: 'SPOTIFY',
+ 11: 'LASTFM',
+ 12: 'IRADIO',
+ 13: 'SERVER',
+ 14: 'FAVORITES',
+ 15: 'AUX1',
+ 16: 'AUX2',
+ 17: 'AUX3',
+ 18: 'AUX4',
+ 19: 'AUX5',
+ 20: 'AUX6',
+ 21: 'AUX7',
+ 22: 'BT',
+ 23: 'USB'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.playPause',
+ type: 'state',
+ common: {
+ name: 'Play/Pause',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.play',
+ type: 'state',
+ common: {
+ name: 'Play',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.pause',
+ type: 'state',
+ common: {
+ name: 'Pause',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.skipPlus',
+ type: 'state',
+ common: {
+ name: 'Next',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.skipMinus',
+ type: 'state',
+ common: {
+ name: 'Previous',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.maximumVolume',
+ type: 'state',
+ common: {
+ name: 'Maximum Volume',
+ role: 'state',
+ type: 'number',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.muteIndicator',
+ type: 'state',
+ common: {
+ name: 'Muted',
+ role: 'media.mute',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.quickSelect',
+ type: 'state',
+ common: {
+ name: 'Quick select',
+ role: 'media.quickSelect',
+ type: 'number',
+ write: true,
+ read: true,
+ min: 1,
+ max: 5
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.sleepTimer',
+ type: 'state',
+ common: {
+ name: 'Sleep timer',
+ role: 'level.timer.sleep',
+ unit: 'min',
+ type: 'number',
+ write: true,
+ read: true,
+ min: 0,
+ max: 120
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerBass',
+ type: 'state',
+ common: {
+ name: 'Bass Level',
+ role: 'level.bass',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: -6,
+ max: 6
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerBassUp',
+ type: 'state',
+ common: {
+ name: 'Bass Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerBassDown',
+ type: 'state',
+ common: {
+ name: 'Bass Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerTreble',
+ type: 'state',
+ common: {
+ name: 'Treble Level',
+ role: 'level.treble',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: -6,
+ max: 6
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerTrebleUp',
+ type: 'state',
+ common: {
+ name: 'Treble Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerTrebleDown',
+ type: 'state',
+ common: {
+ name: 'Treble Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: -12,
+ max: 12
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeCenter',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Center',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundDolbyRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Dolby Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundDolbyLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Dolby Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontDolbyLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Dolby Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontDolbyRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Dolby Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontHeightLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Height Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontHeightRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Height Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeRearHeightLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Rear Height Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeRearHeightRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Rear Height Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundHeightRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Height Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundHeightLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Height Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSubwoofer',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Subwoofer',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSubwooferTwo',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Subwoofer Two',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.volumeDB',
+ type: 'state',
+ common: {
+ name: 'Main Volume DB',
+ role: 'level.volume.main',
+ type: 'number',
+ read: true,
+ write: true,
+ min: -80,
+ max: 18,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.maximumVolumeDB',
+ type: 'state',
+ common: {
+ name: 'Maximum Volume DB',
+ role: 'state',
+ type: 'number',
+ write: false,
+ read: true,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.surroundMode',
+ type: 'state',
+ common: {
+ name: 'Surround mode',
+ role: 'state',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'STEREO',
+ 1: 'VIRTUAL',
+ 2: 'VIDEO GAME',
+ 3: 'MCH STEREO',
+ 4: 'DTS SURROUND',
+ 5: 'DOLBY DIGITAL',
+ 6: 'MOVIE',
+ 7: 'MUSIC',
+ 8: 'DIRECT',
+ 9: 'PURE DIRECT',
+ 10: 'AUTO',
+ 11: 'GAME',
+ 12: 'AURO3D',
+ 13: 'AURO2DSURR',
+ 14: 'WIDE SCREEN',
+ 15: 'SUPER STADIUM',
+ 16: 'ROCK ARENA',
+ 17: 'JAZZ CLUB',
+ 18: 'CLASSIC CONCERT',
+ 19: 'MONO MOVIE',
+ 20: 'MATRIX'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.dynamicEq',
+ type: 'state',
+ common: {
+ name: 'Dynamic Eq',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.subwooferLevelState',
+ type: 'state',
+ common: {
+ name: 'Subwoofer Level State',
+ desc: 'Subwoofer Level State',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.subwooferLevel',
+ type: 'state',
+ common: {
+ name: 'Subwoofer Level',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.subwooferLevelUp',
+ type: 'state',
+ common: {
+ name: 'Subwoofer level Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.subwooferLevelDown',
+ type: 'state',
+ common: {
+ name: 'Subwoofer level Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.multEq',
+ type: 'state',
+ common: {
+ name: 'Mult EQ',
+ role: 'level',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'OFF',
+ 1: 'AUDYSSEY',
+ 2: 'BYP.LR',
+ 3: 'FLAT',
+ 4: 'MANUAL'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.dynamicVolume',
+ type: 'state',
+ common: {
+ name: 'Dynamic Volume',
+ role: 'level',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'OFF',
+ 1: 'LIT',
+ 2: 'MED',
+ 3: 'HEV'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.referenceLevelOffset',
+ type: 'state',
+ common: {
+ name: 'Reference Level Offset',
+ role: 'level',
+ type: 'string',
+ write: true,
+ read: true,
+ unit: 'dB',
+ states: {
+ 0: '0',
+ 5: '5',
+ 10: '10',
+ 15: '15'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.toneControl',
+ type: 'state',
+ common: {
+ name: 'Tone Control',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.cursorUp',
+ type: 'state',
+ common: {
+ name: 'Cursor Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.cursorDown',
+ type: 'state',
+ common: {
+ name: 'Cursor Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.cursorRight',
+ type: 'state',
+ common: {
+ name: 'Cursor Right',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.cursorLeft',
+ type: 'state',
+ common: {
+ name: 'Cursor Left',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.enter',
+ type: 'state',
+ common: {
+ name: 'Enter',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.return',
+ type: 'state',
+ common: {
+ name: 'Return',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.option',
+ type: 'state',
+ common: {
+ name: 'Option',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.info',
+ type: 'state',
+ common: {
+ name: 'Info',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.setupMenu',
+ type: 'state',
+ common: {
+ name: 'Setup Menu',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.centerSpread',
+ type: 'state',
+ common: {
+ name: 'Center Spread',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'info.onlinePresets',
+ type: 'state',
+ common: {
+ name: 'Net Audio Presets',
+ role: 'presets.json',
+ type: 'string',
+ write: false,
+ read: true,
+ def: '{}'
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.savePreset',
+ type: 'state',
+ common: {
+ name: 'Save Net Audio Preset',
+ role: 'presets.save',
+ type: 'string',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.loadPreset',
+ type: 'state',
+ common: {
+ name: 'Load Net Audio Preset',
+ role: 'presets.load',
+ type: 'string',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.lfeAmount',
+ type: 'state',
+ common: {
+ name: 'LFE Amount',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: 0,
+ max: 10
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.dialogLevelAdjust',
+ type: 'state',
+ common: {
+ name: 'Dialog Level Adjustment',
+ role: 'indicator',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.dialogLevel',
+ type: 'state',
+ common: {
+ name: 'Dialog Level',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: -12,
+ max: 12
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.dialogControl',
+ type: 'state',
+ common: {
+ name: 'Dialog Control',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: 0,
+ max: 6
+ },
+ native: {}
+ }
+];
+exports.usCommandsZone = [
+ {
+ _id: 'speakerOneVolume',
+ type: 'state',
+ common: {
+ name: 'Speaker One Volume',
+ role: 'level.volume',
+ type: 'number',
+ write: true,
+ read: true,
+ min: 0,
+ max: 99
+ },
+ native: {}
+ },
+ {
+ _id: 'speakerTwoVolume',
+ type: 'state',
+ common: {
+ name: 'Speaker Two Volume',
+ role: 'level.volume',
+ type: 'number',
+ write: true,
+ read: true,
+ min: 0,
+ max: 99
+ },
+ native: {}
+ },
+ {
+ _id: 'selectInputOne',
+ type: 'state',
+ common: {
+ name: 'Speaker One Select Input',
+ role: 'media.input',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'BUS L',
+ 1: 'BUS R',
+ 2: 'BUS M',
+ 3: 'AUX'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'selectInputTwo',
+ type: 'state',
+ common: {
+ name: 'Speaker Two Select Input',
+ role: 'media.input',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'BUS L',
+ 1: 'BUS R',
+ 2: 'BUS M',
+ 3: 'AUX'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'operationMode',
+ type: 'state',
+ common: {
+ name: 'Operation Mode',
+ role: 'media.mode',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'NORMAL',
+ 1: 'BRIDGED'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'lowCutFilterSpeakerOne',
+ type: 'state',
+ common: {
+ name: 'Speaker One Channel Low Cut Filter',
+ role: 'media.switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'lowCutFilterSpeakerTwo',
+ type: 'state',
+ common: {
+ name: 'Speaker Two Channel Low Cut Filter',
+ role: 'media.switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneTurnOnModeChange',
+ type: 'state',
+ common: {
+ name: 'Zone Turn On Mode Change',
+ role: 'media.status',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'Constant',
+ 1: 'Trigger in',
+ 2: 'Audio signal',
+ 3: 'Off'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'triggerInput',
+ type: 'state',
+ common: {
+ name: 'Zone Trigger Input',
+ role: 'media.input',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'audioSignalInput',
+ type: 'state',
+ common: {
+ name: 'Channel Audio Signal Input',
+ role: 'media.input',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ }
+];
+exports.usCommands = [
+ {
+ _id: 'settings.powerConfigurationChange',
+ type: 'state',
+ common: {
+ name: 'Power Configuration Change',
+ role: 'media.status',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'Power Button',
+ 1: 'Master Trigger',
+ 2: 'On Line'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.masterTriggerInput',
+ type: 'state',
+ common: {
+ name: 'Master Trigger Input',
+ role: 'media.status',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ }
+];
+exports.lfcCommands = {
+ 'settings.audysseyLfc': {
+ type: 'state',
+ common: {
+ name: 'Audyssey Low Frequency Containment',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ 'settings.containmentAmount': {
+ type: 'state',
+ common: {
+ name: 'Audyssey Low Frequency Containment Amount',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: 1,
+ max: 7
+ },
+ native: {}
+ },
+ 'settings.containmentAmountUp': {
+ type: 'state',
+ common: {
+ name: 'Containment Amount Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ 'settings.containmentAmountDown': {
+ type: 'state',
+ common: {
+ name: 'Containment Amount Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ }
+};
+exports.subwooferTwoStates = {
+ 'settings.subwooferTwoLevel': {
+ type: 'state',
+ common: {
+ name: 'Second Subwoofer Level',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ 'settings.subwooferTwoLevelUp': {
+ type: 'state',
+ common: {
+ name: 'Subwoofer Two Level Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ 'settings.subwooferTwoLevelDown': {
+ type: 'state',
+ common: {
+ name: 'Subwoofer Two Level Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ }
+};
+exports.displayHttpStates = {
+ 'display.displayContent0': {
+ type: 'state',
+ common: {
+ name: 'Display content 0',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent1': {
+ type: 'state',
+ common: {
+ name: 'Display content 1',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent2': {
+ type: 'state',
+ common: {
+ name: 'Display content 2',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent3': {
+ type: 'state',
+ common: {
+ name: 'Display content 3',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent4': {
+ type: 'state',
+ common: {
+ name: 'Display content 4',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent5': {
+ type: 'state',
+ common: {
+ name: 'Display content 5',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent6': {
+ type: 'state',
+ common: {
+ name: 'Display content 6',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent7': {
+ type: 'state',
+ common: {
+ name: 'Display content 7',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent8': {
+ type: 'state',
+ common: {
+ name: 'Display content 8',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'zoneMain.iconURL': {
+ type: 'state',
+ common: {
+ name: 'Cover',
+ role: 'media.cover',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ }
+};
+//# sourceMappingURL=states.js.map
\ No newline at end of file
diff --git a/build/lib/states.js.map b/build/lib/states.js.map
new file mode 100644
index 0000000..0a0f8bb
--- /dev/null
+++ b/build/lib/states.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"states.js","sourceRoot":"","sources":["../../src/lib/states.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,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644
index 2ebf2b8..0000000
--- a/build/lib/tools.d.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Tests whether the given variable is a real object and not an Array
- * @param it The variable to test
- */
-export declare function isObject(it: any): it is Record;
-/**
- * Tests whether the given variable is really an Array
- * @param it The variable to test
- */
-export declare function isArray(it: any): it is any[];
-/**
- * Translates text using the Google Translate API
- * @param text The text to translate
- * @param targetLang The target languate
- * @param yandex api key
- */
-export declare function translateText(text: string, targetLang: string, yandex: string): Promise;
-export declare function translateYandex(text: string, targetLang: string, yandex: string): Promise;
-export declare function translateGoogle(text: string, targetLang: string): Promise;
diff --git a/build/lib/tools.js b/build/lib/tools.js
deleted file mode 100644
index c24be9e..0000000
--- a/build/lib/tools.js
+++ /dev/null
@@ -1,81 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.translateGoogle = exports.translateYandex = exports.translateText = exports.isArray = exports.isObject = void 0;
-const axios_1 = __importDefault(require("axios"));
-/**
- * Tests whether the given variable is a real object and not an Array
- * @param it The variable to test
- */
-function isObject(it) {
- // This is necessary because:
- // typeof null === 'object'
- // typeof [] === 'object'
- // [] instanceof Object === true
- return Object.prototype.toString.call(it) === '[object Object]';
-}
-exports.isObject = isObject;
-/**
- * Tests whether the given variable is really an Array
- * @param it The variable to test
- */
-function isArray(it) {
- if (Array.isArray) {
- return Array.isArray(it);
- }
- return Object.prototype.toString.call(it) === '[object Array]';
-}
-exports.isArray = isArray;
-/**
- * Translates text using the Google Translate API
- * @param text The text to translate
- * @param targetLang The target languate
- * @param yandex api key
- */
-async function translateText(text, targetLang, yandex) {
- if (targetLang === 'en') {
- return text;
- }
- if (yandex) {
- await translateYandex(text, targetLang, yandex);
- }
- else {
- await translateGoogle(text, targetLang);
- }
-}
-exports.translateText = translateText;
-async function translateYandex(text, targetLang, yandex) {
- if (targetLang === 'zh-cn') {
- targetLang = 'zh';
- }
- try {
- const url = `https://translate.yandex.net/api/v1.5/tr.json/translate?key=${yandex}&text=${encodeURIComponent(text)}&lang=en-${targetLang}`;
- const response = await (0, axios_1.default)({ url, timeout: 15000 });
- if (response.data && response.data.text) {
- return response.data.text[0];
- }
- throw new Error('Invalid response for translate request');
- }
- catch (e) {
- throw new Error(`Could not translate to "${targetLang}": ${e.message}`);
- }
-}
-exports.translateYandex = translateYandex;
-async function translateGoogle(text, targetLang) {
- try {
- const url = `http://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=${targetLang}&dt=t&q=${encodeURIComponent(text)}&ie=UTF-8&oe=UTF-8`;
- const response = await (0, axios_1.default)({ url, timeout: 15000 });
- if (isArray(response.data)) {
- // we got a valid response
- return response.data[0][0][0];
- }
- throw new Error('Invalid response for translate request');
- }
- catch (e) {
- throw new Error(`Could not translate to "${targetLang}": ${e.message}`);
- }
-}
-exports.translateGoogle = translateGoogle;
-//# sourceMappingURL=tools.js.map
\ No newline at end of file
diff --git a/build/lib/tools.js.map b/build/lib/tools.js.map
deleted file mode 100644
index 48888c8..0000000
--- a/build/lib/tools.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/lib/tools.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B;;;GAGG;AACH,SAAgB,QAAQ,CAAC,EAAO;IAC5B,6BAA6B;IAC7B,2BAA2B;IAC3B,yBAAyB;IACzB,gCAAgC;IAChC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,iBAAiB,CAAC;AACpE,CAAC;AAND,4BAMC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,EAAO;IAC3B,IAAI,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;KAC5B;IACD,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC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MAAM,QAAQ,GAAG,MAAM,IAAA,eAAK,EAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACtD,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YACxB,0BAA0B;YAC1B,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACjC;QACD,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;KAC7D;IAAC,OAAO,CAAM,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,2BAA2B,UAAU,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC3E;AACL,CAAC;AAdD,0CAcC"}
\ No newline at end of file
diff --git a/build/lib/upnp.d.ts b/build/lib/upnp.d.ts
index 9a0201d..bf2637e 100644
--- a/build/lib/upnp.d.ts
+++ b/build/lib/upnp.d.ts
@@ -1,3 +1,9 @@
+interface SSDPResultEntry {
+ ip: string;
+ data?: any;
+ name: string;
+ manufacturer?: string;
+}
/**
* Tries to read HTML page.
*
@@ -36,10 +42,10 @@ export declare function httpGet(link: string, timeout: number, callback: (err: a
*
*
* @alias ssdpScan
- * @memberof tools
* @param text filter string like "urn:dial-multiscreen-org:service:dial:1"
* @param readXml if LOCATION xml should be read
* @param timeout timeout in ms (default 1000)
* @param callback return result
*/
-export declare function ssdpScan(text: string, readXml: boolean, timeout: number, callback: (err: any, res: any, ip?: string, xmlData?: any) => void): void;
+export declare function ssdpScan(text: string, readXml: boolean, timeout: number, callback: (err: Error | null, res: SSDPResultEntry[]) => void): void;
+export {};
diff --git a/build/lib/upnp.js b/build/lib/upnp.js
index ad88caa..c7f93c5 100644
--- a/build/lib/upnp.js
+++ b/build/lib/upnp.js
@@ -67,7 +67,6 @@ exports.httpGet = httpGet;
*
*
* @alias ssdpScan
- * @memberof tools
* @param text filter string like "urn:dial-multiscreen-org:service:dial:1"
* @param readXml if LOCATION xml should be read
* @param timeout timeout in ms (default 1000)
diff --git a/build/lib/upnp.js.map b/build/lib/upnp.js.map
index 30329fd..a3b1e4f 100644
--- a/build/lib/upnp.js.map
+++ b/build/lib/upnp.js.map
@@ -1 +1 @@
-{"version":3,"file":"upnp.js","sourceRoot":"","sources":["../../src/lib/upnp.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,kDAA0B;AAC1B,2BAAuC;AAEvC;;;;;;GAMG;AACH,SAAgB,OAAO,CACnB,IAAY,EACZ,OAAe,EACf,QAAkE;IAElE,MAAM,GAAG,GAAG,cAAI;SACX,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;QACb,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC;QAElC,IAAI,UAAU,KAAK,GAAG,EAAE;YACpB,0CAA0C;YAC1C,GAAG,CAAC,MAAM,EAAE,CAAC;YACb,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;SACpC;QAED,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACxB,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC;QAC5C,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACzF,CAAC,CAAC;SACD,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAE7D,GAAG,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE;QACzB,GAAG,CAAC,OAAO,EAAE,CAAC;Q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AC;wBACH,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;qBAC1B;gBACL,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;aACtB;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;QACpB,KAAK,GAAG,IAAI,CAAC;QAEb,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAE1C,IAAI,QAAQ,EAAE;YACV,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YACvB,0BAA0B;YAC1B,QAAQ,GAAG,IAAI,CAAC;SACnB;IACL,CAAC,EAAE,OAAO,IAAI,IAAK,CAAC,CAAC;AACzB,CAAC;AA7HD,4BA6HC"}
\ No newline at end of file
diff --git a/build/lib/utils.d.ts b/build/lib/utils.d.ts
index 3b7621f..df734cd 100644
--- a/build/lib/utils.d.ts
+++ b/build/lib/utils.d.ts
@@ -1,4 +1,3 @@
-///
/**
* Decode state e.g. for selectInput by searching for state in key and value of the states
*
@@ -16,7 +15,7 @@ export declare function inputToVol(input: number): string;
* Convert volume to dB
*
* @alias volToDb
- * @param vol volume e. g. '50.5'
+ * @param volStr volume e. g. '50.5'
* @returns dB
*/
export declare function volToDb(volStr: string): number;
@@ -32,9 +31,6 @@ export declare function wait(ms: number): Promise;
* @param vol volume in dB e. g. '10.5'
*/
export declare function dbToVol(vol: string): string;
-export declare const commonCommands: ioBroker.AnyObject[];
-export declare const usCommandsZone: ioBroker.StateObject[];
-export declare const usCommands: ioBroker.StateObject[];
/**
* Tests whether the given variable is a real object and not an Array
* @param it The variable to test
diff --git a/build/lib/utils.js b/build/lib/utils.js
index f08ad1f..737937c 100644
--- a/build/lib/utils.js
+++ b/build/lib/utils.js
@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.isObject = exports.usCommands = exports.usCommandsZone = exports.commonCommands = exports.dbToVol = exports.wait = exports.volToDb = exports.inputToVol = exports.decodeState = void 0;
+exports.isObject = exports.dbToVol = exports.wait = exports.volToDb = exports.inputToVol = exports.decodeState = void 0;
/**
* Decode state e.g. for selectInput by searching for state in key and value of the states
*
@@ -42,7 +42,7 @@ exports.inputToVol = inputToVol;
* Convert volume to dB
*
* @alias volToDb
- * @param vol volume e. g. '50.5'
+ * @param volStr volume e. g. '50.5'
* @returns dB
*/
function volToDb(volStr) {
@@ -81,1206 +81,6 @@ function dbToVol(vol) {
return vol;
}
exports.dbToVol = dbToVol;
-exports.commonCommands = [
- {
- _id: 'info.friendlyName',
- type: 'state',
- common: {
- role: 'info.name',
- name: 'Friendly Name',
- type: 'string',
- read: true,
- write: false
- },
- native: {}
- },
- {
- _id: 'tuner',
- type: 'channel',
- common: {
- name: 'Tuner'
- },
- native: {}
- },
- {
- _id: 'tuner.frequencyUp',
- type: 'state',
- common: {
- name: 'Tuner Frequency Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'tuner.frequencyDown',
- type: 'state',
- common: {
- name: 'Tuner Frequency Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'tuner.stationName',
- type: 'state',
- common: {
- name: 'Tuner Station Name',
- role: 'text',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- },
- {
- _id: 'tuner.frequency',
- type: 'state',
- common: {
- name: 'Tuner Frequency',
- role: 'value',
- type: 'number',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain',
- type: 'channel',
- common: {
- name: 'Main Zone'
- },
- native: {}
- },
- {
- _id: 'zoneMain.powerZone',
- type: 'state',
- common: {
- name: 'Main Zone Power State',
- role: 'switch.power.zone',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'zoneMain.volume',
- type: 'state',
- common: {
- name: 'Main Volume',
- role: 'level.volume',
- type: 'number',
- read: true,
- write: true,
- min: 0,
- max: 98
- },
- native: {}
- },
- {
- _id: 'zoneMain.volumeUp',
- type: 'state',
- common: {
- name: 'Volume Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.volumeDown',
- type: 'state',
- common: {
- name: 'Volume Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.selectInput',
- type: 'state',
- common: {
- name: 'Select input',
- role: 'media.input',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'PHONO',
- 1: 'CD',
- 2: 'TUNER',
- 3: 'DVD',
- 4: 'BD',
- 5: 'TV',
- 6: 'SAT/CBL',
- 7: 'MPLAY',
- 8: 'GAME',
- 9: 'NET',
- 10: 'SPOTIFY',
- 11: 'LASTFM',
- 12: 'IRADIO',
- 13: 'SERVER',
- 14: 'FAVORITES',
- 15: 'AUX1',
- 16: 'AUX2',
- 17: 'AUX3',
- 18: 'AUX4',
- 19: 'AUX5',
- 20: 'AUX6',
- 21: 'AUX7',
- 22: 'BT',
- 23: 'USB'
- }
- },
- native: {}
- },
- {
- _id: 'zoneMain.playPause',
- type: 'state',
- common: {
- name: 'Play/Pause',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.play',
- type: 'state',
- common: {
- name: 'Play',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.pause',
- type: 'state',
- common: {
- name: 'Pause',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.skipPlus',
- type: 'state',
- common: {
- name: 'Next',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.skipMinus',
- type: 'state',
- common: {
- name: 'Previous',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.maximumVolume',
- type: 'state',
- common: {
- name: 'Maximum Volume',
- role: 'state',
- type: 'number',
- write: false,
- read: true
- },
- native: {}
- },
- {
- _id: 'zoneMain.muteIndicator',
- type: 'state',
- common: {
- name: 'Muted',
- role: 'media.mute',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'zoneMain.quickSelect',
- type: 'state',
- common: {
- name: 'Quick select',
- role: 'media.quickSelect',
- type: 'number',
- write: true,
- read: true,
- min: 1,
- max: 5
- },
- native: {}
- },
- {
- _id: 'zoneMain.sleepTimer',
- type: 'state',
- common: {
- name: 'Sleep timer',
- role: 'level.timer.sleep',
- unit: 'min',
- type: 'number',
- write: true,
- read: true,
- min: 0,
- max: 120
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerBass',
- type: 'state',
- common: {
- name: 'Bass Level',
- role: 'level.bass',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: -6,
- max: 6
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerBassUp',
- type: 'state',
- common: {
- name: 'Bass Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerBassDown',
- type: 'state',
- common: {
- name: 'Bass Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerTreble',
- type: 'state',
- common: {
- name: 'Treble Level',
- role: 'level.treble',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: -6,
- max: 6
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerTrebleUp',
- type: 'state',
- common: {
- name: 'Treble Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerTrebleDown',
- type: 'state',
- common: {
- name: 'Treble Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Front Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: -12,
- max: 12
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontRight',
- type: 'state',
- common: {
- name: 'Channel Volume Front Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeCenter',
- type: 'state',
- common: {
- name: 'Channel Volume Center',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundRight',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundDolbyRight',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Dolby Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundDolbyLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Dolby Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontDolbyLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Front Dolby Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontDolbyRight',
- type: 'state',
- common: {
- name: 'Channel Volume Front Dolby Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontHeightLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Front Height Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontHeightRight',
- type: 'state',
- common: {
- name: 'Channel Volume Front Height Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeRearHeightLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Rear Height Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeRearHeightRight',
- type: 'state',
- common: {
- name: 'Channel Volume Rear Height Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundHeightRight',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Height Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundHeightLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Height Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSubwoofer',
- type: 'state',
- common: {
- name: 'Channel Volume Subwoofer',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSubwooferTwo',
- type: 'state',
- common: {
- name: 'Channel Volume Subwoofer Two',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.volumeDB',
- type: 'state',
- common: {
- name: 'Main Volume DB',
- role: 'level.volume.main',
- type: 'number',
- read: true,
- write: true,
- min: -80,
- max: 18,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.maximumVolumeDB',
- type: 'state',
- common: {
- name: 'Maximum Volume DB',
- role: 'state',
- type: 'number',
- write: false,
- read: true,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'settings.surroundMode',
- type: 'state',
- common: {
- name: 'Surround mode',
- role: 'state',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'STEREO',
- 1: 'VIRTUAL',
- 2: 'VIDEO GAME',
- 3: 'MCH STEREO',
- 4: 'DTS SURROUND',
- 5: 'DOLBY DIGITAL',
- 6: 'MOVIE',
- 7: 'MUSIC',
- 8: 'DIRECT',
- 9: 'PURE DIRECT',
- 10: 'AUTO',
- 11: 'GAME',
- 12: 'AURO3D',
- 13: 'AURO2DSURR',
- 14: 'WIDE SCREEN',
- 15: 'SUPER STADIUM',
- 16: 'ROCK ARENA',
- 17: 'JAZZ CLUB',
- 18: 'CLASSIC CONCERT',
- 19: 'MONO MOVIE',
- 20: 'MATRIX'
- }
- },
- native: {}
- },
- {
- _id: 'settings.dynamicEq',
- type: 'state',
- common: {
- name: 'Dynamic Eq',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.subwooferLevelState',
- type: 'state',
- common: {
- name: 'Subwoofer Level State',
- desc: 'Subwoofer Level State',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.subwooferLevel',
- type: 'state',
- common: {
- name: 'Subwoofer Level',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'settings.subwooferLevelUp',
- type: 'state',
- common: {
- name: 'Subwoofer level Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'settings.subwooferLevelDown',
- type: 'state',
- common: {
- name: 'Subwoofer level Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'settings.multEq',
- type: 'state',
- common: {
- name: 'Mult EQ',
- role: 'level',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'OFF',
- 1: 'AUDYSSEY',
- 2: 'BYP.LR',
- 3: 'FLAT',
- 4: 'MANUAL'
- }
- },
- native: {}
- },
- {
- _id: 'settings.dynamicVolume',
- type: 'state',
- common: {
- name: 'Dynamic Volume',
- role: 'level',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'OFF',
- 1: 'LIT',
- 2: 'MED',
- 3: 'HEV'
- }
- },
- native: {}
- },
- {
- _id: 'settings.referenceLevelOffset',
- type: 'state',
- common: {
- name: 'Reference Level Offset',
- role: 'level',
- type: 'string',
- write: true,
- read: true,
- unit: 'dB',
- states: {
- 0: '0',
- 5: '5',
- 10: '10',
- 15: '15'
- }
- },
- native: {}
- },
- {
- _id: 'settings.toneControl',
- type: 'state',
- common: {
- name: 'Tone Control',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.cursorUp',
- type: 'state',
- common: {
- name: 'Cursor Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.cursorDown',
- type: 'state',
- common: {
- name: 'Cursor Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.cursorRight',
- type: 'state',
- common: {
- name: 'Cursor Right',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.cursorLeft',
- type: 'state',
- common: {
- name: 'Cursor Left',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.enter',
- type: 'state',
- common: {
- name: 'Enter',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.return',
- type: 'state',
- common: {
- name: 'Return',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.option',
- type: 'state',
- common: {
- name: 'Option',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.info',
- type: 'state',
- common: {
- name: 'Info',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.setupMenu',
- type: 'state',
- common: {
- name: 'Setup Menu',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.centerSpread',
- type: 'state',
- common: {
- name: 'Center Spread',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'info.onlinePresets',
- type: 'state',
- common: {
- name: 'Net Audio Presets',
- role: 'presets.json',
- type: 'string',
- write: false,
- read: true,
- def: '{}'
- },
- native: {}
- },
- {
- _id: 'settings.savePreset',
- type: 'state',
- common: {
- name: 'Save Net Audio Preset',
- role: 'presets.save',
- type: 'string',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.loadPreset',
- type: 'state',
- common: {
- name: 'Load Net Audio Preset',
- role: 'presets.load',
- type: 'string',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.lfeAmount',
- type: 'state',
- common: {
- name: 'LFE Amount',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: 0,
- max: 10
- },
- native: {}
- },
- {
- _id: 'settings.dialogLevelAdjust',
- type: 'state',
- common: {
- name: 'Dialog Level Adjustment',
- role: 'indicator',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.dialogLevel',
- type: 'state',
- common: {
- name: 'Dialog Level',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: -12,
- max: 12
- },
- native: {}
- },
- {
- _id: 'settings.dialogControl',
- type: 'state',
- common: {
- name: 'Dialog Control',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: 0,
- max: 6
- },
- native: {}
- }
-];
-exports.usCommandsZone = [
- {
- _id: 'speakerOneVolume',
- type: 'state',
- common: {
- name: 'Speaker One Volume',
- role: 'level.volume',
- type: 'number',
- write: true,
- read: true,
- min: 0,
- max: 99
- },
- native: {}
- },
- {
- _id: 'speakerTwoVolume',
- type: 'state',
- common: {
- name: 'Speaker Two Volume',
- role: 'level.volume',
- type: 'number',
- write: true,
- read: true,
- min: 0,
- max: 99
- },
- native: {}
- },
- {
- _id: 'selectInputOne',
- type: 'state',
- common: {
- name: 'Speaker One Select Input',
- role: 'media.input',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'BUS L',
- 1: 'BUS R',
- 2: 'BUS M',
- 3: 'AUX'
- }
- },
- native: {}
- },
- {
- _id: 'selectInputTwo',
- type: 'state',
- common: {
- name: 'Speaker Two Select Input',
- role: 'media.input',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'BUS L',
- 1: 'BUS R',
- 2: 'BUS M',
- 3: 'AUX'
- }
- },
- native: {}
- },
- {
- _id: 'operationMode',
- type: 'state',
- common: {
- name: 'Operation Mode',
- role: 'media.mode',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'NORMAL',
- 1: 'BRIDGED'
- }
- },
- native: {}
- },
- {
- _id: 'lowCutFilterSpeakerOne',
- type: 'state',
- common: {
- name: 'Speaker One Channel Low Cut Filter',
- role: 'media.switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'lowCutFilterSpeakerTwo',
- type: 'state',
- common: {
- name: 'Speaker Two Channel Low Cut Filter',
- role: 'media.switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'zoneTurnOnModeChange',
- type: 'state',
- common: {
- name: 'Zone Turn On Mode Change',
- role: 'media.status',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'Constant',
- 1: 'Trigger in',
- 2: 'Audio signal',
- 3: 'Off'
- }
- },
- native: {}
- },
- {
- _id: 'triggerInput',
- type: 'state',
- common: {
- name: 'Zone Trigger Input',
- role: 'media.input',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'audioSignalInput',
- type: 'state',
- common: {
- name: 'Channel Audio Signal Input',
- role: 'media.input',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- }
-];
-exports.usCommands = [
- {
- _id: 'settings.powerConfigurationChange',
- type: 'state',
- common: {
- name: 'Power Configuration Change',
- role: 'media.status',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'Power Button',
- 1: 'Master Trigger',
- 2: 'On Line'
- }
- },
- native: {}
- },
- {
- _id: 'settings.masterTriggerInput',
- type: 'state',
- common: {
- name: 'Master Trigger Input',
- role: 'media.status',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- }
-];
/**
* Tests whether the given variable is a real object and not an Array
* @param it The variable to test
diff --git a/build/lib/utils.js.map b/build/lib/utils.js.map
index 03c7b36..fd7f720 100644
--- a/build/lib/utils.js.map
+++ b/build/lib/utils.js.map
@@ -1 +1 @@
-{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,WAAmC,EAAE,KAAsB;IACnF,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QAClD,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,KAAK,CAAC,QAAQ,EA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CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,gBAAgB;KAChD;SAAM;QACH,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;KAC1B;IAED,GAAG,IAAI,EAAE,CAAC,CAAC,YAAY;IACvB,OAAO,GAAG,CAAC;AACf,CAAC;AAVD,0BAUC;AAED;;;;GAIG;AACH,SAAgB,IAAI,CAAC,EAAU;IAC3B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QACzB,UAAU,CAAC,GAAG,EAAE;YACZ,OAAO,EAAE,CAAC;QACd,CAAC,EAAE,EAAE,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACP,CAAC;AAND,oBAMC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CAAC,GAAW;IAC/B,GAAG,IAAI,EAAE,CAAC,CAAC,YAAY;IACvB,GAAG,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACtC,OAAO,GAAG,CAAC;AACf,CAAC;AAJD,0BAIC;AAED;;;GAGG;AACH,SAAgB,QAAQ,CAAC,EAAO;IAC5B,6BAA6B;IAC7B,2BAA2B;IAC3B,yBAAyB;IACzB,gCAAgC;IAChC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,iBAAiB,CAAC,CAAC,yCAAyC;AAC9G,CAAC;AAND,4BAMC"}
\ No newline at end of file
diff --git a/build/main.d.ts b/build/main.d.ts
index c9d44ec..cb0ff5c 100644
--- a/build/main.d.ts
+++ b/build/main.d.ts
@@ -1,3 +1 @@
-export = startAdapter;
-declare function startAdapter(options: any): utils.AdapterInstance;
-import utils = require("@iobroker/adapter-core");
+export {};
diff --git a/build/main.js b/build/main.js
index c9b125e..010444f 100644
--- a/build/main.js
+++ b/build/main.js
@@ -1,14 +1,37 @@
-/**
- * DENON AVR adapter
- */
-/* jshint -W097 */ // jshint strict:false
-/*jslint node: true */
-'use strict';
-const utils = require('@iobroker/adapter-core');
-const net = require('net');
-const helper = require(`./lib/utils`);
-const ssdpScan = require('./lib/upnp').ssdpScan;
-const client = new net.Socket();
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const adapter_core_1 = __importDefault(require("@iobroker/adapter-core"));
+const net_1 = __importDefault(require("net"));
+const helper = __importStar(require("./lib/utils"));
+const states = __importStar(require("./lib/states"));
+const upnp_1 = require("./lib/upnp");
+const client = new net_1.default.Socket();
let adapter;
let host;
let pollInterval;
@@ -25,23 +48,19 @@ const capabilities = {
speakerPreset: false
};
const zonesCreated = {};
-let pollingVar = null;
-let connectingVar = null;
+let pollTimer = null;
+let connectTimer = null;
let receiverType;
-function startAdapter(options) {
- options = options || {};
- Object.assign(options, {
- name: 'denon'
- });
- adapter = new utils.Adapter(options);
+function startAdapter(options = {}) {
+ adapter = new adapter_core_1.default.Adapter({ ...options, name: 'denon' });
adapter.on('unload', callback => {
try {
- if (connectingVar) {
- clearTimeout(connectingVar);
- } // endIf
- if (pollingVar) {
- clearTimeout(pollingVar);
- } // endIf
+ if (connectTimer) {
+ clearTimeout(connectTimer);
+ }
+ if (pollTimer) {
+ clearTimeout(pollTimer);
+ }
/*
if (intervalPollVar) {
clearInterval(intervalPollVar);
@@ -63,7 +82,7 @@ function startAdapter(options) {
// frontend will call browse
if (obj.callback) {
adapter.log.info('start browse');
- ssdpScan('M-SEARCH * HTTP/1.1\r\n' +
+ (0, upnp_1.ssdpScan)('M-SEARCH * HTTP/1.1\r\n' +
'HOST: 239.255.255.250:1900\r\n' +
'ST: ssdp:all\r\n' +
'MAN: "ssdp:discover"\r\n' +
@@ -77,30 +96,21 @@ function startAdapter(options) {
.map(dev => {
return { ip: dev.ip, name: dev.name };
});
- } // endIf
+ }
adapter.sendTo(obj.from, obj.command, { error: err, list: result }, obj.callback);
});
- } // endIf
- } // endIf
- } // endIf
+ }
+ }
+ }
});
- adapter.on('ready', async () => {
+ adapter.on('ready', () => {
if (adapter.config.ip) {
adapter.log.info('[START] Starting DENON AVR adapter');
host = adapter.config.ip;
pollInterval = adapter.config.pollInterval || 7000;
requestInterval = adapter.config.requestInterval || 100;
- const obj = await adapter.getForeignObjectAsync(adapter.namespace);
- // create device namespace
- if (!obj) {
- adapter.setForeignObject(adapter.namespace, {
- type: 'device',
- common: {
- name: 'DENON device'
- }
- });
- } // endIf
- main();
+ adapter.subscribeStates('*');
+ connect();
}
else {
adapter.log.warn('No IP-address set');
@@ -108,23 +118,24 @@ function startAdapter(options) {
});
// Handle state changes
adapter.on('stateChange', async (id, state) => {
- if (!id || !state || state.ack) {
+ // Ignore acknowledged state changes or error states
+ if (!id || !state || state.ack || state.val === null) {
return;
- } // Ignore acknowledged state changes or error states
+ }
id = id.substring(adapter.namespace.length + 1); // remove instance name and id
- state = state.val; // only get state value
+ let stateVal = state.val; // only get state value
let zoneNumber;
if (/^zone\d\..+/g.test(id)) {
zoneNumber = id.slice(4, 5);
id = `zone.${id.substring(6)}`;
- } // endIf
- adapter.log.debug(`[COMMAND] State Change - ID: ${id}; State: ${state}`);
+ }
+ adapter.log.debug(`[COMMAND] State Change - ID: ${id}; State: ${stateVal}`);
if (receiverType === 'US') {
- return handleUsStateChange(id, state);
+ return handleUsStateChange(id, stateVal);
}
switch (id) {
case 'zoneMain.powerZone':
- if (state === true) {
+ if (stateVal === true) {
await sendRequest('ZMON');
}
else {
@@ -132,31 +143,31 @@ function startAdapter(options) {
}
break;
case 'zoneMain.volume': {
- const vol = helper.inputToVol(state);
+ const vol = helper.inputToVol(stateVal);
await sendRequest(`MV${vol}`);
adapter.log.debug(`[INFO] <== Changed mainVolume to ${vol}`);
break;
}
case 'zoneMain.volumeDB': {
- state += 80; // convert to Vol
- const vol = helper.inputToVol(state);
+ stateVal += 80; // convert to Vol
+ const vol = helper.inputToVol(stateVal);
await sendRequest(`MV${vol}`);
adapter.log.debug(`[INFO] <== Changed mainVolume to ${vol}`);
break;
}
case 'zoneMain.sleepTimer':
- if (!state) {
+ if (!stateVal) {
// state === 0
await sendRequest('SLPOFF');
}
- else if (state < 10) {
- await sendRequest(`SLP00${state}`);
+ else if (stateVal < 10) {
+ await sendRequest(`SLP00${stateVal}`);
}
- else if (state < 100) {
- await sendRequest(`SLP0${state}`);
+ else if (stateVal < 100) {
+ await sendRequest(`SLP0${stateVal}`);
}
- else if (state <= 120) {
- await sendRequest(`SLP${state}`);
+ else if (stateVal <= 120) {
+ await sendRequest(`SLP${stateVal}`);
}
break;
case 'zoneMain.volumeUp':
@@ -166,7 +177,7 @@ function startAdapter(options) {
await sendRequest('MVDOWN');
break;
case 'zoneMain.muteIndicator':
- if (state === true) {
+ if (stateVal === true) {
await sendRequest('MUON');
}
else {
@@ -190,11 +201,11 @@ function startAdapter(options) {
break;
case 'zoneMain.selectInput': {
const obj = await adapter.getObjectAsync('zoneMain.selectInput');
- await sendRequest(`SI${helper.decodeState(obj.common.states, state).toUpperCase()}`);
+ await sendRequest(`SI${helper.decodeState(obj.common.states, state.val).toUpperCase()}`);
break;
}
case 'zoneMain.quickSelect':
- await sendRequests([`MSQUICK${state}`, `MSSMART${state}`]);
+ await sendRequests([`MSQUICK${stateVal}`, `MSSMART${stateVal}`]);
break;
case 'zoneMain.equalizerBassUp':
await sendRequest('PSBAS UP');
@@ -209,74 +220,74 @@ function startAdapter(options) {
await sendRequest('PSTRE DOWN');
break;
case 'zoneMain.equalizerBass':
- state = helper.dbToVol(state);
- await sendRequest(`PSBAS ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`PSBAS ${stateVal}`);
break;
case 'zoneMain.equalizerTreble':
- state = helper.dbToVol(state);
- await sendRequest(`PSTRE ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`PSTRE ${stateVal}`);
break;
case 'zoneMain.channelVolumeFrontLeft':
- await sendRequest(`CVFL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeFrontRight':
- await sendRequest(`CVFR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeCenter':
- await sendRequest(`CVC ${helper.dbToVol(state)}`);
+ await sendRequest(`CVC ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundRight':
- await sendRequest(`CVSR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundLeft':
- await sendRequest(`CVSL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundDolbyLeft':
- await sendRequest(`CVSDL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSDL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundDolbyRight':
- await sendRequest(`CVSDR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSDR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeFrontDolbyLeft':
- await sendRequest(`CVFDL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFDL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeFrontDolbyRight':
- await sendRequest(`CVFDR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFDR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeFrontHeightLeft':
- await sendRequest(`CVFHL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFHL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeFrontHeightRight':
- await sendRequest(`CVFHR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFHR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeRearHeightLeft':
- await sendRequest(`CVRHL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVRHL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeRearHeightRight':
- await sendRequest(`CVRHR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVRHR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundHeightRight':
- await sendRequest(`CVSHR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSHR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundHeightLeft':
- await sendRequest(`CVSHL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSHL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSubwoofer':
- await sendRequest(`CVSW ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSW ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSubwooferTwo':
- await sendRequest(`CVSW2 ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSW2 ${helper.dbToVol(stateVal)}`);
break;
case 'settings.powerSystem':
- if (state === true) {
+ if (stateVal === true) {
await sendRequest('PWON');
}
else {
await sendRequest('PWSTANDBY');
- } // endElseIf
+ }
break;
case 'settings.dynamicEq':
- if (state) {
+ if (stateVal) {
await sendRequest('PSDYNEQ ON');
}
else {
@@ -284,8 +295,8 @@ function startAdapter(options) {
}
break;
case 'settings.subwooferLevel':
- state = helper.dbToVol(state);
- await sendRequest(`PSSWL ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`PSSWL ${stateVal}`);
break;
case 'settings.subwooferLevelDown':
await sendRequest('PSSWL DOWN');
@@ -294,7 +305,7 @@ function startAdapter(options) {
await sendRequest('PSSWL UP');
break;
case 'settings.subwooferLevelState':
- if (state) {
+ if (stateVal) {
await sendRequest('PSSWL ON');
}
else {
@@ -302,8 +313,8 @@ function startAdapter(options) {
}
break;
case 'settings.subwooferTwoLevel':
- state = helper.dbToVol(state);
- await sendRequest(`PSSWL2 ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`PSSWL2 ${stateVal}`);
break;
case 'settings.subwooferTwoLevelDown':
await sendRequest('PSSWL2 DOWN');
@@ -312,7 +323,7 @@ function startAdapter(options) {
await sendRequest('PSSWL2 UP');
break;
case 'settings.audysseyLfc':
- if (state) {
+ if (stateVal) {
await sendRequest('PSLFC ON');
}
else {
@@ -326,31 +337,31 @@ function startAdapter(options) {
await sendRequest('PSCNTAMT UP');
break;
case 'settings.containmentAmount':
- await sendRequest(`PSCNTAMT 0${state}`);
+ await sendRequest(`PSCNTAMT 0${stateVal}`);
break;
case 'settings.multEq': {
const obj = await adapter.getObjectAsync('settings.multEq');
- await sendRequest(`PSMULTEQ:${helper.decodeState(obj.common.states, state).toUpperCase()}`);
+ await sendRequest(`PSMULTEQ:${helper.decodeState(obj.common.states, state.val).toUpperCase()}`);
break;
}
case 'settings.dynamicVolume': {
const obj = await adapter.getObjectAsync('settings.dynamicVolume');
- await sendRequest(`PSDYNVOL ${helper.decodeState(obj.common.states, state).toUpperCase()}`);
+ await sendRequest(`PSDYNVOL ${helper.decodeState(obj.common.states, state.val).toUpperCase()}`);
break;
}
case 'settings.referenceLevelOffset':
- await sendRequest(`PSREFLEV ${state}`);
+ await sendRequest(`PSREFLEV ${stateVal}`);
break;
case 'settings.surroundMode': {
const obj = await adapter.getObjectAsync('settings.surroundMode');
- await sendRequest(`MS${helper.decodeState(obj.common.states, state).toUpperCase()}`);
+ await sendRequest(`MS${helper.decodeState(obj.common.states, state.val).toUpperCase()}`);
break;
}
case 'settings.expertReadingPattern':
try {
// check if its a valid RegExp
- new RegExp(state);
- await adapter.setStateAsync('settings.expertReadingPattern', state, true);
+ new RegExp(stateVal);
+ await adapter.setStateAsync('settings.expertReadingPattern', stateVal, true);
}
catch (e) {
adapter.log.warn(`[COMMAND] Cannot update expert reading pattern: ${e.message}`);
@@ -358,16 +369,16 @@ function startAdapter(options) {
break;
case 'settings.expertCommand': {
// Sending custom commands
- await sendRequest(state);
- const connectionState = adapter.getStateAsync('info.connection');
+ await sendRequest(stateVal);
+ const connectionState = await adapter.getStateAsync('info.connection');
// acknowledge when connection is true, thats all we can do here
- if (connectionState.val === true) {
- adapter.setState('settings.expertCommand', state, true);
+ if ((connectionState === null || connectionState === void 0 ? void 0 : connectionState.val) === true) {
+ adapter.setState('settings.expertCommand', stateVal, true);
}
break;
}
case 'settings.toneControl':
- if (state) {
+ if (stateVal) {
await sendRequest('PSTONE CTRL ON');
}
else {
@@ -399,7 +410,7 @@ function startAdapter(options) {
await sendRequest('MNINF');
break;
case 'settings.setupMenu':
- if (state) {
+ if (stateVal) {
await sendRequest('MNMEN ON');
}
else {
@@ -408,11 +419,11 @@ function startAdapter(options) {
break;
case 'settings.outputMonitor': {
const obj = await adapter.getObjectAsync('settings.outputMonitor');
- await sendRequest(`VSMONI${helper.decodeState(obj.common.states, state)}`);
+ await sendRequest(`VSMONI${helper.decodeState(obj.common.states, stateVal)}`);
break;
}
case 'settings.centerSpread':
- if (state) {
+ if (stateVal) {
await sendRequest('PSCES ON');
}
else {
@@ -421,37 +432,40 @@ function startAdapter(options) {
break;
case 'settings.videoProcessingMode': {
const obj = await adapter.getObjectAsync('settings.videoProcessingMode');
- await sendRequest(`VSVPM${helper.decodeState(obj.common.states, state)}`);
+ await sendRequest(`VSVPM${helper.decodeState(obj.common.states, stateVal)}`);
break;
}
case 'settings.pictureMode':
- await sendRequest(`PV${state}`);
+ await sendRequest(`PV${stateVal}`);
break;
case 'settings.loadPreset': {
let loadPresetState;
- if (parseInt(state) < 10) {
- loadPresetState = `0${state}`;
+ if (parseInt(stateVal) < 10) {
+ loadPresetState = `0${stateVal}`;
}
else {
- loadPresetState = state;
+ loadPresetState = stateVal;
}
await sendRequest(`NSB${loadPresetState}`);
break;
}
case 'settings.savePreset': {
let savePresetState;
- if (parseInt(state) < 10) {
- savePresetState = `0${state}`;
+ if (parseInt(stateVal) < 10) {
+ savePresetState = `0${stateVal}`;
}
else {
- savePresetState = state;
+ savePresetState = stateVal;
}
await sendRequest(`NSC${savePresetState}`);
break;
}
case 'display.brightness': {
const obj = await adapter.getObjectAsync('display.brightness');
- await sendRequest(`DIM ${helper.decodeState(obj.common.states, state).toUpperCase().slice(0, 3)}`);
+ await sendRequest(`DIM ${helper
+ .decodeState(obj.common.states, state.val)
+ .toUpperCase()
+ .slice(0, 3)}`);
break;
}
case 'tuner.frequencyUp':
@@ -463,10 +477,10 @@ function startAdapter(options) {
case 'tuner.frequency': {
// remove the dot from 106.90
let strFreq = state.toString().replace('.', '');
- if (strFreq.length < 6 && state < 1000) {
+ if (strFreq.length < 6 && stateVal < 1000) {
// below 1000 we need leading zero
strFreq = `0${strFreq}`;
- if (state < 100) {
+ if (stateVal < 100) {
// we need another one
strFreq = `0${strFreq}`;
}
@@ -479,35 +493,35 @@ function startAdapter(options) {
break;
}
case 'zone.powerZone':
- if (state === true) {
+ if (stateVal === true) {
await sendRequest(`Z${zoneNumber}ON`);
}
else {
await sendRequest(`Z${zoneNumber}OFF`);
- } // endElseIf
+ }
break;
case 'zone.muteIndicator':
- if (state === true) {
+ if (stateVal === true) {
await sendRequest(`Z${zoneNumber}MUON`);
}
else {
await sendRequest(`Z${zoneNumber}MUOFF`);
- } // endElseIf
+ }
break;
case 'zone.sleepTimer':
- if (!state) {
+ if (!stateVal) {
// state === 0
await sendRequest(`Z${zoneNumber}SLPOFF`);
}
- else if (state < 10) {
- await sendRequest(`Z${zoneNumber}SLP00${state}`);
+ else if (stateVal < 10) {
+ await sendRequest(`Z${zoneNumber}SLP00${stateVal}`);
+ }
+ else if (stateVal < 100) {
+ await sendRequest(`Z${zoneNumber}SLP0${stateVal}`);
}
- else if (state < 100) {
- await sendRequest(`Z${zoneNumber}SLP0${state}`);
+ else if (stateVal <= 120) {
+ await sendRequest(`Z${zoneNumber}SLP${stateVal}`);
}
- else if (state <= 120) {
- await sendRequest(`Z${zoneNumber}SLP${state}`);
- } // endElseIf
break;
case 'zone.volumeUp':
await sendRequest(`Z${zoneNumber}UP`);
@@ -516,19 +530,19 @@ function startAdapter(options) {
await sendRequest(`Z${zoneNumber}DOWN`);
break;
case 'zone.volume':
- await sendRequest(`Z${zoneNumber}${helper.inputToVol(state)}`);
+ await sendRequest(`Z${zoneNumber}${helper.inputToVol(stateVal)}`);
break;
case 'zone.volumeDB':
- state += 80; // Convert to Vol
- await sendRequest(`Z${zoneNumber}${helper.inputToVol(state)}`);
+ stateVal += 80; // Convert to Vol
+ await sendRequest(`Z${zoneNumber}${helper.inputToVol(stateVal)}`);
break;
case 'zone.selectInput': {
const obj = await adapter.getObjectAsync(`zone${zoneNumber}.selectInput`);
- await sendRequest(`Z${zoneNumber}${helper.decodeState(obj.common.states, state).toUpperCase()}`);
+ await sendRequest(`Z${zoneNumber}${helper.decodeState(obj.common.states, state.val).toUpperCase()}`);
break;
}
case 'zone.quickSelect':
- await sendRequests([`Z${zoneNumber}QUICK${state}`, `Z${zoneNumber}SMART${state}`]);
+ await sendRequests([`Z${zoneNumber}QUICK${stateVal}`, `Z${zoneNumber}SMART${stateVal}`]);
break;
case 'zone.equalizerBassUp':
await sendRequest(`Z${zoneNumber}PSBAS UP`);
@@ -543,118 +557,95 @@ function startAdapter(options) {
await sendRequest(`Z${zoneNumber}PSTRE DOWN`);
break;
case 'zone.equalizerBass':
- state = helper.dbToVol(state);
- await sendRequest(`Z${zoneNumber}PSBAS ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`Z${zoneNumber}PSBAS ${stateVal}`);
break;
case 'zone.equalizerTreble':
- state = helper.dbToVol(state);
- await sendRequest(`Z${zoneNumber}PSTRE ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`Z${zoneNumber}PSTRE ${stateVal}`);
break;
case 'zone.channelVolumeFrontLeft':
- await sendRequest(`Z${zoneNumber}CVFL ${helper.dbToVol(state)}`);
+ await sendRequest(`Z${zoneNumber}CVFL ${helper.dbToVol(stateVal)}`);
break;
case 'zone.channelVolumeFrontRight':
- await sendRequest(`Z${zoneNumber}CVFR ${helper.dbToVol(state)}`);
+ await sendRequest(`Z${zoneNumber}CVFR ${helper.dbToVol(stateVal)}`);
break;
case 'settings.lfeAmount':
- await sendRequest(`PSLFE ${state < 10 ? `0${state}` : 10}`);
+ await sendRequest(`PSLFE ${stateVal < 10 ? `0${stateVal}` : 10}`);
break;
case 'settings.dialogControl':
- await sendRequest(`PSDIC 0${state}`); // can only be 0 - 6
+ await sendRequest(`PSDIC 0${stateVal}`); // can only be 0 - 6
break;
case 'settings.dialogLevel':
- await sendRequest(`PSDIL ${helper.dbToVol(state)}`);
+ await sendRequest(`PSDIL ${helper.dbToVol(stateVal)}`);
break;
case 'settings.dialogLevelAdjust':
- await sendRequest(`PSDIL ${state ? 'ON' : 'OFF'}`);
+ await sendRequest(`PSDIL ${stateVal ? 'ON' : 'OFF'}`);
break;
case 'settings.speakerPreset':
- await sendRequest(`SPPR ${state}`);
+ await sendRequest(`SPPR ${stateVal}`);
break;
default:
adapter.log.error(`[COMMAND] ${id} is not a valid state`);
- } // endSwitch
- }); // endOnStateChange
+ }
+ });
return adapter;
-} // endStartAdapter
-function main() {
- adapter.subscribeStates('*');
- connect();
-} // endMain
+}
client.on('timeout', () => {
- pollingVar = null;
+ pollTimer = null;
adapter.log.warn('AVR timed out due to no response');
adapter.setState('info.connection', false, true);
client.destroy();
client.unref();
- if (!connectingVar) {
- connectingVar = setTimeout(() => connect(), 30000); // Connect again in 30 seconds
- } // endIf
+ if (!connectTimer) {
+ connectTimer = setTimeout(() => connect(), 30000); // Connect again in 30 seconds
+ }
});
// Connection handling
-client.on('error', error => {
+client.on('error', (error) => {
verboseConnection = error.code !== previousError;
- if (connectingVar) {
+ if (connectTimer) {
return;
}
previousError = error.code;
- if (verboseConnection) {
- if (error.code === 'ECONNREFUSED') {
- adapter.log.warn('Connection refused, make sure that there is no other Telnet connection');
- }
- else if (error.code === 'EHOSTUNREACH') {
- adapter.log.warn('AVR unreachable, check the Network Config of your AVR');
- }
- else if (error.code === 'EALREADY' || error.code === 'EISCONN') {
- return adapter.log.warn('Adapter is already connecting/connected');
- }
- else if (error.code === 'ETIMEDOUT') {
- adapter.log.warn('Connection timed out');
- }
- else {
- adapter.log.warn(`Connection closed: ${error}`);
- }
+ const logLevel = verboseConnection ? 'warn' : 'debug';
+ if (error.code === 'ECONNREFUSED') {
+ adapter.log[logLevel]('Connection refused, make sure that there is no other Telnet connection');
+ }
+ else if (error.code === 'EHOSTUNREACH') {
+ adapter.log[logLevel]('AVR unreachable, check the Network Config of your AVR');
+ }
+ else if (error.code === 'EALREADY' || error.code === 'EISCONN') {
+ return adapter.log[logLevel]('Adapter is already connecting/connected');
+ }
+ else if (error.code === 'ETIMEDOUT') {
+ adapter.log[logLevel]('Connection timed out');
}
else {
- if (error.code === 'ECONNREFUSED') {
- adapter.log.debug('Connection refused, make sure that there is no other Telnet connection');
- }
- else if (error.code === 'EHOSTUNREACH') {
- adapter.log.debug('AVR unreachable, check the Network Config of your AVR');
- }
- else if (error.code === 'EALREADY' || error.code === 'EISCONN') {
- return adapter.log.debug('Adapter is already connecting/connected');
- }
- else if (error.code === 'ETIMEDOUT') {
- adapter.log.debug('Connection timed out');
- }
- else {
- adapter.log.warn(`Connection closed: ${error}`);
- }
+ adapter.log[logLevel](`Connection closed: ${error}`);
}
- pollingVar = null;
- adapter.setState('info.connection', false, true);
- if (!connectingVar) {
- client.destroy();
- client.unref();
- connectingVar = setTimeout(() => connect(), 30000); // Connect again in 30 seconds
- } // endIf
+ reconnect();
});
client.on('end', () => {
// Denon has closed the connection
adapter.log.warn('Denon AVR has cancelled the connection');
- pollingVar = false;
+ reconnect();
+});
+/**
+ * Reconnect to AVR after 30 seconds
+ */
+function reconnect() {
+ pollTimer = null;
adapter.setState('info.connection', false, true);
- if (!connectingVar) {
+ if (!connectTimer) {
client.destroy();
client.unref();
- connectingVar = setTimeout(() => connect(), 30000); // Connect again in 30 seconds
- } // endIf
-});
+ connectTimer = setTimeout(() => connect(), 30000); // Connect again in 30 seconds
+ }
+}
client.on('connect', async () => {
// Successfully connected
- clearTimeout(connectingVar);
- connectingVar = null;
+ connectTimer = null;
previousError = null;
verboseConnection = true;
adapter.setState('info.connection', true, true);
@@ -666,7 +657,7 @@ client.on('connect', async () => {
else {
adapter.log.debug('[CONNECT] Connected --> updating states on start');
updateStates(); // Update states when connected
- } // endElse
+ }
});
client.on('data', data => {
// split data by
@@ -676,8 +667,8 @@ client.on('data', data => {
// data not empty
adapter.log.debug(`[DATA] <== Incoming data: ${data}`);
handleResponse(data);
- } // endIf
- } // endFor
+ }
+ }
});
/**
* Internals
@@ -690,11 +681,11 @@ function connect() {
else {
adapter.log.debug(`[CONNECT] Trying to connect to ${host}:23`);
}
- connectingVar = null;
+ connectTimer = null;
client.connect({ port: 23, host: host });
// give the connection a timeout after being idle for 35 seconds (needed after connect call)
client.setTimeout(35000);
-} // endConnect
+}
const updateCommands = [
'NSET1 ?',
'NSFRN ?',
@@ -838,7 +829,7 @@ const updateCommands = [
*/
async function updateStates() {
await sendRequests(updateCommands);
-} // endUpdateStates
+}
const pollCommands = [
'NSE',
'SLP?',
@@ -855,14 +846,13 @@ const pollCommands = [
]; // Request Display State, Sleep Timer & Quick Select
async function pollStates() {
// Polls states
- pollingVar = null;
+ pollTimer = null;
await sendRequests(pollCommands);
-} // endPollStates
+}
/**
* Send data array to socket respecting request interval
*
- * @param {string[]} requests array of requests
- * @return {Promise}
+ * @param requests array of requests
*/
async function sendRequests(requests) {
for (const req of requests) {
@@ -873,8 +863,7 @@ async function sendRequests(requests) {
/**
* Send data to socket
*
- * @param {string} req
- * @return {Promise}
+ * @param req
*/
function sendRequest(req) {
return new Promise(resolve => {
@@ -883,20 +872,20 @@ function sendRequest(req) {
resolve();
});
});
-} // endSendRequest
-function handleUsResponse(data) {
+}
+async function handleUsResponse(data) {
+ var _a, _b;
adapter.log.debug(`[INFO] US command to handle is ${data}`);
if (data.startsWith('SD00')) {
// Handle display brightness
- adapter.getObjectAsync('display.brightness').then(obj => {
- const bright = data.substring(4);
- for (const j of Object.keys(obj.common.states)) {
- // Check if command contains one of the possible brightness states
- if (helper.decodeState(obj.common.states, j).toLowerCase().includes(bright.toLowerCase())) {
- adapter.setState('display.brightness', obj.common.states[j], true);
- } // endIf
- } // endFor
- });
+ const obj = (await adapter.getObjectAsync('display.brightness'));
+ const bright = data.substring(4);
+ for (const j of Object.keys(obj.common.states)) {
+ // Check if command contains one of the possible brightness states
+ if (helper.decodeState(obj.common.states, j).toLowerCase().includes(bright.toLowerCase())) {
+ adapter.setState('display.brightness', obj.common.states[j], true);
+ }
+ }
return;
}
else if (!data.startsWith('ST00') && /ST\d\d.+/g.test(data)) {
@@ -919,16 +908,15 @@ function handleUsResponse(data) {
else if (/SV[0-9]+/g.test(data)) {
const zoneNumber = parseInt(data.slice(2, 4)) % 2 ? parseInt(data.slice(2, 4)) + 1 : parseInt(data.slice(2, 4));
const volume = parseFloat(`${data.slice(4, 6)}.${data.slice(6, 7)}`);
- adapter.getStateAsync(`zone${zoneNumber}.operationMode`).then(state => {
- if (state.val.toString() === '0' || state.val === 'NORMAL') {
- const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'speakerTwo' : 'speakerOne';
- adapter.setState(`zone${zoneNumber}.${speaker}Volume`, volume, true);
- }
- else {
- adapter.setState(`zone${zoneNumber}.speakerOneVolume`, volume, true);
- adapter.setState(`zone${zoneNumber}.speakerTwoVolume`, volume, true);
- } // endElse
- });
+ const state = await adapter.getStateAsync(`zone${zoneNumber}.operationMode`);
+ if (((_a = state === null || state === void 0 ? void 0 : state.val) === null || _a === void 0 ? void 0 : _a.toString()) === '0' || (state === null || state === void 0 ? void 0 : state.val) === 'NORMAL') {
+ const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'speakerTwo' : 'speakerOne';
+ adapter.setState(`zone${zoneNumber}.${speaker}Volume`, volume, true);
+ }
+ else {
+ adapter.setState(`zone${zoneNumber}.speakerOneVolume`, volume, true);
+ adapter.setState(`zone${zoneNumber}.speakerTwoVolume`, volume, true);
+ }
return;
}
else if (/SO\d\d.+/g.test(data)) {
@@ -945,64 +933,60 @@ function handleUsResponse(data) {
else if (/SF\d\d.+/g.test(data)) {
const zoneNumber = parseInt(data.slice(2, 4)) % 2 ? parseInt(data.slice(2, 4)) + 1 : parseInt(data.slice(2, 4));
const command = data.substring(4);
- adapter.getStateAsync(`zone${zoneNumber}.operationMode`).then(state => {
- if (state.val.toString() === '0' || state.val === 'NORMAL') {
- const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'SpeakerTwo' : 'SpeakerOne';
- if (command === 'OFF') {
- adapter.setState(`zone${zoneNumber}.lowCutFilter${speaker}`, false, true);
- }
- else if (command === 'ON') {
- adapter.setState(`zone${zoneNumber}.lowCutFilter${speaker}`, true, true);
- }
+ const state = await adapter.getStateAsync(`zone${zoneNumber}.operationMode`);
+ if (((_b = state === null || state === void 0 ? void 0 : state.val) === null || _b === void 0 ? void 0 : _b.toString()) === '0' || (state === null || state === void 0 ? void 0 : state.val) === 'NORMAL') {
+ const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'SpeakerTwo' : 'SpeakerOne';
+ if (command === 'OFF') {
+ adapter.setState(`zone${zoneNumber}.lowCutFilter${speaker}`, false, true);
}
- else {
- if (command === 'ON') {
- adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerOne`, true, true);
- adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerTwo`, true, true);
- }
- else if (command === 'OFF') {
- adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerOne`, false, true);
- adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerTwo`, false, true);
- } // endElseIf
- } // endElse
- });
+ else if (command === 'ON') {
+ adapter.setState(`zone${zoneNumber}.lowCutFilter${speaker}`, true, true);
+ }
+ }
+ else {
+ if (command === 'ON') {
+ adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerOne`, true, true);
+ adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerTwo`, true, true);
+ }
+ else if (command === 'OFF') {
+ adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerOne`, false, true);
+ adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerTwo`, false, true);
+ }
+ }
return;
}
else if (/SI\d\d.+/g.test(data)) {
const zoneNumber = parseInt(data.slice(2, 4)) % 2 ? parseInt(data.slice(2, 4)) + 1 : parseInt(data.slice(2, 4));
const command = data.substring(4);
- adapter.getStateAsync(`zone${zoneNumber}.operationMode`).then(state => {
- if (state.val === '0' || state.val === 'NORMAL') {
- const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'Two' : 'One';
- adapter.getObjectAsync(`zone${zoneNumber}.selectInputOne`).then(obj => {
- for (const j of Object.keys(obj.common.states)) {
- // Check if command contains one of the possible brightness states
- if (helper
- .decodeState(obj.common.states, j)
- .replace(' ', '')
- .toLowerCase()
- .includes(command.toLowerCase())) {
- adapter.setState(`zone${zoneNumber}.selectInput${speaker}`, obj.common.states[j], true);
- } // endIf
- } // endFor
- });
+ const state = await adapter.getStateAsync(`zone${zoneNumber}.operationMode`);
+ if ((state === null || state === void 0 ? void 0 : state.val) === '0' || (state === null || state === void 0 ? void 0 : state.val) === 'NORMAL') {
+ const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'Two' : 'One';
+ const obj = (await adapter.getObjectAsync(`zone${zoneNumber}.selectInputOne`));
+ for (const j of Object.keys(obj.common.states)) {
+ // Check if command contains one of the possible brightness states
+ if (helper
+ .decodeState(obj.common.states, j)
+ .replace(' ', '')
+ .toLowerCase()
+ .includes(command.toLowerCase())) {
+ adapter.setState(`zone${zoneNumber}.selectInput${speaker}`, obj.common.states[j], true);
+ }
}
- else {
- adapter.getObjectAsync(`zone${zoneNumber}.selectInputOne`).then(obj => {
- for (const j of Object.keys(obj.common.states)) {
- // Check if command contains one of the possible brightness states
- if (helper
- .decodeState(obj.common.states, j)
- .replace(' ', '')
- .toLowerCase()
- .includes(command.toLowerCase())) {
- adapter.setState(`zone${zoneNumber}.selectInputOne`, obj.common.states[j], true);
- adapter.setState(`zone${zoneNumber}.selectInputTwo`, obj.common.states[j], true);
- } // endIf
- } // endFor
- });
- } // endElse
- });
+ }
+ else {
+ const obj = (await adapter.getObjectAsync(`zone${zoneNumber}.selectInputOne`));
+ for (const j of Object.keys(obj.common.states)) {
+ // Check if command contains one of the possible brightness states
+ if (helper
+ .decodeState(obj.common.states, j)
+ .replace(' ', '')
+ .toLowerCase()
+ .includes(command.toLowerCase())) {
+ adapter.setState(`zone${zoneNumber}.selectInputOne`, obj.common.states[j], true);
+ adapter.setState(`zone${zoneNumber}.selectInputTwo`, obj.common.states[j], true);
+ }
+ }
+ }
return;
}
else if (/TI\d\d.+/g.test(data)) {
@@ -1026,7 +1010,7 @@ function handleUsResponse(data) {
adapter.setState(`zone${zoneNumber}.audioSignalInput`, false, true);
}
return;
- } // endElseIf
+ }
switch (data) {
case 'PW00ON':
adapter.setState('settings.powerSystem', true, true);
@@ -1051,15 +1035,21 @@ function handleUsResponse(data) {
break;
default:
adapter.log.debug(`[INFO] <== Unhandled US command ${data}`);
- } // endSwitch
-} // endHandleUsResponse
+ }
+}
+/**
+ * Handle state change for US receiver
+ * @param id state id
+ * @param stateVal state value
+ */
async function handleUsStateChange(id, stateVal) {
- let zoneNumber;
+ var _a, _b, _c;
+ let zoneNumber = '';
if (id.startsWith('zone')) {
zoneNumber = id.split('.').shift().substring(4);
zoneNumber = parseInt(zoneNumber) < 10 ? `0${zoneNumber}` : zoneNumber;
id = id.split('.').pop();
- } // endIf
+ }
switch (id) {
case 'settings.powerSystem':
if (stateVal === true) {
@@ -1067,7 +1057,7 @@ async function handleUsStateChange(id, stateVal) {
}
else {
await sendRequest('PW00STANDBY');
- } // endElseIf
+ }
break;
case 'settings.expertReadingPattern':
try {
@@ -1078,19 +1068,20 @@ async function handleUsStateChange(id, stateVal) {
adapter.log.warn(`[COMMAND] Cannot update expert reading pattern: ${e.message}`);
}
break;
- case 'display.brightness':
- adapter.getObjectAsync('display.brightness').then(async (obj) => {
- await sendRequest(`SD00${helper.decodeState(obj.common.states, stateVal).toUpperCase().slice(0, 3)}`);
- });
+ case 'display.brightness': {
+ const obj = await adapter.getObjectAsync('display.brightness');
+ await sendRequest(`SD00${helper.decodeState(obj.common.states, stateVal).toUpperCase().slice(0, 3)}`);
break;
- case 'settings.expertCommand': // Sending custom commands
+ }
+ case 'settings.expertCommand': {
+ // Sending custom commands
await sendRequest(stateVal);
- adapter.getStateAsync('info.connection').then(state => {
- if (state.val === true) {
- adapter.setState('settings.expertCommand', stateVal, true);
- }
- });
+ const state = await adapter.getStateAsync('info.connection');
+ if ((state === null || state === void 0 ? void 0 : state.val) === true) {
+ adapter.setState('settings.expertCommand', stateVal, true);
+ }
break;
+ }
case 'settings.powerConfigurationChange':
if (stateVal.toUpperCase() === 'POWER BUTTON' || stateVal === '0') {
await sendRequest('ST00PBTN');
@@ -1118,20 +1109,20 @@ async function handleUsStateChange(id, stateVal) {
await sendRequest(`AI${zoneNumber}NO`);
}
break;
- case 'lowCutFilterSpeakerOne':
- adapter.getStateAsync(`zone${parseInt(zoneNumber)}.operationMode`).then(async (state) => {
- if (state.val.toString() === '0' || state.val === 'NORMAL') {
- zoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
- zoneNumber = parseInt(zoneNumber) < 10 ? `0${zoneNumber}` : zoneNumber;
- } // endIf
- if (stateVal) {
- await sendRequest(`SF${zoneNumber}ON`);
- }
- else {
- await sendRequest(`SF${zoneNumber}OFF`);
- }
- });
+ case 'lowCutFilterSpeakerOne': {
+ const state = await adapter.getStateAsync(`zone${parseInt(zoneNumber)}.operationMode`);
+ if (((_a = state === null || state === void 0 ? void 0 : state.val) === null || _a === void 0 ? void 0 : _a.toString()) === '0' || (state === null || state === void 0 ? void 0 : state.val) === 'NORMAL') {
+ const calculatedZoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
+ zoneNumber = calculatedZoneNumber < 10 ? `0${calculatedZoneNumber}` : calculatedZoneNumber.toString();
+ }
+ if (stateVal) {
+ await sendRequest(`SF${zoneNumber}ON`);
+ }
+ else {
+ await sendRequest(`SF${zoneNumber}OFF`);
+ }
break;
+ }
case 'lowCutFilterSpeakerTwo':
if (stateVal) {
await sendRequest(`SF${zoneNumber}ON`);
@@ -1148,23 +1139,23 @@ async function handleUsStateChange(id, stateVal) {
await sendRequest(`SO${zoneNumber}BRI`);
}
break;
- case 'selectInputOne':
- adapter.getStateAsync(`zone${parseInt(zoneNumber)}.operationMode`).then(async (state) => {
- if (state.val.toString() === '0' || state.val === 'NORMAL') {
- zoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
- zoneNumber = parseInt(zoneNumber) < 10 ? `0${zoneNumber}` : zoneNumber;
- } // endIf
- await sendRequest(`SI${zoneNumber}${stateVal.replace(' ', '')}`);
- });
+ case 'selectInputOne': {
+ const state = await adapter.getStateAsync(`zone${parseInt(zoneNumber)}.operationMode`);
+ if (((_b = state === null || state === void 0 ? void 0 : state.val) === null || _b === void 0 ? void 0 : _b.toString()) === '0' || (state === null || state === void 0 ? void 0 : state.val) === 'NORMAL') {
+ const calculatedZoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
+ zoneNumber = calculatedZoneNumber < 10 ? `0${calculatedZoneNumber}` : calculatedZoneNumber.toString();
+ }
+ await sendRequest(`SI${zoneNumber}${stateVal.replace(' ', '')}`);
break;
+ }
case 'selectInputTwo':
await sendRequest(`SI${zoneNumber}${stateVal.replace(' ', '')}`);
break;
case 'speakerOneVolume': {
const state = await adapter.getStateAsync(`zone${parseInt(zoneNumber)}.operationMode`);
- if (state.val.toString() === '0' || state.val === 'NORMAL') {
- zoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
- zoneNumber = parseInt(zoneNumber) < 10 ? `0${zoneNumber}` : zoneNumber;
+ if (((_c = state === null || state === void 0 ? void 0 : state.val) === null || _c === void 0 ? void 0 : _c.toString()) === '0' || (state === null || state === void 0 ? void 0 : state.val) === 'NORMAL') {
+ const calculatedZoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
+ zoneNumber = calculatedZoneNumber < 10 ? `0${calculatedZoneNumber}` : calculatedZoneNumber.toString();
}
const vol = helper.inputToVol(stateVal);
await sendRequest(`SV${zoneNumber}${vol}`);
@@ -1201,28 +1192,27 @@ async function handleUsStateChange(id, stateVal) {
break;
default:
adapter.log.error(`[COMMAND] ${id} is not a valid US state`);
- } // endSwitch
-} // endHandleUsStateChange
+ }
+}
/**
* Handle single response from AVR
*
- * @param {string} data
- * @return {Promise}
+ * @param data
*/
async function handleResponse(data) {
- if (!pollingVar) {
+ if (!pollTimer) {
// Keep connection alive & poll states
- pollingVar = setTimeout(() => pollStates(), pollInterval); // Poll states every configured seconds
- } // endIf
+ pollTimer = setTimeout(() => pollStates(), pollInterval); // Poll states every configured seconds
+ }
// independent from receiver we handle the expert pattern
const expertPattern = await adapter.getStateAsync('settings.expertReadingPattern');
// if ack is false, it was not a valid regex
- if (expertPattern && expertPattern.val && expertPattern.ack === true) {
+ if ((expertPattern === null || expertPattern === void 0 ? void 0 : expertPattern.val) && expertPattern.ack === true) {
const expertRegex = new RegExp(expertPattern.val);
if (expertRegex.test(data)) {
adapter.setState('settings.expertReadingResult', data, true);
- } // endIf
- } // endIf
+ }
+ }
// Detect receiver type --> first poll is SV? and SV00?
if (!receiverType) {
if (data.startsWith('SV') || /^MV\d+/g.test(data)) {
@@ -1237,7 +1227,7 @@ async function handleResponse(data) {
await createStandardStates('DE');
adapter.log.debug('[UPDATE] Updating states');
return void updateStates();
- } // endElse
+ }
}
else if (data.startsWith('BDSTATUS')) {
// DENON Ceol Piccolo protocol detected , but we handle it as DE
@@ -1272,20 +1262,19 @@ async function handleResponse(data) {
}
else {
command = `Z${zoneNumber}${command.slice(1, command.length)}`;
- } // endElse
+ }
if (/^Z\dQUICK.*/g.test(data) || /^Z\dSMART.*/g.test(data)) {
const quickNr = parseInt(data.slice(-1));
- adapter
- .getStateAsync(`zone${zoneNumber}.quickSelect`)
- .then(state => {
- if (state.val === quickNr && state.ack) {
+ try {
+ const state = await adapter.getStateAsync(`zone${zoneNumber}.quickSelect`);
+ if ((state === null || state === void 0 ? void 0 : state.val) === quickNr && state.ack) {
return;
}
- adapter.setState(`zone${zoneNumber}.quickSelect`, quickNr, true);
- })
- .catch(() => {
- adapter.setState(`zone${zoneNumber}.quickSelect`, quickNr, true);
- });
+ }
+ catch (_a) {
+ // ignore
+ }
+ adapter.setState(`zone${zoneNumber}.quickSelect`, quickNr, true);
return;
}
else if (/^Z\d.*/g.test(command)) {
@@ -1299,24 +1288,24 @@ async function handleResponse(data) {
ensureAttrInStates(`zone${zoneNumber}.selectInput`, zoneSi);
adapter.setState(`zone${zoneNumber}.selectInput`, zoneSi, true);
return;
- } // endIf
- } // endFor
- } // endIf
+ }
+ }
+ }
}
else {
// Transformation for normal commands
command = data.replace(/\s+|\d+/g, '');
- } // endElse
+ }
if (command.startsWith('DIM')) {
// Handle display brightness
- const obj = await adapter.getObjectAsync('display.brightness');
+ const obj = (await adapter.getObjectAsync('display.brightness'));
const bright = data.substring(4);
for (const j of Object.keys(obj.common.states)) {
// Check if command contains one of the possible brightness states
if (helper.decodeState(obj.common.states, j).toLowerCase().includes(bright.toLowerCase())) {
adapter.setState('display.brightness', obj.common.states[j], true);
- } // endIf
- } // endFor
+ }
+ }
return;
}
else if (command.startsWith('SI')) {
@@ -1335,17 +1324,11 @@ async function handleResponse(data) {
}
else if (command === 'MSQUICK' || command === 'MSSMART') {
const quickNr = parseInt(data.slice(-1));
- adapter
- .getStateAsync('zoneMain.quickSelect')
- .then(state => {
- if (state.val === quickNr && state.ack) {
- return;
- }
- adapter.setState('zoneMain.quickSelect', quickNr, true);
- })
- .catch(() => {
- adapter.setState('zoneMain.quickSelect', quickNr, true);
- });
+ const state = await adapter.getStateAsync('zoneMain.quickSelect');
+ if ((state === null || state === void 0 ? void 0 : state.val) === quickNr && (state === null || state === void 0 ? void 0 : state.ack)) {
+ return;
+ }
+ adapter.setState('zoneMain.quickSelect', quickNr, true);
return;
}
else if (command.startsWith('NSE') && !command.startsWith('NSET')) {
@@ -1422,7 +1405,7 @@ async function handleResponse(data) {
const state = await adapter.getStateAsync('info.onlinePresets');
let knownPresets;
if (!state || !state.val) {
- knownPresets = [];
+ knownPresets = {};
}
else {
knownPresets = JSON.parse(state.val);
@@ -1434,6 +1417,7 @@ async function handleResponse(data) {
const sortedPresets = [];
Object.keys(knownPresets)
.sort()
+ // @ts-expect-error revisit this, cannot test currently
.forEach(key => (sortedPresets[key] = knownPresets[key]));
adapter.setState('info.onlinePresets', JSON.stringify(sortedPresets), true);
return;
@@ -1450,7 +1434,7 @@ async function handleResponse(data) {
adapter.setState('tuner.frequency', freq, true);
return;
}
- let zoneNumber;
+ let zoneNumber = '';
if (/Z\d.+/g.test(command)) {
// remove zone number from command and save it
zoneNumber = command.slice(1, 2);
@@ -1498,47 +1482,25 @@ async function handleResponse(data) {
case 'ZMOFF':
adapter.setState('zoneMain.powerZone', false, true);
break;
- case 'SLP':
+ case 'SLP': {
data = data.slice(3, data.length);
- adapter
- .getStateAsync('zoneMain.sleepTimer')
- .then(state => {
- if (state.val !== parseInt(data) || !state.ack) {
- adapter.setState('zoneMain.sleepTimer', parseFloat(data), true);
- }
- })
- .catch(() => adapter.setState('zoneMain.sleepTimer', parseFloat(data), true));
- break;
- case 'SLPOFF':
- adapter
- .getStateAsync('zoneMain.sleepTimer')
- .then(state => {
- if (state.val !== 0 || !state.ack) {
- adapter.setState('zoneMain.sleepTimer', 0, true);
- }
- })
- .catch(() => adapter.setState('zoneMain.sleepTimer', 0, true));
+ const state = await adapter.getStateAsync('zoneMain.sleepTimer');
+ if ((state === null || state === void 0 ? void 0 : state.val) === parseInt(data) && (state === null || state === void 0 ? void 0 : state.ack)) {
+ return;
+ }
+ adapter.setState('zoneMain.sleepTimer', parseFloat(data), true);
+ break;
+ }
+ case 'SLPOFF': {
+ adapter.setStateChanged('zoneMain.sleepTimer', 0, true);
break;
+ }
case 'ZSLP':
data = data.slice(5, data.length);
- adapter
- .getStateAsync(`zone${zoneNumber}.sleepTimer`)
- .then(state => {
- if (state.val !== parseInt(data) || !state.ack) {
- adapter.setState(`zone${zoneNumber}.sleepTimer`, parseFloat(data), true);
- }
- })
- .catch(() => adapter.setState(`zone${zoneNumber}.sleepTimer`, parseFloat(data), true));
+ adapter.setStateChanged(`zone${zoneNumber}.sleepTimer`, parseFloat(data), true);
break;
case 'ZSLPOFF':
- adapter
- .getStateAsync(`zone${zoneNumber}.sleepTimer`)
- .then(state => {
- if (state.val !== 0 || !state.ack) {
- adapter.setState(`zone${zoneNumber}.sleepTimer`, 0, true);
- }
- })
- .catch(() => adapter.setState(`zone${zoneNumber}.sleepTimer`, 0, true));
+ adapter.setStateChanged(`zone${zoneNumber}.sleepTimer`, 0, true);
break;
case 'PSDYNEQON':
adapter.setState('settings.dynamicEq', true, true);
@@ -1555,19 +1517,18 @@ async function handleResponse(data) {
case 'PSSWL': {
// Handle Subwoofer Level for first and second SW
command = data.split(' ')[0];
- let state = data.split(' ')[1];
- state = helper.volToDb(state);
+ const volDb = helper.volToDb(data.split(' ')[1]);
if (command === 'PSSWL') {
// Check if PSSWL or PSSWL2
- adapter.setState('settings.subwooferLevel', parseFloat(state), true);
+ adapter.setState('settings.subwooferLevel', volDb, true);
}
else {
if (!capabilities.subTwo) {
// make sure sub two state exists
await createSubTwo();
}
- adapter.setState('settings.subwooferTwoLevel', parseFloat(state), true);
- } // endElse
+ adapter.setState('settings.subwooferTwoLevel', volDb, true);
+ }
break;
}
case 'PSLFCON':
@@ -1596,25 +1557,23 @@ async function handleResponse(data) {
break;
}
case 'PSBAS': {
- let state = data.split(' ')[1];
- state = helper.volToDb(state);
- adapter.setState('zoneMain.equalizerBass', state, true);
+ const volDb = helper.volToDb(data.split(' ')[1]);
+ adapter.setState('zoneMain.equalizerBass', volDb, true);
break;
}
case 'PSTRE': {
- let state = data.split(' ')[1];
- state = helper.volToDb(state);
- adapter.setState('zoneMain.equalizerTreble', state, true);
+ const volDb = helper.volToDb(data.split(' ')[1]);
+ adapter.setState('zoneMain.equalizerTreble', volDb, true);
break;
}
case 'ZPSTRE': {
- const state = helper.volToDb(data.split(' ')[1]);
- adapter.setState(`zone${zoneNumber}.equalizerTreble`, state, true);
+ const volDb = helper.volToDb(data.split(' ')[1]);
+ adapter.setState(`zone${zoneNumber}.equalizerTreble`, volDb, true);
break;
}
case 'ZPSBAS': {
- const state = helper.volToDb(data.split(' ')[1]);
- adapter.setState(`zone${zoneNumber}.equalizerBass`, state, true);
+ const volDb = helper.volToDb(data.split(' ')[1]);
+ adapter.setState(`zone${zoneNumber}.equalizerBass`, volDb, true);
break;
}
case 'ZCVFL': {
@@ -1739,7 +1698,7 @@ async function handleResponse(data) {
}
else {
adapter.setState('zoneMain.channelVolumeSubwooferTwo', helper.volToDb(channelVolume), true);
- } // endElse
+ }
break;
}
case 'PSDILON':
@@ -1749,9 +1708,8 @@ async function handleResponse(data) {
adapter.setState('settings.dialogLevelAdjust', false, true);
break;
case 'PSDIL': {
- let level = data.split(' ')[1];
- level = helper.volToDb(level);
- adapter.setState('settings.dialogLevel', level, true);
+ const level = data.split(' ')[1];
+ adapter.setState('settings.dialogLevel', helper.volToDb(level), true);
break;
}
case 'PSDIC': {
@@ -1769,13 +1727,12 @@ async function handleResponse(data) {
}
default:
adapter.log.debug(`[INFO] <== Unhandled command ${command}`);
- } // endSwitch
-} // endHandleResponse
+ }
+}
/**
* Create all zone specific objects for given zone
*
- * @param {number} zone - zone number to be created
- * @returns {Promise}
+ * @param zone - zone number to be created
*/
async function createZone(zone) {
const promises = [];
@@ -2031,140 +1988,29 @@ async function createZone(zone) {
catch (e) {
adapter.log.warn(`Could not create zone ${zone}: ${e.message}`);
}
-} // endCreateZone
+}
/**
* Creates the display states and more for AVRs which have an http-interface (states still updated via telnet)
- *
- * @returns {Promise}
*/
async function createDisplayAndHttp() {
const promises = [];
- promises.push(adapter.setObjectNotExistsAsync('display.displayContent0', {
- type: 'state',
- common: {
- name: 'Display content 0',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('display.displayContent1', {
- type: 'state',
- common: {
- name: 'Display content 1',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('display.displayContent2', {
- type: 'state',
- common: {
- name: 'Display content 2',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('display.displayContent3', {
- type: 'state',
- common: {
- name: 'Display content 3',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('display.displayContent4', {
- type: 'state',
- common: {
- name: 'Display content 4',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('display.displayContent5', {
- type: 'state',
- common: {
- name: 'Display content 5',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('display.displayContent6', {
- type: 'state',
- common: {
- name: 'Display content 6',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('display.displayContent7', {
- type: 'state',
- common: {
- name: 'Display content 7',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('display.displayContent8', {
- type: 'state',
- common: {
- name: 'Display content 8',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('zoneMain.iconURL', {
- type: 'state',
- common: {
- name: 'Cover',
- role: 'media.cover',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- }));
+ for (const [id, obj] of Object.entries(states.displayHttpStates)) {
+ promises.push(adapter.extendObjectAsync(id, obj));
+ }
try {
await Promise.all(promises);
if (!capabilities.display) {
adapter.setState('zoneMain.iconURL', `http://${host}/NetAudio/art.asp-jpg`, true);
adapter.log.debug('[INFO] <== Display Content created');
- } // endIf
+ }
capabilities.display = true;
}
catch (e) {
adapter.log.error(`Could not create Display Content states: ${e.message}`);
}
-} // endCreateDisplayAndHttp
+}
/**
* Creates the monitor state objects
- *
- * @returns {Promise}
*/
async function createMonitorState() {
const promises = [];
@@ -2210,50 +2056,15 @@ async function createMonitorState() {
catch (e) {
adapter.log.error(`Could not create monitor states: ${e.message}`);
}
-} // endCreateMonitorState
+}
/**
* Creates the subwoofer two objects
- *
- * @returns {Promise}
*/
async function createSubTwo() {
const promises = [];
- promises.push(adapter.setObjectNotExistsAsync('settings.subwooferTwoLevel', {
- type: 'state',
- common: {
- name: 'Second Subwoofer Level',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('settings.subwooferTwoLevelUp', {
- type: 'state',
- common: {
- name: 'Subwoofer Two Level Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('settings.subwooferTwoLevelDown', {
- type: 'state',
- common: {
- name: 'Subwoofer Two Level Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- }));
+ for (const [id, obj] of Object.entries(states.subwooferTwoStates)) {
+ promises.push(adapter.extendObjectAsync(id, obj));
+ }
try {
await Promise.all(promises);
if (!capabilities.subTwo) {
@@ -2264,60 +2075,15 @@ async function createSubTwo() {
catch (e) {
adapter.log.error(`Could not create subwoofer two states: ${e.message}`);
}
-} // endCreateSubTwo
+}
/**
* Creates th LFC Audyssey objects
- *
- * @returns {Promise}
*/
async function createLfcAudyssey() {
const promises = [];
- promises.push(adapter.setObjectNotExistsAsync('settings.audysseyLfc', {
- type: 'state',
- common: {
- name: 'Audyssey Low Frequency Containment',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('settings.containmentAmount', {
- type: 'state',
- common: {
- name: 'Audyssey Low Frequency Containment Amount',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: 1,
- max: 7
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('settings.containmentAmountUp', {
- type: 'state',
- common: {
- name: 'Containment Amount Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- }));
- promises.push(adapter.setObjectNotExistsAsync('settings.containmentAmountDown', {
- type: 'state',
- common: {
- name: 'Containment Amount Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- }));
+ for (const [id, obj] of Object.entries(states.lfcCommands)) {
+ promises.push(adapter.extendObjectAsync(id, obj));
+ }
try {
await Promise.all(promises);
if (!capabilities.audysseyLfc) {
@@ -2328,11 +2094,9 @@ async function createLfcAudyssey() {
catch (e) {
adapter.log.error(`Could not create Audyssey LFC states: ${e.message}`);
}
-} // endCreateLfcAudyssey
+}
/**
* Creates the picture mode objects
- *
- * @returns {Promise}
*/
async function createPictureMode() {
await adapter.setObjectNotExistsAsync('settings.pictureMode', {
@@ -2357,10 +2121,9 @@ async function createPictureMode() {
native: {}
});
capabilities.pictureMode = true;
-} // endCreatePictureMode
+}
/**
* Creates the Speaker Preset Object
- * @return {Promise}
*/
async function createSpeakerPreset() {
await adapter.setObjectNotExistsAsync('settings.speakerPreset', {
@@ -2369,6 +2132,8 @@ async function createSpeakerPreset() {
name: 'Speaker Preset',
type: 'number',
role: 'value',
+ read: true,
+ write: true,
states: {
1: '1',
2: '2'
@@ -2381,14 +2146,13 @@ async function createSpeakerPreset() {
/**
* Ensures that the val is part of the state list of given object id
*
- * @param {string} id - object id
- * @param {string} val - attribute which will be added to the object if not present
- * @return {Promise}
+ * @param id - object id
+ * @param val - attribute which will be added to the object if not present
*/
async function ensureAttrInStates(id, val) {
try {
const obj = await adapter.getObjectAsync(id);
- if (obj && obj.common && helper.isObject(obj.common.states)) {
+ if ((obj === null || obj === void 0 ? void 0 : obj.common) && helper.isObject(obj.common.states)) {
const values = Object.values(obj.common.states);
// check if its already part of the object
if (!values.includes(val)) {
@@ -2405,17 +2169,17 @@ async function ensureAttrInStates(id, val) {
/**
* Create standard state objects
*
- * @param {'DE'|'US'} type
- * @return {Promise}
+ * @param type
*/
async function createStandardStates(type) {
const promises = [];
if (type === 'DE') {
- for (const obj of helper.commonCommands) {
+ for (const obj of states.commonCommands) {
const id = obj._id;
+ // @ts-expect-error optimize structure
delete obj._id;
promises.push(adapter.extendObjectAsync(id, obj, { preserve: { common: ['name'] } }));
- } // endFor
+ }
try {
await Promise.all(promises);
adapter.log.debug('[INFO] DE states created');
@@ -2425,11 +2189,12 @@ async function createStandardStates(type) {
}
}
else if (type === 'US') {
- for (const obj of helper.usCommands) {
+ for (const obj of states.usCommands) {
const id = obj._id;
+ // @ts-expect-error optimize structure
delete obj._id;
promises.push(adapter.extendObjectAsync(id, obj, { preserve: { common: ['name'] } }));
- } // endFor
+ }
for (let i = 1; i <= 6; i++) {
// iterate over zones
const zoneNumber = i * 2;
@@ -2440,15 +2205,15 @@ async function createStandardStates(type) {
},
native: {}
}));
- for (const obj of helper.usCommandsZone) {
+ for (const obj of states.usCommandsZone) {
const id = `zone${zoneNumber}.${obj._id}`;
promises.push(adapter.setObjectNotExistsAsync(id, {
type: obj.type,
common: obj.common,
native: obj.native
}));
- } // endFor
- } // endFor
+ }
+ }
try {
await Promise.all(promises);
adapter.log.debug('[INFO] US states created');
@@ -2460,7 +2225,7 @@ async function createStandardStates(type) {
else {
throw new Error('Unknown receiver type');
}
-} // endCreateStandardStates
+}
if (module === require.main) {
startAdapter();
}
diff --git a/build/main.js.map b/build/main.js.map
index 0a032db..2efbb24 100644
--- a/build/main.js.map
+++ b/build/main.js.map
@@ -1 +1 @@
-{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH,kBAAkB,CAAC,sBAAsB;AACzC,sBAAsB;AACtB,YAAY,CAAC;AAEb,MAAM,KAAK,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAChD,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAC3B,MAAM,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACtC,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC;AAChD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;AAEhC,IAAI,OAAO,CAAC;AACZ,IAAI,IAAI,CAAC;AACT,IAAI,YAAY,C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AK;IACL,OAAO;IACP,KAAK;IACL,QAAQ;IACR,SAAS;IACT,UAAU;IACV,KAAK;IACL,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,WAAW;IACX,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,YAAY;IACZ,SAAS;IACT,SAAS;IACT,SAAS;IACT,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,eAAe;IACf,QAAQ;IACR,SAAS;IACT,SAAS;IACT,KAAK;IACL,KAAK;IACL,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,KAAK;IACL,OAAO;IACP,OAAO;IACP,SAAS;IACT,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SA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T,OAAO,CAAC,uBAAuB,CAAC,EAAE,EAAE;oBAChC,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,MAAM,EAAE,GAAG,CAAC,MAAM;oBAClB,MAAM,EAAE,GAAG,CAAC,MAAM;iBACrB,CAAC,CACL,CAAC;aACL;SACJ;QACD,IAAI;YACA,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;SACjD;QAAC,OAAO,CAAM,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE;KACJ;SAAM;QACH,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;KAC5C;AACL,CAAC;AAED,IAAI,MAAM,KAAK,OAAO,CAAC,IAAI,EAAE;IACzB,YAAY,EAAE,CAAC;CAClB;KAAM;IACH,0BAA0B;IAC1B,MAAM,CAAC,OAAO,GAAG,YAAY,CAAC;CACjC"}
\ No newline at end of file
diff --git a/gulpfile.js b/gulpfile.js
deleted file mode 100755
index f7240a9..0000000
--- a/gulpfile.js
+++ /dev/null
@@ -1,477 +0,0 @@
-/*!
- * ioBroker gulpfile
- * Date: 2019-01-28
- */
-'use strict';
-
-const gulp = require('gulp');
-const fs = require('fs');
-const pkg = require('./package.json');
-const iopackage = require('./io-package.json');
-const version = (pkg && pkg.version) ? pkg.version : iopackage.common.version;
-const fileName = 'words.js';
-const EMPTY = '';
-const translate = require('./lib/tools.js').translateText;
-const languages = {
- en: {},
- de: {},
- ru: {},
- pt: {},
- nl: {},
- fr: {},
- it: {},
- es: {},
- pl: {},
- 'zh-cn': {}
-};
-
-function lang2data(lang, isFlat) {
- let str = isFlat ? '' : '{\n';
- let count = 0;
- for (const w in lang) {
- if (lang.hasOwnProperty(w)) {
- count++;
- if (isFlat) {
- str += (lang[w] === '' ? (isFlat[w] || w) : lang[w]) + '\n';
- } else {
- const key = ' "' + w.replace(/"/g, '\\"') + '": ';
- str += key + '"' + lang[w].replace(/"/g, '\\"') + '",\n';
- }
- }
- }
- if (!count)
- return isFlat ? '' : '{\n}';
- if (isFlat) {
- return str;
- } else {
- return str.substring(0, str.length - 2) + '\n}';
- }
-}
-
-function readWordJs(src) {
- try {
- let words;
- if (fs.existsSync(src + 'js/' + fileName)) {
- words = fs.readFileSync(src + 'js/' + fileName).toString();
- } else {
- words = fs.readFileSync(src + fileName).toString();
- }
- words = words.substring(words.indexOf('{'), words.length);
- words = words.substring(0, words.lastIndexOf(';'));
-
- const resultFunc = new Function('return ' + words + ';');
-
- return resultFunc();
- } catch (e) {
- return null;
- }
-}
-
-function padRight(text, totalLength) {
- return text + (text.length < totalLength ? new Array(totalLength - text.length).join(' ') : '');
-}
-
-function writeWordJs(data, src) {
- let text = '';
- text += '/*global systemDictionary:true */\n';
- text += '\'use strict\';\n\n';
- text += 'systemDictionary = {\n';
- for (const word in data) {
- if (data.hasOwnProperty(word)) {
- text += ' ' + padRight('"' + word.replace(/"/g, '\\"') + '": {', 50);
- let line = '';
- for (const lang in data[word]) {
- if (data[word].hasOwnProperty(lang)) {
- line += '"' + lang + '": "' + padRight(data[word][lang].replace(/"/g, '\\"') + '",', 50) + ' ';
- }
- }
- if (line) {
- line = line.trim();
- line = line.substring(0, line.length - 1);
- }
- text += line + '},\n';
- }
- }
- text += '};';
- if (fs.existsSync(src + 'js/' + fileName)) {
- fs.writeFileSync(src + 'js/' + fileName, text);
- } else {
- fs.writeFileSync(src + '' + fileName, text);
- }
-}
-
-function words2languages(src) {
- const langs = Object.assign({}, languages);
- const data = readWordJs(src);
- if (data) {
- for (const word in data) {
- if (data.hasOwnProperty(word)) {
- for (const lang in data[word]) {
- if (data[word].hasOwnProperty(lang)) {
- langs[lang][word] = data[word][lang];
- // pre-fill all other languages
- for (const j in langs) {
- if (langs.hasOwnProperty(j)) {
- langs[j][word] = langs[j][word] || EMPTY;
- }
- }
- }
- }
- }
- }
- if (!fs.existsSync(src + 'i18n/')) {
- fs.mkdirSync(src + 'i18n/');
- }
- for (const l in langs) {
- if (!langs.hasOwnProperty(l))
- continue;
- const keys = Object.keys(langs[l]);
- keys.sort();
- const obj = {};
- for (let k = 0; k < keys.length; k++) {
- obj[keys[k]] = langs[l][keys[k]];
- }
- if (!fs.existsSync(src + 'i18n/' + l)) {
- fs.mkdirSync(src + 'i18n/' + l);
- }
-
- fs.writeFileSync(src + 'i18n/' + l + '/translations.json', lang2data(obj));
- }
- } else {
- console.error('Cannot read or parse ' + fileName);
- }
-}
-
-function words2languagesFlat(src) {
- const langs = Object.assign({}, languages);
- const data = readWordJs(src);
- if (data) {
- for (const word in data) {
- if (data.hasOwnProperty(word)) {
- for (const lang in data[word]) {
- if (data[word].hasOwnProperty(lang)) {
- langs[lang][word] = data[word][lang];
- // pre-fill all other languages
- for (const j in langs) {
- if (langs.hasOwnProperty(j)) {
- langs[j][word] = langs[j][word] || EMPTY;
- }
- }
- }
- }
- }
- }
- const keys = Object.keys(langs.en);
- keys.sort();
- for (const l in langs) {
- if (!langs.hasOwnProperty(l))
- continue;
- const obj = {};
- for (let k = 0; k < keys.length; k++) {
- obj[keys[k]] = langs[l][keys[k]];
- }
- langs[l] = obj;
- }
- if (!fs.existsSync(src + 'i18n/')) {
- fs.mkdirSync(src + 'i18n/');
- }
- for (const ll in langs) {
- if (!langs.hasOwnProperty(ll))
- continue;
- if (!fs.existsSync(src + 'i18n/' + ll)) {
- fs.mkdirSync(src + 'i18n/' + ll);
- }
-
- fs.writeFileSync(src + 'i18n/' + ll + '/flat.txt', lang2data(langs[ll], langs.en));
- }
- fs.writeFileSync(src + 'i18n/flat.txt', keys.join('\n'));
- } else {
- console.error('Cannot read or parse ' + fileName);
- }
-}
-
-function languagesFlat2words(src) {
- const dirs = fs.readdirSync(src + 'i18n/');
- const langs = {};
- const bigOne = {};
- const order = Object.keys(languages);
- dirs.sort(function (a, b) {
- const posA = order.indexOf(a);
- const posB = order.indexOf(b);
- if (posA === -1 && posB === -1) {
- if (a > b)
- return 1;
- if (a < b)
- return -1;
- return 0;
- } else if (posA === -1) {
- return -1;
- } else if (posB === -1) {
- return 1;
- } else {
- if (posA > posB)
- return 1;
- if (posA < posB)
- return -1;
- return 0;
- }
- });
- const keys = fs.readFileSync(src + 'i18n/flat.txt').toString().split('\n');
-
- for (let l = 0; l < dirs.length; l++) {
- if (dirs[l] === 'flat.txt')
- continue;
- const lang = dirs[l];
- const values = fs.readFileSync(src + 'i18n/' + lang + '/flat.txt').toString().split('\n');
- langs[lang] = {};
- keys.forEach(function (word, i) {
- langs[lang][word] = values[i];
- });
-
- const words = langs[lang];
- for (const word in words) {
- if (words.hasOwnProperty(word)) {
- bigOne[word] = bigOne[word] || {};
- if (words[word] !== EMPTY) {
- bigOne[word][lang] = words[word];
- }
- }
- }
- }
- // read actual words.js
- const aWords = readWordJs();
-
- const temporaryIgnore = ['flat.txt'];
- if (aWords) {
- // Merge words together
- for (const w in aWords) {
- if (aWords.hasOwnProperty(w)) {
- if (!bigOne[w]) {
- console.warn('Take from actual words.js: ' + w);
- bigOne[w] = aWords[w];
- }
- dirs.forEach(function (lang) {
- if (temporaryIgnore.indexOf(lang) !== -1)
- return;
- if (!bigOne[w][lang]) {
- console.warn('Missing "' + lang + '": ' + w);
- }
- });
- }
- }
-
- }
-
- writeWordJs(bigOne, src);
-}
-
-function languages2words(src) {
- const dirs = fs.readdirSync(src + 'i18n/');
- const langs = {};
- const bigOne = {};
- const order = Object.keys(languages);
- dirs.sort(function (a, b) {
- const posA = order.indexOf(a);
- const posB = order.indexOf(b);
- if (posA === -1 && posB === -1) {
- if (a > b)
- return 1;
- if (a < b)
- return -1;
- return 0;
- } else if (posA === -1) {
- return -1;
- } else if (posB === -1) {
- return 1;
- } else {
- if (posA > posB)
- return 1;
- if (posA < posB)
- return -1;
- return 0;
- }
- });
- for (let l = 0; l < dirs.length; l++) {
- if (dirs[l] === 'flat.txt')
- continue;
- const lang = dirs[l];
- langs[lang] = fs.readFileSync(src + 'i18n/' + lang + '/translations.json').toString();
- langs[lang] = JSON.parse(langs[lang]);
- const words = langs[lang];
- for (const word in words) {
- if (words.hasOwnProperty(word)) {
- bigOne[word] = bigOne[word] || {};
- if (words[word] !== EMPTY) {
- bigOne[word][lang] = words[word];
- }
- }
- }
- }
- // read actual words.js
- const aWords = readWordJs();
-
- const temporaryIgnore = ['flat.txt'];
- if (aWords) {
- // Merge words together
- for (const w in aWords) {
- if (aWords.hasOwnProperty(w)) {
- if (!bigOne[w]) {
- console.warn('Take from actual words.js: ' + w);
- bigOne[w] = aWords[w];
- }
- dirs.forEach(function (lang) {
- if (temporaryIgnore.indexOf(lang) !== -1)
- return;
- if (!bigOne[w][lang]) {
- console.warn('Missing "' + lang + '": ' + w);
- }
- });
- }
- }
-
- }
-
- writeWordJs(bigOne, src);
-}
-
-async function translateNotExisting(obj, baseText, yandex) {
- let t = obj['en'];
- if (!t) {
- t = baseText;
- }
-
- if (t) {
- for (const l in languages) {
- if (!obj[l]) {
- const time = new Date().getTime();
- obj[l] = await translate(t, l, yandex);
- console.log('en -> ' + l + ' ' + (new Date().getTime() - time) + ' ms');
- }
- }
- }
-}
-
-//TASKS
-
-gulp.task('adminWords2languages', function (done) {
- words2languages('./admin/');
- done();
-});
-
-gulp.task('adminWords2languagesFlat', function (done) {
- words2languagesFlat('./admin/');
- done();
-});
-
-gulp.task('adminLanguagesFlat2words', function (done) {
- languagesFlat2words('./admin/');
- done();
-});
-
-gulp.task('adminLanguages2words', function (done) {
- languages2words('./admin/');
- done();
-});
-
-gulp.task('updatePackages', function (done) {
- iopackage.common.version = pkg.version;
- iopackage.common.news = iopackage.common.news || {};
- if (!iopackage.common.news[pkg.version]) {
- const news = iopackage.common.news;
- const newNews = {};
-
- newNews[pkg.version] = {
- en: 'news',
- de: 'neues',
- ru: 'новое',
- pt: 'novidades',
- nl: 'nieuws',
- fr: 'nouvelles',
- it: 'notizie',
- es: 'noticias',
- pl: 'nowości',
- 'zh-cn': 'æ–°'
- };
- iopackage.common.news = Object.assign(newNews, news);
- }
- fs.writeFileSync('io-package.json', JSON.stringify(iopackage, null, 4));
- done();
-});
-
-gulp.task('updateReadme', function (done) {
- const readme = fs.readFileSync('README.md').toString();
- const pos = readme.indexOf('## Changelog\n');
- if (pos !== -1) {
- const readmeStart = readme.substring(0, pos + '## Changelog\n'.length);
- const readmeEnd = readme.substring(pos + '## Changelog\n'.length);
-
- if (readme.indexOf(version) === -1) {
- const timestamp = new Date();
- const date = timestamp.getFullYear() + '-' +
- ('0' + (timestamp.getMonth() + 1).toString(10)).slice(-2) + '-' +
- ('0' + (timestamp.getDate()).toString(10)).slice(-2);
-
- let news = '';
- if (iopackage.common.news && iopackage.common.news[pkg.version]) {
- news += '* ' + iopackage.common.news[pkg.version].en;
- }
-
- fs.writeFileSync('README.md', readmeStart + '### ' + version + ' (' + date + ')\n' + (news ? news + '\n\n' : '\n') + readmeEnd);
- }
- }
- done();
-});
-
-gulp.task('translate', async function () {
-
- let yandex;
- const i = process.argv.indexOf('--yandex');
- if (i > -1) {
- yandex = process.argv[i + 1];
- }
-
- if (iopackage && iopackage.common) {
- if (iopackage.common.news) {
- console.log('Translate News');
- for (const k in iopackage.common.news) {
- console.log('News: ' + k);
- const nw = iopackage.common.news[k];
- await translateNotExisting(nw, null, yandex);
- }
- }
- if (iopackage.common.titleLang) {
- console.log('Translate Title');
- await translateNotExisting(iopackage.common.titleLang, iopackage.common.title, yandex);
- }
- if (iopackage.common.desc) {
- console.log('Translate Description');
- await translateNotExisting(iopackage.common.desc, null, yandex);
- }
-
- if (fs.existsSync('./admin/i18n/en/translations.json')) {
- const enTranslations = require('./admin/i18n/en/translations.json');
- for (const l in languages) {
- console.log('Translate Text: ' + l);
- let existing = {};
- if (fs.existsSync('./admin/i18n/' + l + '/translations.json')) {
- existing = require('./admin/i18n/' + l + '/translations.json');
- }
- for (const t in enTranslations) {
- if (!existing[t]) {
- existing[t] = await translate(enTranslations[t], l, yandex);
- }
- }
- if (!fs.existsSync('./admin/i18n/' + l + '/')) {
- fs.mkdirSync('./admin/i18n/' + l + '/');
- }
- fs.writeFileSync('./admin/i18n/' + l + '/translations.json', JSON.stringify(existing, null, 4));
- }
- }
-
- }
- fs.writeFileSync('io-package.json', JSON.stringify(iopackage, null, 4));
-});
-
-gulp.task('translateAndUpdateWordsJS', gulp.series('translate', 'adminLanguages2words', 'adminWords2languages'));
-
-gulp.task('default', gulp.series('updatePackages', 'updateReadme'));
\ No newline at end of file
diff --git a/io-package.json b/io-package.json
index 8a22dfe..7539ac6 100755
--- a/io-package.json
+++ b/io-package.json
@@ -146,6 +146,14 @@
},
"objects": [],
"instanceObjects": [
+ {
+ "_id": "",
+ "type": "device",
+ "common": {
+ "name": "DENON device"
+ },
+ "native": ""
+ },
{
"_id": "info",
"type": "channel",
diff --git a/package.json b/package.json
index 830cf9f..f722f7e 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "iobroker.denon",
"version": "1.13.4",
"engines": {
- "node": ">=10.0.0"
+ "node": ">=14.0.0"
},
"description": "ioBroker DENON/Marantz Adapter",
"author": {
diff --git a/src/lib/adapter-config.d.ts b/src/lib/adapter-config.d.ts
new file mode 100644
index 0000000..30ca2e3
--- /dev/null
+++ b/src/lib/adapter-config.d.ts
@@ -0,0 +1,15 @@
+// This file extends the AdapterConfig type from "@types/iobroker"
+
+// Augment the globally declared type ioBroker.AdapterConfig
+declare global {
+ namespace ioBroker {
+ interface AdapterConfig {
+ ip: string;
+ pollInterval: number;
+ requestInterval: number;
+ }
+ }
+}
+
+// this is required so the above AdapterConfig is found by TypeScript / type checking
+export {};
diff --git a/src/lib/states.ts b/src/lib/states.ts
new file mode 100644
index 0000000..95f8853
--- /dev/null
+++ b/src/lib/states.ts
@@ -0,0 +1,1403 @@
+export const commonCommands: ioBroker.AnyObject[] = [
+ {
+ _id: 'info.friendlyName',
+ type: 'state',
+ common: {
+ role: 'info.name',
+ name: 'Friendly Name',
+ type: 'string',
+ read: true,
+ write: false
+ },
+ native: {}
+ },
+ {
+ _id: 'tuner',
+ type: 'channel',
+ common: {
+ name: 'Tuner'
+ },
+ native: {}
+ },
+ {
+ _id: 'tuner.frequencyUp',
+ type: 'state',
+ common: {
+ name: 'Tuner Frequency Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'tuner.frequencyDown',
+ type: 'state',
+ common: {
+ name: 'Tuner Frequency Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'tuner.stationName',
+ type: 'state',
+ common: {
+ name: 'Tuner Station Name',
+ role: 'text',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'tuner.frequency',
+ type: 'state',
+ common: {
+ name: 'Tuner Frequency',
+ role: 'value',
+ type: 'number',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain',
+ type: 'channel',
+ common: {
+ name: 'Main Zone'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.powerZone',
+ type: 'state',
+ common: {
+ name: 'Main Zone Power State',
+ role: 'switch.power.zone',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.volume',
+ type: 'state',
+ common: {
+ name: 'Main Volume',
+ role: 'level.volume',
+ type: 'number',
+ read: true,
+ write: true,
+ min: 0,
+ max: 98
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.volumeUp',
+ type: 'state',
+ common: {
+ name: 'Volume Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.volumeDown',
+ type: 'state',
+ common: {
+ name: 'Volume Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.selectInput',
+ type: 'state',
+ common: {
+ name: 'Select input',
+ role: 'media.input',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'PHONO',
+ 1: 'CD',
+ 2: 'TUNER',
+ 3: 'DVD',
+ 4: 'BD',
+ 5: 'TV',
+ 6: 'SAT/CBL',
+ 7: 'MPLAY',
+ 8: 'GAME',
+ 9: 'NET',
+ 10: 'SPOTIFY',
+ 11: 'LASTFM',
+ 12: 'IRADIO',
+ 13: 'SERVER',
+ 14: 'FAVORITES',
+ 15: 'AUX1',
+ 16: 'AUX2',
+ 17: 'AUX3',
+ 18: 'AUX4',
+ 19: 'AUX5',
+ 20: 'AUX6',
+ 21: 'AUX7',
+ 22: 'BT',
+ 23: 'USB'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.playPause',
+ type: 'state',
+ common: {
+ name: 'Play/Pause',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.play',
+ type: 'state',
+ common: {
+ name: 'Play',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.pause',
+ type: 'state',
+ common: {
+ name: 'Pause',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.skipPlus',
+ type: 'state',
+ common: {
+ name: 'Next',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.skipMinus',
+ type: 'state',
+ common: {
+ name: 'Previous',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.maximumVolume',
+ type: 'state',
+ common: {
+ name: 'Maximum Volume',
+ role: 'state',
+ type: 'number',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.muteIndicator',
+ type: 'state',
+ common: {
+ name: 'Muted',
+ role: 'media.mute',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.quickSelect',
+ type: 'state',
+ common: {
+ name: 'Quick select',
+ role: 'media.quickSelect',
+ type: 'number',
+ write: true,
+ read: true,
+ min: 1,
+ max: 5
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.sleepTimer',
+ type: 'state',
+ common: {
+ name: 'Sleep timer',
+ role: 'level.timer.sleep',
+ unit: 'min',
+ type: 'number',
+ write: true,
+ read: true,
+ min: 0,
+ max: 120
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerBass',
+ type: 'state',
+ common: {
+ name: 'Bass Level',
+ role: 'level.bass',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: -6,
+ max: 6
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerBassUp',
+ type: 'state',
+ common: {
+ name: 'Bass Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerBassDown',
+ type: 'state',
+ common: {
+ name: 'Bass Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerTreble',
+ type: 'state',
+ common: {
+ name: 'Treble Level',
+ role: 'level.treble',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: -6,
+ max: 6
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerTrebleUp',
+ type: 'state',
+ common: {
+ name: 'Treble Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.equalizerTrebleDown',
+ type: 'state',
+ common: {
+ name: 'Treble Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: -12,
+ max: 12
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeCenter',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Center',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundDolbyRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Dolby Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundDolbyLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Dolby Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontDolbyLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Dolby Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontDolbyRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Dolby Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontHeightLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Height Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeFrontHeightRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Front Height Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeRearHeightLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Rear Height Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeRearHeightRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Rear Height Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundHeightRight',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Height Right',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSurroundHeightLeft',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Surround Height Left',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSubwoofer',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Subwoofer',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.channelVolumeSubwooferTwo',
+ type: 'state',
+ common: {
+ name: 'Channel Volume Subwoofer Two',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.volumeDB',
+ type: 'state',
+ common: {
+ name: 'Main Volume DB',
+ role: 'level.volume.main',
+ type: 'number',
+ read: true,
+ write: true,
+ min: -80,
+ max: 18,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneMain.maximumVolumeDB',
+ type: 'state',
+ common: {
+ name: 'Maximum Volume DB',
+ role: 'state',
+ type: 'number',
+ write: false,
+ read: true,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.surroundMode',
+ type: 'state',
+ common: {
+ name: 'Surround mode',
+ role: 'state',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'STEREO',
+ 1: 'VIRTUAL',
+ 2: 'VIDEO GAME',
+ 3: 'MCH STEREO',
+ 4: 'DTS SURROUND',
+ 5: 'DOLBY DIGITAL',
+ 6: 'MOVIE',
+ 7: 'MUSIC',
+ 8: 'DIRECT',
+ 9: 'PURE DIRECT',
+ 10: 'AUTO',
+ 11: 'GAME',
+ 12: 'AURO3D',
+ 13: 'AURO2DSURR',
+ 14: 'WIDE SCREEN',
+ 15: 'SUPER STADIUM',
+ 16: 'ROCK ARENA',
+ 17: 'JAZZ CLUB',
+ 18: 'CLASSIC CONCERT',
+ 19: 'MONO MOVIE',
+ 20: 'MATRIX'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.dynamicEq',
+ type: 'state',
+ common: {
+ name: 'Dynamic Eq',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.subwooferLevelState',
+ type: 'state',
+ common: {
+ name: 'Subwoofer Level State',
+ desc: 'Subwoofer Level State',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.subwooferLevel',
+ type: 'state',
+ common: {
+ name: 'Subwoofer Level',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.subwooferLevelUp',
+ type: 'state',
+ common: {
+ name: 'Subwoofer level Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.subwooferLevelDown',
+ type: 'state',
+ common: {
+ name: 'Subwoofer level Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.multEq',
+ type: 'state',
+ common: {
+ name: 'Mult EQ',
+ role: 'level',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'OFF',
+ 1: 'AUDYSSEY',
+ 2: 'BYP.LR',
+ 3: 'FLAT',
+ 4: 'MANUAL'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.dynamicVolume',
+ type: 'state',
+ common: {
+ name: 'Dynamic Volume',
+ role: 'level',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'OFF',
+ 1: 'LIT',
+ 2: 'MED',
+ 3: 'HEV'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.referenceLevelOffset',
+ type: 'state',
+ common: {
+ name: 'Reference Level Offset',
+ role: 'level',
+ type: 'string',
+ write: true,
+ read: true,
+ unit: 'dB',
+ states: {
+ 0: '0',
+ 5: '5',
+ 10: '10',
+ 15: '15'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.toneControl',
+ type: 'state',
+ common: {
+ name: 'Tone Control',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.cursorUp',
+ type: 'state',
+ common: {
+ name: 'Cursor Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.cursorDown',
+ type: 'state',
+ common: {
+ name: 'Cursor Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.cursorRight',
+ type: 'state',
+ common: {
+ name: 'Cursor Right',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.cursorLeft',
+ type: 'state',
+ common: {
+ name: 'Cursor Left',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.enter',
+ type: 'state',
+ common: {
+ name: 'Enter',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.return',
+ type: 'state',
+ common: {
+ name: 'Return',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.option',
+ type: 'state',
+ common: {
+ name: 'Option',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.info',
+ type: 'state',
+ common: {
+ name: 'Info',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.setupMenu',
+ type: 'state',
+ common: {
+ name: 'Setup Menu',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.centerSpread',
+ type: 'state',
+ common: {
+ name: 'Center Spread',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'info.onlinePresets',
+ type: 'state',
+ common: {
+ name: 'Net Audio Presets',
+ role: 'presets.json',
+ type: 'string',
+ write: false,
+ read: true,
+ def: '{}'
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.savePreset',
+ type: 'state',
+ common: {
+ name: 'Save Net Audio Preset',
+ role: 'presets.save',
+ type: 'string',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.loadPreset',
+ type: 'state',
+ common: {
+ name: 'Load Net Audio Preset',
+ role: 'presets.load',
+ type: 'string',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.lfeAmount',
+ type: 'state',
+ common: {
+ name: 'LFE Amount',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: 0,
+ max: 10
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.dialogLevelAdjust',
+ type: 'state',
+ common: {
+ name: 'Dialog Level Adjustment',
+ role: 'indicator',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.dialogLevel',
+ type: 'state',
+ common: {
+ name: 'Dialog Level',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: -12,
+ max: 12
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.dialogControl',
+ type: 'state',
+ common: {
+ name: 'Dialog Control',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ unit: 'dB',
+ min: 0,
+ max: 6
+ },
+ native: {}
+ }
+];
+
+export const usCommandsZone: ioBroker.StateObject[] = [
+ {
+ _id: 'speakerOneVolume',
+ type: 'state',
+ common: {
+ name: 'Speaker One Volume',
+ role: 'level.volume',
+ type: 'number',
+ write: true,
+ read: true,
+ min: 0,
+ max: 99
+ },
+ native: {}
+ },
+ {
+ _id: 'speakerTwoVolume',
+ type: 'state',
+ common: {
+ name: 'Speaker Two Volume',
+ role: 'level.volume',
+ type: 'number',
+ write: true,
+ read: true,
+ min: 0,
+ max: 99
+ },
+ native: {}
+ },
+ {
+ _id: 'selectInputOne',
+ type: 'state',
+ common: {
+ name: 'Speaker One Select Input',
+ role: 'media.input',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'BUS L',
+ 1: 'BUS R',
+ 2: 'BUS M',
+ 3: 'AUX'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'selectInputTwo',
+ type: 'state',
+ common: {
+ name: 'Speaker Two Select Input',
+ role: 'media.input',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'BUS L',
+ 1: 'BUS R',
+ 2: 'BUS M',
+ 3: 'AUX'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'operationMode',
+ type: 'state',
+ common: {
+ name: 'Operation Mode',
+ role: 'media.mode',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'NORMAL',
+ 1: 'BRIDGED'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'lowCutFilterSpeakerOne',
+ type: 'state',
+ common: {
+ name: 'Speaker One Channel Low Cut Filter',
+ role: 'media.switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'lowCutFilterSpeakerTwo',
+ type: 'state',
+ common: {
+ name: 'Speaker Two Channel Low Cut Filter',
+ role: 'media.switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'zoneTurnOnModeChange',
+ type: 'state',
+ common: {
+ name: 'Zone Turn On Mode Change',
+ role: 'media.status',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'Constant',
+ 1: 'Trigger in',
+ 2: 'Audio signal',
+ 3: 'Off'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'triggerInput',
+ type: 'state',
+ common: {
+ name: 'Zone Trigger Input',
+ role: 'media.input',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ {
+ _id: 'audioSignalInput',
+ type: 'state',
+ common: {
+ name: 'Channel Audio Signal Input',
+ role: 'media.input',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ }
+];
+
+export const usCommands: ioBroker.StateObject[] = [
+ {
+ _id: 'settings.powerConfigurationChange',
+ type: 'state',
+ common: {
+ name: 'Power Configuration Change',
+ role: 'media.status',
+ type: 'string',
+ write: true,
+ read: true,
+ states: {
+ 0: 'Power Button',
+ 1: 'Master Trigger',
+ 2: 'On Line'
+ }
+ },
+ native: {}
+ },
+ {
+ _id: 'settings.masterTriggerInput',
+ type: 'state',
+ common: {
+ name: 'Master Trigger Input',
+ role: 'media.status',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ }
+];
+
+export const lfcCommands: Record = {
+ 'settings.audysseyLfc': {
+ type: 'state',
+ common: {
+ name: 'Audyssey Low Frequency Containment',
+ role: 'switch',
+ type: 'boolean',
+ write: true,
+ read: true
+ },
+ native: {}
+ },
+ 'settings.containmentAmount': {
+ type: 'state',
+ common: {
+ name: 'Audyssey Low Frequency Containment Amount',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: 1,
+ max: 7
+ },
+ native: {}
+ },
+ 'settings.containmentAmountUp': {
+ type: 'state',
+ common: {
+ name: 'Containment Amount Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ 'settings.containmentAmountDown': {
+ type: 'state',
+ common: {
+ name: 'Containment Amount Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ }
+};
+
+export const subwooferTwoStates: Record = {
+ 'settings.subwooferTwoLevel': {
+ type: 'state',
+ common: {
+ name: 'Second Subwoofer Level',
+ role: 'level',
+ type: 'number',
+ write: true,
+ read: true,
+ min: -12,
+ max: 12,
+ unit: 'dB'
+ },
+ native: {}
+ },
+ 'settings.subwooferTwoLevelUp': {
+ type: 'state',
+ common: {
+ name: 'Subwoofer Two Level Up',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ },
+ 'settings.subwooferTwoLevelDown': {
+ type: 'state',
+ common: {
+ name: 'Subwoofer Two Level Down',
+ role: 'button',
+ type: 'boolean',
+ write: true,
+ read: false
+ },
+ native: {}
+ }
+};
+
+export const displayHttpStates: Record = {
+ 'display.displayContent0': {
+ type: 'state',
+ common: {
+ name: 'Display content 0',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent1': {
+ type: 'state',
+ common: {
+ name: 'Display content 1',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent2': {
+ type: 'state',
+ common: {
+ name: 'Display content 2',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent3': {
+ type: 'state',
+ common: {
+ name: 'Display content 3',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent4': {
+ type: 'state',
+ common: {
+ name: 'Display content 4',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent5': {
+ type: 'state',
+ common: {
+ name: 'Display content 5',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent6': {
+ type: 'state',
+ common: {
+ name: 'Display content 6',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent7': {
+ type: 'state',
+ common: {
+ name: 'Display content 7',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'display.displayContent8': {
+ type: 'state',
+ common: {
+ name: 'Display content 8',
+ role: 'info.display',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ },
+ 'zoneMain.iconURL': {
+ type: 'state',
+ common: {
+ name: 'Cover',
+ role: 'media.cover',
+ type: 'string',
+ write: false,
+ read: true
+ },
+ native: {}
+ }
+};
diff --git a/src/lib/tools.ts b/src/lib/tools.ts
deleted file mode 100644
index ef31f98..0000000
--- a/src/lib/tools.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-import axios from 'axios';
-
-/**
- * Tests whether the given variable is a real object and not an Array
- * @param it The variable to test
- */
-export function isObject(it: any): it is Record {
- // This is necessary because:
- // typeof null === 'object'
- // typeof [] === 'object'
- // [] instanceof Object === true
- return Object.prototype.toString.call(it) === '[object Object]';
-}
-
-/**
- * Tests whether the given variable is really an Array
- * @param it The variable to test
- */
-export function isArray(it: any): it is any[] {
- if (Array.isArray) {
- return Array.isArray(it);
- }
- return Object.prototype.toString.call(it) === '[object Array]';
-}
-
-/**
- * Translates text using the Google Translate API
- * @param text The text to translate
- * @param targetLang The target languate
- * @param yandex api key
- */
-export async function translateText(text: string, targetLang: string, yandex: string): Promise {
- if (targetLang === 'en') {
- return text;
- }
- if (yandex) {
- await translateYandex(text, targetLang, yandex);
- } else {
- await translateGoogle(text, targetLang);
- }
-}
-
-export async function translateYandex(text: string, targetLang: string, yandex: string): Promise {
- if (targetLang === 'zh-cn') {
- targetLang = 'zh';
- }
- try {
- const url = `https://translate.yandex.net/api/v1.5/tr.json/translate?key=${yandex}&text=${encodeURIComponent(
- text
- )}&lang=en-${targetLang}`;
- const response = await axios({ url, timeout: 15000 });
- if (response.data && response.data.text) {
- return response.data.text[0];
- }
- throw new Error('Invalid response for translate request');
- } catch (e: any) {
- throw new Error(`Could not translate to "${targetLang}": ${e.message}`);
- }
-}
-
-export async function translateGoogle(text: string, targetLang: string): Promise {
- try {
- const url = `http://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=${targetLang}&dt=t&q=${encodeURIComponent(
- text
- )}&ie=UTF-8&oe=UTF-8`;
- const response = await axios({ url, timeout: 15000 });
- if (isArray(response.data)) {
- // we got a valid response
- return response.data[0][0][0];
- }
- throw new Error('Invalid response for translate request');
- } catch (e: any) {
- throw new Error(`Could not translate to "${targetLang}": ${e.message}`);
- }
-}
diff --git a/src/lib/upnp.ts b/src/lib/upnp.ts
index f2211c7..5bf2861 100755
--- a/src/lib/upnp.ts
+++ b/src/lib/upnp.ts
@@ -2,6 +2,13 @@ import http from 'http';
import dgram from 'dgram';
import { networkInterfaces } from 'os';
+interface SSDPResultEntry {
+ ip: string;
+ data?: any;
+ name: string;
+ manufacturer?: string;
+}
+
/**
* Tries to read HTML page.
*
@@ -13,7 +20,7 @@ export function httpGet(
link: string,
timeout: number,
callback: (err: any, result: string | null, link?: string) => void
-) {
+): void {
const req = http
.get(link, res => {
const statusCode = res.statusCode;
@@ -69,7 +76,6 @@ export function httpGet(
*
*
* @alias ssdpScan
- * @memberof tools
* @param text filter string like "urn:dial-multiscreen-org:service:dial:1"
* @param readXml if LOCATION xml should be read
* @param timeout timeout in ms (default 1000)
@@ -79,9 +85,9 @@ export function ssdpScan(
text: string,
readXml: boolean,
timeout: number,
- callback: (err: any, res: any, ip?: string, xmlData?: any) => void
-) {
- timeout = timeout || 1000;
+ callback: (err: Error | null, res: SSDPResultEntry[]) => void
+): void {
+ timeout = timeout || 1_000;
let timer: NodeJS.Timeout | undefined | null;
@@ -199,5 +205,5 @@ export function ssdpScan(
// @ts-expect-error fix it
callback = null;
}
- }, timeout || 1000);
+ }, timeout || 1_000);
}
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
index 9157955..638b70f 100644
--- a/src/lib/utils.ts
+++ b/src/lib/utils.ts
@@ -40,7 +40,7 @@ export function inputToVol(input: number): string {
* Convert volume to dB
*
* @alias volToDb
- * @param vol volume e. g. '50.5'
+ * @param volStr volume e. g. '50.5'
* @returns dB
*/
export function volToDb(volStr: string): number {
@@ -79,1209 +79,6 @@ export function dbToVol(vol: string): string {
return vol;
}
-export const commonCommands: ioBroker.AnyObject[] = [
- {
- _id: 'info.friendlyName',
- type: 'state',
- common: {
- role: 'info.name',
- name: 'Friendly Name',
- type: 'string',
- read: true,
- write: false
- },
- native: {}
- },
- {
- _id: 'tuner',
- type: 'channel',
- common: {
- name: 'Tuner'
- },
- native: {}
- },
- {
- _id: 'tuner.frequencyUp',
- type: 'state',
- common: {
- name: 'Tuner Frequency Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'tuner.frequencyDown',
- type: 'state',
- common: {
- name: 'Tuner Frequency Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'tuner.stationName',
- type: 'state',
- common: {
- name: 'Tuner Station Name',
- role: 'text',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- },
- {
- _id: 'tuner.frequency',
- type: 'state',
- common: {
- name: 'Tuner Frequency',
- role: 'value',
- type: 'number',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain',
- type: 'channel',
- common: {
- name: 'Main Zone'
- },
- native: {}
- },
- {
- _id: 'zoneMain.powerZone',
- type: 'state',
- common: {
- name: 'Main Zone Power State',
- role: 'switch.power.zone',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'zoneMain.volume',
- type: 'state',
- common: {
- name: 'Main Volume',
- role: 'level.volume',
- type: 'number',
- read: true,
- write: true,
- min: 0,
- max: 98
- },
- native: {}
- },
- {
- _id: 'zoneMain.volumeUp',
- type: 'state',
- common: {
- name: 'Volume Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.volumeDown',
- type: 'state',
- common: {
- name: 'Volume Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.selectInput',
- type: 'state',
- common: {
- name: 'Select input',
- role: 'media.input',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'PHONO',
- 1: 'CD',
- 2: 'TUNER',
- 3: 'DVD',
- 4: 'BD',
- 5: 'TV',
- 6: 'SAT/CBL',
- 7: 'MPLAY',
- 8: 'GAME',
- 9: 'NET',
- 10: 'SPOTIFY',
- 11: 'LASTFM',
- 12: 'IRADIO',
- 13: 'SERVER',
- 14: 'FAVORITES',
- 15: 'AUX1',
- 16: 'AUX2',
- 17: 'AUX3',
- 18: 'AUX4',
- 19: 'AUX5',
- 20: 'AUX6',
- 21: 'AUX7',
- 22: 'BT',
- 23: 'USB'
- }
- },
- native: {}
- },
- {
- _id: 'zoneMain.playPause',
- type: 'state',
- common: {
- name: 'Play/Pause',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.play',
- type: 'state',
- common: {
- name: 'Play',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.pause',
- type: 'state',
- common: {
- name: 'Pause',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.skipPlus',
- type: 'state',
- common: {
- name: 'Next',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.skipMinus',
- type: 'state',
- common: {
- name: 'Previous',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.maximumVolume',
- type: 'state',
- common: {
- name: 'Maximum Volume',
- role: 'state',
- type: 'number',
- write: false,
- read: true
- },
- native: {}
- },
- {
- _id: 'zoneMain.muteIndicator',
- type: 'state',
- common: {
- name: 'Muted',
- role: 'media.mute',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'zoneMain.quickSelect',
- type: 'state',
- common: {
- name: 'Quick select',
- role: 'media.quickSelect',
- type: 'number',
- write: true,
- read: true,
- min: 1,
- max: 5
- },
- native: {}
- },
- {
- _id: 'zoneMain.sleepTimer',
- type: 'state',
- common: {
- name: 'Sleep timer',
- role: 'level.timer.sleep',
- unit: 'min',
- type: 'number',
- write: true,
- read: true,
- min: 0,
- max: 120
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerBass',
- type: 'state',
- common: {
- name: 'Bass Level',
- role: 'level.bass',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: -6,
- max: 6
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerBassUp',
- type: 'state',
- common: {
- name: 'Bass Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerBassDown',
- type: 'state',
- common: {
- name: 'Bass Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerTreble',
- type: 'state',
- common: {
- name: 'Treble Level',
- role: 'level.treble',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: -6,
- max: 6
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerTrebleUp',
- type: 'state',
- common: {
- name: 'Treble Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.equalizerTrebleDown',
- type: 'state',
- common: {
- name: 'Treble Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Front Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: -12,
- max: 12
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontRight',
- type: 'state',
- common: {
- name: 'Channel Volume Front Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeCenter',
- type: 'state',
- common: {
- name: 'Channel Volume Center',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundRight',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundDolbyRight',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Dolby Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundDolbyLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Dolby Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontDolbyLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Front Dolby Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontDolbyRight',
- type: 'state',
- common: {
- name: 'Channel Volume Front Dolby Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontHeightLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Front Height Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeFrontHeightRight',
- type: 'state',
- common: {
- name: 'Channel Volume Front Height Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeRearHeightLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Rear Height Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeRearHeightRight',
- type: 'state',
- common: {
- name: 'Channel Volume Rear Height Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundHeightRight',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Height Right',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSurroundHeightLeft',
- type: 'state',
- common: {
- name: 'Channel Volume Surround Height Left',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSubwoofer',
- type: 'state',
- common: {
- name: 'Channel Volume Subwoofer',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.channelVolumeSubwooferTwo',
- type: 'state',
- common: {
- name: 'Channel Volume Subwoofer Two',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.volumeDB',
- type: 'state',
- common: {
- name: 'Main Volume DB',
- role: 'level.volume.main',
- type: 'number',
- read: true,
- write: true,
- min: -80,
- max: 18,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'zoneMain.maximumVolumeDB',
- type: 'state',
- common: {
- name: 'Maximum Volume DB',
- role: 'state',
- type: 'number',
- write: false,
- read: true,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'settings.surroundMode',
- type: 'state',
- common: {
- name: 'Surround mode',
- role: 'state',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'STEREO',
- 1: 'VIRTUAL',
- 2: 'VIDEO GAME',
- 3: 'MCH STEREO',
- 4: 'DTS SURROUND',
- 5: 'DOLBY DIGITAL',
- 6: 'MOVIE',
- 7: 'MUSIC',
- 8: 'DIRECT',
- 9: 'PURE DIRECT',
- 10: 'AUTO',
- 11: 'GAME',
- 12: 'AURO3D',
- 13: 'AURO2DSURR',
- 14: 'WIDE SCREEN',
- 15: 'SUPER STADIUM',
- 16: 'ROCK ARENA',
- 17: 'JAZZ CLUB',
- 18: 'CLASSIC CONCERT',
- 19: 'MONO MOVIE',
- 20: 'MATRIX'
- }
- },
- native: {}
- },
- {
- _id: 'settings.dynamicEq',
- type: 'state',
- common: {
- name: 'Dynamic Eq',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.subwooferLevelState',
- type: 'state',
- common: {
- name: 'Subwoofer Level State',
- desc: 'Subwoofer Level State',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.subwooferLevel',
- type: 'state',
- common: {
- name: 'Subwoofer Level',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- },
- {
- _id: 'settings.subwooferLevelUp',
- type: 'state',
- common: {
- name: 'Subwoofer level Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'settings.subwooferLevelDown',
- type: 'state',
- common: {
- name: 'Subwoofer level Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- },
- {
- _id: 'settings.multEq',
- type: 'state',
- common: {
- name: 'Mult EQ',
- role: 'level',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'OFF',
- 1: 'AUDYSSEY',
- 2: 'BYP.LR',
- 3: 'FLAT',
- 4: 'MANUAL'
- }
- },
- native: {}
- },
- {
- _id: 'settings.dynamicVolume',
- type: 'state',
- common: {
- name: 'Dynamic Volume',
- role: 'level',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'OFF',
- 1: 'LIT',
- 2: 'MED',
- 3: 'HEV'
- }
- },
- native: {}
- },
- {
- _id: 'settings.referenceLevelOffset',
- type: 'state',
- common: {
- name: 'Reference Level Offset',
- role: 'level',
- type: 'string',
- write: true,
- read: true,
- unit: 'dB',
- states: {
- 0: '0',
- 5: '5',
- 10: '10',
- 15: '15'
- }
- },
- native: {}
- },
- {
- _id: 'settings.toneControl',
- type: 'state',
- common: {
- name: 'Tone Control',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.cursorUp',
- type: 'state',
- common: {
- name: 'Cursor Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.cursorDown',
- type: 'state',
- common: {
- name: 'Cursor Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.cursorRight',
- type: 'state',
- common: {
- name: 'Cursor Right',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.cursorLeft',
- type: 'state',
- common: {
- name: 'Cursor Left',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.enter',
- type: 'state',
- common: {
- name: 'Enter',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.return',
- type: 'state',
- common: {
- name: 'Return',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.option',
- type: 'state',
- common: {
- name: 'Option',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.info',
- type: 'state',
- common: {
- name: 'Info',
- role: 'button',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.setupMenu',
- type: 'state',
- common: {
- name: 'Setup Menu',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.centerSpread',
- type: 'state',
- common: {
- name: 'Center Spread',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'info.onlinePresets',
- type: 'state',
- common: {
- name: 'Net Audio Presets',
- role: 'presets.json',
- type: 'string',
- write: false,
- read: true,
- def: '{}'
- },
- native: {}
- },
- {
- _id: 'settings.savePreset',
- type: 'state',
- common: {
- name: 'Save Net Audio Preset',
- role: 'presets.save',
- type: 'string',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.loadPreset',
- type: 'state',
- common: {
- name: 'Load Net Audio Preset',
- role: 'presets.load',
- type: 'string',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.lfeAmount',
- type: 'state',
- common: {
- name: 'LFE Amount',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: 0,
- max: 10
- },
- native: {}
- },
- {
- _id: 'settings.dialogLevelAdjust',
- type: 'state',
- common: {
- name: 'Dialog Level Adjustment',
- role: 'indicator',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'settings.dialogLevel',
- type: 'state',
- common: {
- name: 'Dialog Level',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: -12,
- max: 12
- },
- native: {}
- },
- {
- _id: 'settings.dialogControl',
- type: 'state',
- common: {
- name: 'Dialog Control',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- unit: 'dB',
- min: 0,
- max: 6
- },
- native: {}
- }
-];
-
-export const usCommandsZone: ioBroker.StateObject[] = [
- {
- _id: 'speakerOneVolume',
- type: 'state',
- common: {
- name: 'Speaker One Volume',
- role: 'level.volume',
- type: 'number',
- write: true,
- read: true,
- min: 0,
- max: 99
- },
- native: {}
- },
- {
- _id: 'speakerTwoVolume',
- type: 'state',
- common: {
- name: 'Speaker Two Volume',
- role: 'level.volume',
- type: 'number',
- write: true,
- read: true,
- min: 0,
- max: 99
- },
- native: {}
- },
- {
- _id: 'selectInputOne',
- type: 'state',
- common: {
- name: 'Speaker One Select Input',
- role: 'media.input',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'BUS L',
- 1: 'BUS R',
- 2: 'BUS M',
- 3: 'AUX'
- }
- },
- native: {}
- },
- {
- _id: 'selectInputTwo',
- type: 'state',
- common: {
- name: 'Speaker Two Select Input',
- role: 'media.input',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'BUS L',
- 1: 'BUS R',
- 2: 'BUS M',
- 3: 'AUX'
- }
- },
- native: {}
- },
- {
- _id: 'operationMode',
- type: 'state',
- common: {
- name: 'Operation Mode',
- role: 'media.mode',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'NORMAL',
- 1: 'BRIDGED'
- }
- },
- native: {}
- },
- {
- _id: 'lowCutFilterSpeakerOne',
- type: 'state',
- common: {
- name: 'Speaker One Channel Low Cut Filter',
- role: 'media.switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'lowCutFilterSpeakerTwo',
- type: 'state',
- common: {
- name: 'Speaker Two Channel Low Cut Filter',
- role: 'media.switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'zoneTurnOnModeChange',
- type: 'state',
- common: {
- name: 'Zone Turn On Mode Change',
- role: 'media.status',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'Constant',
- 1: 'Trigger in',
- 2: 'Audio signal',
- 3: 'Off'
- }
- },
- native: {}
- },
- {
- _id: 'triggerInput',
- type: 'state',
- common: {
- name: 'Zone Trigger Input',
- role: 'media.input',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- },
- {
- _id: 'audioSignalInput',
- type: 'state',
- common: {
- name: 'Channel Audio Signal Input',
- role: 'media.input',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- }
-];
-
-export const usCommands: ioBroker.StateObject[] = [
- {
- _id: 'settings.powerConfigurationChange',
- type: 'state',
- common: {
- name: 'Power Configuration Change',
- role: 'media.status',
- type: 'string',
- write: true,
- read: true,
- states: {
- 0: 'Power Button',
- 1: 'Master Trigger',
- 2: 'On Line'
- }
- },
- native: {}
- },
- {
- _id: 'settings.masterTriggerInput',
- type: 'state',
- common: {
- name: 'Master Trigger Input',
- role: 'media.status',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- }
-];
-
/**
* Tests whether the given variable is a real object and not an Array
* @param it The variable to test
diff --git a/src/main.js b/src/main.ts
similarity index 69%
rename from src/main.js
rename to src/main.ts
index 91034c9..3397652 100755
--- a/src/main.js
+++ b/src/main.ts
@@ -1,23 +1,18 @@
-/**
- * DENON AVR adapter
- */
-
-/* jshint -W097 */ // jshint strict:false
-/*jslint node: true */
-'use strict';
+import utils from '@iobroker/adapter-core';
+import net from 'net';
+import * as helper from './lib/utils';
+import * as states from './lib/states';
+import { ssdpScan } from './lib/upnp';
-const utils = require('@iobroker/adapter-core');
-const net = require('net');
-const helper = require(`./lib/utils`);
-const ssdpScan = require('./lib/upnp').ssdpScan;
+type AvrType = 'US' | 'DE';
const client = new net.Socket();
-let adapter;
-let host;
-let pollInterval;
-let requestInterval;
+let adapter: utils.AdapterInstance;
+let host: string;
+let pollInterval: number;
+let requestInterval: number;
let verboseConnection = true;
-let previousError;
+let previousError: string | null;
// holds a true value for already created capabilities
const capabilities = {
@@ -28,28 +23,24 @@ const capabilities = {
pictureMode: false,
speakerPreset: false
};
-const zonesCreated = {};
-let pollingVar = null;
-let connectingVar = null;
-let receiverType;
-
-function startAdapter(options) {
- options = options || {};
- Object.assign(options, {
- name: 'denon'
- });
- adapter = new utils.Adapter(options);
+const zonesCreated: Record = {};
+let pollTimer: NodeJS.Timeout | null = null;
+let connectTimer: NodeJS.Timeout | null = null;
+let receiverType: AvrType;
+
+function startAdapter(options: Partial = {}): utils.AdapterInstance {
+ adapter = new utils.Adapter({ ...options, name: 'denon' });
adapter.on('unload', callback => {
try {
- if (connectingVar) {
- clearTimeout(connectingVar);
- } // endIf
+ if (connectTimer) {
+ clearTimeout(connectTimer);
+ }
- if (pollingVar) {
- clearTimeout(pollingVar);
- } // endIf
+ if (pollTimer) {
+ clearTimeout(pollTimer);
+ }
/*
if (intervalPollVar) {
@@ -81,7 +72,7 @@ function startAdapter(options) {
'MX: 3\r\n' +
'\r\n',
true,
- 4000,
+ 4_000,
(err, result) => {
if (result) {
result = result
@@ -94,34 +85,24 @@ function startAdapter(options) {
.map(dev => {
return { ip: dev.ip, name: dev.name };
});
- } // endIf
+ }
adapter.sendTo(obj.from, obj.command, { error: err, list: result }, obj.callback);
}
);
- } // endIf
- } // endIf
- } // endIf
+ }
+ }
+ }
});
- adapter.on('ready', async () => {
+ adapter.on('ready', () => {
if (adapter.config.ip) {
adapter.log.info('[START] Starting DENON AVR adapter');
host = adapter.config.ip;
- pollInterval = adapter.config.pollInterval || 7000;
+ pollInterval = adapter.config.pollInterval || 7_000;
requestInterval = adapter.config.requestInterval || 100;
- const obj = await adapter.getForeignObjectAsync(adapter.namespace);
- // create device namespace
- if (!obj) {
- adapter.setForeignObject(adapter.namespace, {
- type: 'device',
- common: {
- name: 'DENON device'
- }
- });
- } // endIf
-
- main();
+ adapter.subscribeStates('*');
+ connect();
} else {
adapter.log.warn('No IP-address set');
}
@@ -129,57 +110,58 @@ function startAdapter(options) {
// Handle state changes
adapter.on('stateChange', async (id, state) => {
- if (!id || !state || state.ack) {
+ // Ignore acknowledged state changes or error states
+ if (!id || !state || state.ack || state.val === null) {
return;
- } // Ignore acknowledged state changes or error states
+ }
id = id.substring(adapter.namespace.length + 1); // remove instance name and id
- state = state.val; // only get state value
+ let stateVal: any = state.val; // only get state value
let zoneNumber;
if (/^zone\d\..+/g.test(id)) {
zoneNumber = id.slice(4, 5);
id = `zone.${id.substring(6)}`;
- } // endIf
+ }
- adapter.log.debug(`[COMMAND] State Change - ID: ${id}; State: ${state}`);
+ adapter.log.debug(`[COMMAND] State Change - ID: ${id}; State: ${stateVal}`);
if (receiverType === 'US') {
- return handleUsStateChange(id, state);
+ return handleUsStateChange(id, stateVal);
}
switch (id) {
case 'zoneMain.powerZone':
- if (state === true) {
+ if (stateVal === true) {
await sendRequest('ZMON');
} else {
await sendRequest('ZMOFF');
}
break;
case 'zoneMain.volume': {
- const vol = helper.inputToVol(state);
+ const vol = helper.inputToVol(stateVal);
await sendRequest(`MV${vol}`);
adapter.log.debug(`[INFO] <== Changed mainVolume to ${vol}`);
break;
}
case 'zoneMain.volumeDB': {
- state += 80; // convert to Vol
- const vol = helper.inputToVol(state);
+ stateVal += 80; // convert to Vol
+ const vol = helper.inputToVol(stateVal);
await sendRequest(`MV${vol}`);
adapter.log.debug(`[INFO] <== Changed mainVolume to ${vol}`);
break;
}
case 'zoneMain.sleepTimer':
- if (!state) {
+ if (!stateVal) {
// state === 0
await sendRequest('SLPOFF');
- } else if (state < 10) {
- await sendRequest(`SLP00${state}`);
- } else if (state < 100) {
- await sendRequest(`SLP0${state}`);
- } else if (state <= 120) {
- await sendRequest(`SLP${state}`);
+ } else if (stateVal < 10) {
+ await sendRequest(`SLP00${stateVal}`);
+ } else if (stateVal < 100) {
+ await sendRequest(`SLP0${stateVal}`);
+ } else if (stateVal <= 120) {
+ await sendRequest(`SLP${stateVal}`);
}
break;
case 'zoneMain.volumeUp':
@@ -189,7 +171,7 @@ function startAdapter(options) {
await sendRequest('MVDOWN');
break;
case 'zoneMain.muteIndicator':
- if (state === true) {
+ if (stateVal === true) {
await sendRequest('MUON');
} else {
await sendRequest('MUOFF');
@@ -212,11 +194,11 @@ function startAdapter(options) {
break;
case 'zoneMain.selectInput': {
const obj = await adapter.getObjectAsync('zoneMain.selectInput');
- await sendRequest(`SI${helper.decodeState(obj.common.states, state).toUpperCase()}`);
+ await sendRequest(`SI${helper.decodeState(obj!.common.states, state.val as any).toUpperCase()}`);
break;
}
case 'zoneMain.quickSelect':
- await sendRequests([`MSQUICK${state}`, `MSSMART${state}`]);
+ await sendRequests([`MSQUICK${stateVal}`, `MSSMART${stateVal}`]);
break;
case 'zoneMain.equalizerBassUp':
await sendRequest('PSBAS UP');
@@ -231,81 +213,81 @@ function startAdapter(options) {
await sendRequest('PSTRE DOWN');
break;
case 'zoneMain.equalizerBass':
- state = helper.dbToVol(state);
- await sendRequest(`PSBAS ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`PSBAS ${stateVal}`);
break;
case 'zoneMain.equalizerTreble':
- state = helper.dbToVol(state);
- await sendRequest(`PSTRE ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`PSTRE ${stateVal}`);
break;
case 'zoneMain.channelVolumeFrontLeft':
- await sendRequest(`CVFL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeFrontRight':
- await sendRequest(`CVFR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeCenter':
- await sendRequest(`CVC ${helper.dbToVol(state)}`);
+ await sendRequest(`CVC ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundRight':
- await sendRequest(`CVSR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundLeft':
- await sendRequest(`CVSL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundDolbyLeft':
- await sendRequest(`CVSDL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSDL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundDolbyRight':
- await sendRequest(`CVSDR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSDR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeFrontDolbyLeft':
- await sendRequest(`CVFDL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFDL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeFrontDolbyRight':
- await sendRequest(`CVFDR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFDR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeFrontHeightLeft':
- await sendRequest(`CVFHL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFHL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeFrontHeightRight':
- await sendRequest(`CVFHR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVFHR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeRearHeightLeft':
- await sendRequest(`CVRHL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVRHL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeRearHeightRight':
- await sendRequest(`CVRHR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVRHR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundHeightRight':
- await sendRequest(`CVSHR ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSHR ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSurroundHeightLeft':
- await sendRequest(`CVSHL ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSHL ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSubwoofer':
- await sendRequest(`CVSW ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSW ${helper.dbToVol(stateVal)}`);
break;
case 'zoneMain.channelVolumeSubwooferTwo':
- await sendRequest(`CVSW2 ${helper.dbToVol(state)}`);
+ await sendRequest(`CVSW2 ${helper.dbToVol(stateVal)}`);
break;
case 'settings.powerSystem':
- if (state === true) {
+ if (stateVal === true) {
await sendRequest('PWON');
} else {
await sendRequest('PWSTANDBY');
- } // endElseIf
+ }
break;
case 'settings.dynamicEq':
- if (state) {
+ if (stateVal) {
await sendRequest('PSDYNEQ ON');
} else {
await sendRequest('PSDYNEQ OFF');
}
break;
case 'settings.subwooferLevel':
- state = helper.dbToVol(state);
- await sendRequest(`PSSWL ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`PSSWL ${stateVal}`);
break;
case 'settings.subwooferLevelDown':
await sendRequest('PSSWL DOWN');
@@ -314,15 +296,15 @@ function startAdapter(options) {
await sendRequest('PSSWL UP');
break;
case 'settings.subwooferLevelState':
- if (state) {
+ if (stateVal) {
await sendRequest('PSSWL ON');
} else {
await sendRequest('PSSWL OFF');
}
break;
case 'settings.subwooferTwoLevel':
- state = helper.dbToVol(state);
- await sendRequest(`PSSWL2 ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`PSSWL2 ${stateVal}`);
break;
case 'settings.subwooferTwoLevelDown':
await sendRequest('PSSWL2 DOWN');
@@ -331,7 +313,7 @@ function startAdapter(options) {
await sendRequest('PSSWL2 UP');
break;
case 'settings.audysseyLfc':
- if (state) {
+ if (stateVal) {
await sendRequest('PSLFC ON');
} else {
await sendRequest('PSLFC OFF');
@@ -344,47 +326,47 @@ function startAdapter(options) {
await sendRequest('PSCNTAMT UP');
break;
case 'settings.containmentAmount':
- await sendRequest(`PSCNTAMT 0${state}`);
+ await sendRequest(`PSCNTAMT 0${stateVal}`);
break;
case 'settings.multEq': {
const obj = await adapter.getObjectAsync('settings.multEq');
- await sendRequest(`PSMULTEQ:${helper.decodeState(obj.common.states, state).toUpperCase()}`);
+ await sendRequest(`PSMULTEQ:${helper.decodeState(obj!.common.states, state.val as any).toUpperCase()}`);
break;
}
case 'settings.dynamicVolume': {
const obj = await adapter.getObjectAsync('settings.dynamicVolume');
- await sendRequest(`PSDYNVOL ${helper.decodeState(obj.common.states, state).toUpperCase()}`);
+ await sendRequest(`PSDYNVOL ${helper.decodeState(obj!.common.states, state.val as any).toUpperCase()}`);
break;
}
case 'settings.referenceLevelOffset':
- await sendRequest(`PSREFLEV ${state}`);
+ await sendRequest(`PSREFLEV ${stateVal}`);
break;
case 'settings.surroundMode': {
const obj = await adapter.getObjectAsync('settings.surroundMode');
- await sendRequest(`MS${helper.decodeState(obj.common.states, state).toUpperCase()}`);
+ await sendRequest(`MS${helper.decodeState(obj!.common.states, state.val as any).toUpperCase()}`);
break;
}
case 'settings.expertReadingPattern':
try {
// check if its a valid RegExp
- new RegExp(state);
- await adapter.setStateAsync('settings.expertReadingPattern', state, true);
- } catch (e) {
+ new RegExp(stateVal);
+ await adapter.setStateAsync('settings.expertReadingPattern', stateVal, true);
+ } catch (e: any) {
adapter.log.warn(`[COMMAND] Cannot update expert reading pattern: ${e.message}`);
}
break;
case 'settings.expertCommand': {
// Sending custom commands
- await sendRequest(state);
- const connectionState = adapter.getStateAsync('info.connection');
+ await sendRequest(stateVal);
+ const connectionState = await adapter.getStateAsync('info.connection');
// acknowledge when connection is true, thats all we can do here
- if (connectionState.val === true) {
- adapter.setState('settings.expertCommand', state, true);
+ if (connectionState?.val === true) {
+ adapter.setState('settings.expertCommand', stateVal, true);
}
break;
}
case 'settings.toneControl':
- if (state) {
+ if (stateVal) {
await sendRequest('PSTONE CTRL ON');
} else {
await sendRequest('PSTONE CTRL OFF');
@@ -415,7 +397,7 @@ function startAdapter(options) {
await sendRequest('MNINF');
break;
case 'settings.setupMenu':
- if (state) {
+ if (stateVal) {
await sendRequest('MNMEN ON');
} else {
await sendRequest('MNMEN OFF');
@@ -423,11 +405,11 @@ function startAdapter(options) {
break;
case 'settings.outputMonitor': {
const obj = await adapter.getObjectAsync('settings.outputMonitor');
- await sendRequest(`VSMONI${helper.decodeState(obj.common.states, state)}`);
+ await sendRequest(`VSMONI${helper.decodeState(obj!.common.states, stateVal)}`);
break;
}
case 'settings.centerSpread':
- if (state) {
+ if (stateVal) {
await sendRequest('PSCES ON');
} else {
await sendRequest('PSCES OFF');
@@ -435,35 +417,40 @@ function startAdapter(options) {
break;
case 'settings.videoProcessingMode': {
const obj = await adapter.getObjectAsync('settings.videoProcessingMode');
- await sendRequest(`VSVPM${helper.decodeState(obj.common.states, state)}`);
+ await sendRequest(`VSVPM${helper.decodeState(obj!.common.states, stateVal)}`);
break;
}
case 'settings.pictureMode':
- await sendRequest(`PV${state}`);
+ await sendRequest(`PV${stateVal}`);
break;
case 'settings.loadPreset': {
let loadPresetState;
- if (parseInt(state) < 10) {
- loadPresetState = `0${state}`;
+ if (parseInt(stateVal) < 10) {
+ loadPresetState = `0${stateVal}`;
} else {
- loadPresetState = state;
+ loadPresetState = stateVal;
}
await sendRequest(`NSB${loadPresetState}`);
break;
}
case 'settings.savePreset': {
let savePresetState;
- if (parseInt(state) < 10) {
- savePresetState = `0${state}`;
+ if (parseInt(stateVal) < 10) {
+ savePresetState = `0${stateVal}`;
} else {
- savePresetState = state;
+ savePresetState = stateVal;
}
await sendRequest(`NSC${savePresetState}`);
break;
}
case 'display.brightness': {
const obj = await adapter.getObjectAsync('display.brightness');
- await sendRequest(`DIM ${helper.decodeState(obj.common.states, state).toUpperCase().slice(0, 3)}`);
+ await sendRequest(
+ `DIM ${helper
+ .decodeState(obj!.common.states, state.val as any)
+ .toUpperCase()
+ .slice(0, 3)}`
+ );
break;
}
case 'tuner.frequencyUp':
@@ -475,11 +462,11 @@ function startAdapter(options) {
case 'tuner.frequency': {
// remove the dot from 106.90
let strFreq = state.toString().replace('.', '');
- if (strFreq.length < 6 && state < 1000) {
+ if (strFreq.length < 6 && stateVal < 1000) {
// below 1000 we need leading zero
strFreq = `0${strFreq}`;
- if (state < 100) {
+ if (stateVal < 100) {
// we need another one
strFreq = `0${strFreq}`;
}
@@ -494,30 +481,30 @@ function startAdapter(options) {
break;
}
case 'zone.powerZone':
- if (state === true) {
+ if (stateVal === true) {
await sendRequest(`Z${zoneNumber}ON`);
} else {
await sendRequest(`Z${zoneNumber}OFF`);
- } // endElseIf
+ }
break;
case 'zone.muteIndicator':
- if (state === true) {
+ if (stateVal === true) {
await sendRequest(`Z${zoneNumber}MUON`);
} else {
await sendRequest(`Z${zoneNumber}MUOFF`);
- } // endElseIf
+ }
break;
case 'zone.sleepTimer':
- if (!state) {
+ if (!stateVal) {
// state === 0
await sendRequest(`Z${zoneNumber}SLPOFF`);
- } else if (state < 10) {
- await sendRequest(`Z${zoneNumber}SLP00${state}`);
- } else if (state < 100) {
- await sendRequest(`Z${zoneNumber}SLP0${state}`);
- } else if (state <= 120) {
- await sendRequest(`Z${zoneNumber}SLP${state}`);
- } // endElseIf
+ } else if (stateVal < 10) {
+ await sendRequest(`Z${zoneNumber}SLP00${stateVal}`);
+ } else if (stateVal < 100) {
+ await sendRequest(`Z${zoneNumber}SLP0${stateVal}`);
+ } else if (stateVal <= 120) {
+ await sendRequest(`Z${zoneNumber}SLP${stateVal}`);
+ }
break;
case 'zone.volumeUp':
await sendRequest(`Z${zoneNumber}UP`);
@@ -526,19 +513,21 @@ function startAdapter(options) {
await sendRequest(`Z${zoneNumber}DOWN`);
break;
case 'zone.volume':
- await sendRequest(`Z${zoneNumber}${helper.inputToVol(state)}`);
+ await sendRequest(`Z${zoneNumber}${helper.inputToVol(stateVal)}`);
break;
case 'zone.volumeDB':
- state += 80; // Convert to Vol
- await sendRequest(`Z${zoneNumber}${helper.inputToVol(state)}`);
+ stateVal += 80; // Convert to Vol
+ await sendRequest(`Z${zoneNumber}${helper.inputToVol(stateVal)}`);
break;
case 'zone.selectInput': {
const obj = await adapter.getObjectAsync(`zone${zoneNumber}.selectInput`);
- await sendRequest(`Z${zoneNumber}${helper.decodeState(obj.common.states, state).toUpperCase()}`);
+ await sendRequest(
+ `Z${zoneNumber}${helper.decodeState(obj!.common.states, state.val as any).toUpperCase()}`
+ );
break;
}
case 'zone.quickSelect':
- await sendRequests([`Z${zoneNumber}QUICK${state}`, `Z${zoneNumber}SMART${state}`]);
+ await sendRequests([`Z${zoneNumber}QUICK${stateVal}`, `Z${zoneNumber}SMART${stateVal}`]);
break;
case 'zone.equalizerBassUp':
await sendRequest(`Z${zoneNumber}PSBAS UP`);
@@ -553,117 +542,100 @@ function startAdapter(options) {
await sendRequest(`Z${zoneNumber}PSTRE DOWN`);
break;
case 'zone.equalizerBass':
- state = helper.dbToVol(state);
- await sendRequest(`Z${zoneNumber}PSBAS ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`Z${zoneNumber}PSBAS ${stateVal}`);
break;
case 'zone.equalizerTreble':
- state = helper.dbToVol(state);
- await sendRequest(`Z${zoneNumber}PSTRE ${state}`);
+ stateVal = helper.dbToVol(stateVal);
+ await sendRequest(`Z${zoneNumber}PSTRE ${stateVal}`);
break;
case 'zone.channelVolumeFrontLeft':
- await sendRequest(`Z${zoneNumber}CVFL ${helper.dbToVol(state)}`);
+ await sendRequest(`Z${zoneNumber}CVFL ${helper.dbToVol(stateVal)}`);
break;
case 'zone.channelVolumeFrontRight':
- await sendRequest(`Z${zoneNumber}CVFR ${helper.dbToVol(state)}`);
+ await sendRequest(`Z${zoneNumber}CVFR ${helper.dbToVol(stateVal)}`);
break;
case 'settings.lfeAmount':
- await sendRequest(`PSLFE ${state < 10 ? `0${state}` : 10}`);
+ await sendRequest(`PSLFE ${stateVal < 10 ? `0${stateVal}` : 10}`);
break;
case 'settings.dialogControl':
- await sendRequest(`PSDIC 0${state}`); // can only be 0 - 6
+ await sendRequest(`PSDIC 0${stateVal}`); // can only be 0 - 6
break;
case 'settings.dialogLevel':
- await sendRequest(`PSDIL ${helper.dbToVol(state)}`);
+ await sendRequest(`PSDIL ${helper.dbToVol(stateVal)}`);
break;
case 'settings.dialogLevelAdjust':
- await sendRequest(`PSDIL ${state ? 'ON' : 'OFF'}`);
+ await sendRequest(`PSDIL ${stateVal ? 'ON' : 'OFF'}`);
break;
case 'settings.speakerPreset':
- await sendRequest(`SPPR ${state}`);
+ await sendRequest(`SPPR ${stateVal}`);
break;
default:
adapter.log.error(`[COMMAND] ${id} is not a valid state`);
- } // endSwitch
- }); // endOnStateChange
+ }
+ });
return adapter;
-} // endStartAdapter
-
-function main() {
- adapter.subscribeStates('*');
-
- connect();
-} // endMain
+}
client.on('timeout', () => {
- pollingVar = null;
+ pollTimer = null;
adapter.log.warn('AVR timed out due to no response');
adapter.setState('info.connection', false, true);
client.destroy();
client.unref();
- if (!connectingVar) {
- connectingVar = setTimeout(() => connect(), 30000); // Connect again in 30 seconds
- } // endIf
+ if (!connectTimer) {
+ connectTimer = setTimeout(() => connect(), 30000); // Connect again in 30 seconds
+ }
});
// Connection handling
-client.on('error', error => {
+client.on('error', (error: any) => {
verboseConnection = error.code !== previousError;
- if (connectingVar) {
+ if (connectTimer) {
return;
}
previousError = error.code;
- if (verboseConnection) {
- if (error.code === 'ECONNREFUSED') {
- adapter.log.warn('Connection refused, make sure that there is no other Telnet connection');
- } else if (error.code === 'EHOSTUNREACH') {
- adapter.log.warn('AVR unreachable, check the Network Config of your AVR');
- } else if (error.code === 'EALREADY' || error.code === 'EISCONN') {
- return adapter.log.warn('Adapter is already connecting/connected');
- } else if (error.code === 'ETIMEDOUT') {
- adapter.log.warn('Connection timed out');
- } else {
- adapter.log.warn(`Connection closed: ${error}`);
- }
+
+ const logLevel = verboseConnection ? 'warn' : 'debug';
+
+ if (error.code === 'ECONNREFUSED') {
+ adapter.log[logLevel]('Connection refused, make sure that there is no other Telnet connection');
+ } else if (error.code === 'EHOSTUNREACH') {
+ adapter.log[logLevel]('AVR unreachable, check the Network Config of your AVR');
+ } else if (error.code === 'EALREADY' || error.code === 'EISCONN') {
+ return adapter.log[logLevel]('Adapter is already connecting/connected');
+ } else if (error.code === 'ETIMEDOUT') {
+ adapter.log[logLevel]('Connection timed out');
} else {
- if (error.code === 'ECONNREFUSED') {
- adapter.log.debug('Connection refused, make sure that there is no other Telnet connection');
- } else if (error.code === 'EHOSTUNREACH') {
- adapter.log.debug('AVR unreachable, check the Network Config of your AVR');
- } else if (error.code === 'EALREADY' || error.code === 'EISCONN') {
- return adapter.log.debug('Adapter is already connecting/connected');
- } else if (error.code === 'ETIMEDOUT') {
- adapter.log.debug('Connection timed out');
- } else {
- adapter.log.warn(`Connection closed: ${error}`);
- }
+ adapter.log[logLevel](`Connection closed: ${error}`);
}
- pollingVar = null;
- adapter.setState('info.connection', false, true);
- if (!connectingVar) {
- client.destroy();
- client.unref();
- connectingVar = setTimeout(() => connect(), 30000); // Connect again in 30 seconds
- } // endIf
+ reconnect();
});
client.on('end', () => {
// Denon has closed the connection
adapter.log.warn('Denon AVR has cancelled the connection');
- pollingVar = false;
+ reconnect();
+});
+
+/**
+ * Reconnect to AVR after 30 seconds
+ */
+function reconnect(): void {
+ pollTimer = null;
adapter.setState('info.connection', false, true);
- if (!connectingVar) {
+ if (!connectTimer) {
client.destroy();
client.unref();
- connectingVar = setTimeout(() => connect(), 30000); // Connect again in 30 seconds
- } // endIf
-});
+ connectTimer = setTimeout(() => connect(), 30_000); // Connect again in 30 seconds
+ }
+}
client.on('connect', async () => {
// Successfully connected
- clearTimeout(connectingVar);
- connectingVar = null;
+ connectTimer = null;
previousError = null;
verboseConnection = true;
adapter.setState('info.connection', true, true);
@@ -674,7 +646,7 @@ client.on('connect', async () => {
} else {
adapter.log.debug('[CONNECT] Connected --> updating states on start');
updateStates(); // Update states when connected
- } // endElse
+ }
});
client.on('data', data => {
@@ -685,26 +657,26 @@ client.on('data', data => {
// data not empty
adapter.log.debug(`[DATA] <== Incoming data: ${data}`);
handleResponse(data);
- } // endIf
- } // endFor
+ }
+ }
});
/**
* Internals
*/
-function connect() {
+function connect(): void {
client.setEncoding('utf8');
if (verboseConnection) {
adapter.log.info(`[CONNECT] Trying to connect to ${host}:23`);
} else {
adapter.log.debug(`[CONNECT] Trying to connect to ${host}:23`);
}
- connectingVar = null;
+ connectTimer = null;
client.connect({ port: 23, host: host });
// give the connection a timeout after being idle for 35 seconds (needed after connect call)
client.setTimeout(35000);
-} // endConnect
+}
const updateCommands = [
'NSET1 ?',
@@ -848,9 +820,9 @@ const updateCommands = [
/**
* Update all states by sending the defined updateCommands
*/
-async function updateStates() {
+async function updateStates(): Promise {
await sendRequests(updateCommands);
-} // endUpdateStates
+}
const pollCommands = [
'NSE',
@@ -867,19 +839,18 @@ const pollCommands = [
'BDSTATUS?'
]; // Request Display State, Sleep Timer & Quick Select
-async function pollStates() {
+async function pollStates(): Promise {
// Polls states
- pollingVar = null;
+ pollTimer = null;
await sendRequests(pollCommands);
-} // endPollStates
+}
/**
* Send data array to socket respecting request interval
*
- * @param {string[]} requests array of requests
- * @return {Promise}
+ * @param requests array of requests
*/
-async function sendRequests(requests) {
+async function sendRequests(requests: string[]): Promise {
for (const req of requests) {
await sendRequest(req);
await helper.wait(requestInterval);
@@ -889,32 +860,30 @@ async function sendRequests(requests) {
/**
* Send data to socket
*
- * @param {string} req
- * @return {Promise}
+ * @param req
*/
-function sendRequest(req) {
+function sendRequest(req: string): Promise {
return new Promise(resolve => {
client.write(`${req}\r`, () => {
adapter.log.debug(`[INFO] ==> Message sent: ${req}`);
resolve();
});
});
-} // endSendRequest
+}
-function handleUsResponse(data) {
+async function handleUsResponse(data: string): Promise {
adapter.log.debug(`[INFO] US command to handle is ${data}`);
if (data.startsWith('SD00')) {
// Handle display brightness
- adapter.getObjectAsync('display.brightness').then(obj => {
- const bright = data.substring(4);
- for (const j of Object.keys(obj.common.states)) {
- // Check if command contains one of the possible brightness states
- if (helper.decodeState(obj.common.states, j).toLowerCase().includes(bright.toLowerCase())) {
- adapter.setState('display.brightness', obj.common.states[j], true);
- } // endIf
- } // endFor
- });
+ const obj = (await adapter.getObjectAsync('display.brightness'))!;
+ const bright = data.substring(4);
+ for (const j of Object.keys(obj.common.states)) {
+ // Check if command contains one of the possible brightness states
+ if (helper.decodeState(obj.common.states, j).toLowerCase().includes(bright.toLowerCase())) {
+ adapter.setState('display.brightness', obj.common.states[j], true);
+ }
+ }
return;
} else if (!data.startsWith('ST00') && /ST\d\d.+/g.test(data)) {
const zoneNumber = parseInt(data.slice(2, 4));
@@ -932,15 +901,14 @@ function handleUsResponse(data) {
} else if (/SV[0-9]+/g.test(data)) {
const zoneNumber = parseInt(data.slice(2, 4)) % 2 ? parseInt(data.slice(2, 4)) + 1 : parseInt(data.slice(2, 4));
const volume = parseFloat(`${data.slice(4, 6)}.${data.slice(6, 7)}`);
- adapter.getStateAsync(`zone${zoneNumber}.operationMode`).then(state => {
- if (state.val.toString() === '0' || state.val === 'NORMAL') {
- const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'speakerTwo' : 'speakerOne';
- adapter.setState(`zone${zoneNumber}.${speaker}Volume`, volume, true);
- } else {
- adapter.setState(`zone${zoneNumber}.speakerOneVolume`, volume, true);
- adapter.setState(`zone${zoneNumber}.speakerTwoVolume`, volume, true);
- } // endElse
- });
+ const state = await adapter.getStateAsync(`zone${zoneNumber}.operationMode`);
+ if (state?.val?.toString() === '0' || state?.val === 'NORMAL') {
+ const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'speakerTwo' : 'speakerOne';
+ adapter.setState(`zone${zoneNumber}.${speaker}Volume`, volume, true);
+ } else {
+ adapter.setState(`zone${zoneNumber}.speakerOneVolume`, volume, true);
+ adapter.setState(`zone${zoneNumber}.speakerTwoVolume`, volume, true);
+ }
return;
} else if (/SO\d\d.+/g.test(data)) {
const zoneNumber = parseInt(data.slice(2, 4));
@@ -954,64 +922,60 @@ function handleUsResponse(data) {
} else if (/SF\d\d.+/g.test(data)) {
const zoneNumber = parseInt(data.slice(2, 4)) % 2 ? parseInt(data.slice(2, 4)) + 1 : parseInt(data.slice(2, 4));
const command = data.substring(4);
- adapter.getStateAsync(`zone${zoneNumber}.operationMode`).then(state => {
- if (state.val.toString() === '0' || state.val === 'NORMAL') {
- const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'SpeakerTwo' : 'SpeakerOne';
- if (command === 'OFF') {
- adapter.setState(`zone${zoneNumber}.lowCutFilter${speaker}`, false, true);
- } else if (command === 'ON') {
- adapter.setState(`zone${zoneNumber}.lowCutFilter${speaker}`, true, true);
- }
- } else {
- if (command === 'ON') {
- adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerOne`, true, true);
- adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerTwo`, true, true);
- } else if (command === 'OFF') {
- adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerOne`, false, true);
- adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerTwo`, false, true);
- } // endElseIf
- } // endElse
- });
+ const state = await adapter.getStateAsync(`zone${zoneNumber}.operationMode`);
+ if (state?.val?.toString() === '0' || state?.val === 'NORMAL') {
+ const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'SpeakerTwo' : 'SpeakerOne';
+ if (command === 'OFF') {
+ adapter.setState(`zone${zoneNumber}.lowCutFilter${speaker}`, false, true);
+ } else if (command === 'ON') {
+ adapter.setState(`zone${zoneNumber}.lowCutFilter${speaker}`, true, true);
+ }
+ } else {
+ if (command === 'ON') {
+ adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerOne`, true, true);
+ adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerTwo`, true, true);
+ } else if (command === 'OFF') {
+ adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerOne`, false, true);
+ adapter.setState(`zone${zoneNumber}.lowCutFilterSpeakerTwo`, false, true);
+ }
+ }
return;
} else if (/SI\d\d.+/g.test(data)) {
const zoneNumber = parseInt(data.slice(2, 4)) % 2 ? parseInt(data.slice(2, 4)) + 1 : parseInt(data.slice(2, 4));
const command = data.substring(4);
- adapter.getStateAsync(`zone${zoneNumber}.operationMode`).then(state => {
- if (state.val === '0' || state.val === 'NORMAL') {
- const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'Two' : 'One';
-
- adapter.getObjectAsync(`zone${zoneNumber}.selectInputOne`).then(obj => {
- for (const j of Object.keys(obj.common.states)) {
- // Check if command contains one of the possible brightness states
- if (
- helper
- .decodeState(obj.common.states, j)
- .replace(' ', '')
- .toLowerCase()
- .includes(command.toLowerCase())
- ) {
- adapter.setState(`zone${zoneNumber}.selectInput${speaker}`, obj.common.states[j], true);
- } // endIf
- } // endFor
- });
- } else {
- adapter.getObjectAsync(`zone${zoneNumber}.selectInputOne`).then(obj => {
- for (const j of Object.keys(obj.common.states)) {
- // Check if command contains one of the possible brightness states
- if (
- helper
- .decodeState(obj.common.states, j)
- .replace(' ', '')
- .toLowerCase()
- .includes(command.toLowerCase())
- ) {
- adapter.setState(`zone${zoneNumber}.selectInputOne`, obj.common.states[j], true);
- adapter.setState(`zone${zoneNumber}.selectInputTwo`, obj.common.states[j], true);
- } // endIf
- } // endFor
- });
- } // endElse
- });
+ const state = await adapter.getStateAsync(`zone${zoneNumber}.operationMode`);
+ if (state?.val === '0' || state?.val === 'NORMAL') {
+ const speaker = parseInt(data.slice(2, 4)) === zoneNumber ? 'Two' : 'One';
+
+ const obj = (await adapter.getObjectAsync(`zone${zoneNumber}.selectInputOne`))!;
+ for (const j of Object.keys(obj.common.states)) {
+ // Check if command contains one of the possible brightness states
+ if (
+ helper
+ .decodeState(obj.common.states, j)
+ .replace(' ', '')
+ .toLowerCase()
+ .includes(command.toLowerCase())
+ ) {
+ adapter.setState(`zone${zoneNumber}.selectInput${speaker}`, obj.common.states[j], true);
+ }
+ }
+ } else {
+ const obj = (await adapter.getObjectAsync(`zone${zoneNumber}.selectInputOne`))!;
+ for (const j of Object.keys(obj.common.states)) {
+ // Check if command contains one of the possible brightness states
+ if (
+ helper
+ .decodeState(obj.common.states, j)
+ .replace(' ', '')
+ .toLowerCase()
+ .includes(command.toLowerCase())
+ ) {
+ adapter.setState(`zone${zoneNumber}.selectInputOne`, obj.common.states[j], true);
+ adapter.setState(`zone${zoneNumber}.selectInputTwo`, obj.common.states[j], true);
+ }
+ }
+ }
return;
} else if (/TI\d\d.+/g.test(data)) {
const zoneNumber = parseInt(data.slice(2, 4));
@@ -1031,7 +995,7 @@ function handleUsResponse(data) {
adapter.setState(`zone${zoneNumber}.audioSignalInput`, false, true);
}
return;
- } // endElseIf
+ }
switch (data) {
case 'PW00ON':
@@ -1057,16 +1021,21 @@ function handleUsResponse(data) {
break;
default:
adapter.log.debug(`[INFO] <== Unhandled US command ${data}`);
- } // endSwitch
-} // endHandleUsResponse
+ }
+}
-async function handleUsStateChange(id, stateVal) {
- let zoneNumber;
+/**
+ * Handle state change for US receiver
+ * @param id state id
+ * @param stateVal state value
+ */
+async function handleUsStateChange(id: string, stateVal: any): Promise {
+ let zoneNumber = '';
if (id.startsWith('zone')) {
- zoneNumber = id.split('.').shift().substring(4);
+ zoneNumber = id.split('.').shift()!.substring(4);
zoneNumber = parseInt(zoneNumber) < 10 ? `0${zoneNumber}` : zoneNumber;
- id = id.split('.').pop();
- } // endIf
+ id = id.split('.').pop()!;
+ }
switch (id) {
case 'settings.powerSystem':
@@ -1074,29 +1043,30 @@ async function handleUsStateChange(id, stateVal) {
await sendRequest('PW00ON');
} else {
await sendRequest('PW00STANDBY');
- } // endElseIf
+ }
break;
case 'settings.expertReadingPattern':
try {
new RegExp(stateVal);
await adapter.setStateAsync('settings.expertReadingPattern', stateVal, true);
- } catch (e) {
+ } catch (e: any) {
adapter.log.warn(`[COMMAND] Cannot update expert reading pattern: ${e.message}`);
}
break;
- case 'display.brightness':
- adapter.getObjectAsync('display.brightness').then(async obj => {
- await sendRequest(`SD00${helper.decodeState(obj.common.states, stateVal).toUpperCase().slice(0, 3)}`);
- });
+ case 'display.brightness': {
+ const obj = await adapter.getObjectAsync('display.brightness');
+ await sendRequest(`SD00${helper.decodeState(obj!.common.states, stateVal).toUpperCase().slice(0, 3)}`);
break;
- case 'settings.expertCommand': // Sending custom commands
+ }
+ case 'settings.expertCommand': {
+ // Sending custom commands
await sendRequest(stateVal);
- adapter.getStateAsync('info.connection').then(state => {
- if (state.val === true) {
- adapter.setState('settings.expertCommand', stateVal, true);
- }
- });
+ const state = await adapter.getStateAsync('info.connection');
+ if (state?.val === true) {
+ adapter.setState('settings.expertCommand', stateVal, true);
+ }
break;
+ }
case 'settings.powerConfigurationChange':
if (stateVal.toUpperCase() === 'POWER BUTTON' || stateVal === '0') {
await sendRequest('ST00PBTN');
@@ -1120,19 +1090,19 @@ async function handleUsStateChange(id, stateVal) {
await sendRequest(`AI${zoneNumber}NO`);
}
break;
- case 'lowCutFilterSpeakerOne':
- adapter.getStateAsync(`zone${parseInt(zoneNumber)}.operationMode`).then(async state => {
- if (state.val.toString() === '0' || state.val === 'NORMAL') {
- zoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
- zoneNumber = parseInt(zoneNumber) < 10 ? `0${zoneNumber}` : zoneNumber;
- } // endIf
- if (stateVal) {
- await sendRequest(`SF${zoneNumber}ON`);
- } else {
- await sendRequest(`SF${zoneNumber}OFF`);
- }
- });
+ case 'lowCutFilterSpeakerOne': {
+ const state = await adapter.getStateAsync(`zone${parseInt(zoneNumber)}.operationMode`);
+ if (state?.val?.toString() === '0' || state?.val === 'NORMAL') {
+ const calculatedZoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
+ zoneNumber = calculatedZoneNumber < 10 ? `0${calculatedZoneNumber}` : calculatedZoneNumber.toString();
+ }
+ if (stateVal) {
+ await sendRequest(`SF${zoneNumber}ON`);
+ } else {
+ await sendRequest(`SF${zoneNumber}OFF`);
+ }
break;
+ }
case 'lowCutFilterSpeakerTwo':
if (stateVal) {
await sendRequest(`SF${zoneNumber}ON`);
@@ -1147,23 +1117,23 @@ async function handleUsStateChange(id, stateVal) {
await sendRequest(`SO${zoneNumber}BRI`);
}
break;
- case 'selectInputOne':
- adapter.getStateAsync(`zone${parseInt(zoneNumber)}.operationMode`).then(async state => {
- if (state.val.toString() === '0' || state.val === 'NORMAL') {
- zoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
- zoneNumber = parseInt(zoneNumber) < 10 ? `0${zoneNumber}` : zoneNumber;
- } // endIf
- await sendRequest(`SI${zoneNumber}${stateVal.replace(' ', '')}`);
- });
+ case 'selectInputOne': {
+ const state = await adapter.getStateAsync(`zone${parseInt(zoneNumber)}.operationMode`);
+ if (state?.val?.toString() === '0' || state?.val === 'NORMAL') {
+ const calculatedZoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
+ zoneNumber = calculatedZoneNumber < 10 ? `0${calculatedZoneNumber}` : calculatedZoneNumber.toString();
+ }
+ await sendRequest(`SI${zoneNumber}${stateVal.replace(' ', '')}`);
break;
+ }
case 'selectInputTwo':
await sendRequest(`SI${zoneNumber}${stateVal.replace(' ', '')}`);
break;
case 'speakerOneVolume': {
const state = await adapter.getStateAsync(`zone${parseInt(zoneNumber)}.operationMode`);
- if (state.val.toString() === '0' || state.val === 'NORMAL') {
- zoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
- zoneNumber = parseInt(zoneNumber) < 10 ? `0${zoneNumber}` : zoneNumber;
+ if (state?.val?.toString() === '0' || state?.val === 'NORMAL') {
+ const calculatedZoneNumber = parseInt(zoneNumber) % 2 ? parseInt(zoneNumber) : parseInt(zoneNumber) - 1;
+ zoneNumber = calculatedZoneNumber < 10 ? `0${calculatedZoneNumber}` : calculatedZoneNumber.toString();
}
const vol = helper.inputToVol(stateVal);
@@ -1197,30 +1167,29 @@ async function handleUsStateChange(id, stateVal) {
break;
default:
adapter.log.error(`[COMMAND] ${id} is not a valid US state`);
- } // endSwitch
-} // endHandleUsStateChange
+ }
+}
/**
* Handle single response from AVR
*
- * @param {string} data
- * @return {Promise}
+ * @param data
*/
-async function handleResponse(data) {
- if (!pollingVar) {
+async function handleResponse(data: string): Promise {
+ if (!pollTimer) {
// Keep connection alive & poll states
- pollingVar = setTimeout(() => pollStates(), pollInterval); // Poll states every configured seconds
- } // endIf
+ pollTimer = setTimeout(() => pollStates(), pollInterval); // Poll states every configured seconds
+ }
// independent from receiver we handle the expert pattern
const expertPattern = await adapter.getStateAsync('settings.expertReadingPattern');
// if ack is false, it was not a valid regex
- if (expertPattern && expertPattern.val && expertPattern.ack === true) {
- const expertRegex = new RegExp(expertPattern.val);
+ if (expertPattern?.val && expertPattern.ack === true) {
+ const expertRegex = new RegExp(expertPattern.val as string);
if (expertRegex.test(data)) {
adapter.setState('settings.expertReadingResult', data, true);
- } // endIf
- } // endIf
+ }
+ }
// Detect receiver type --> first poll is SV? and SV00?
if (!receiverType) {
@@ -1235,7 +1204,7 @@ async function handleResponse(data) {
await createStandardStates('DE');
adapter.log.debug('[UPDATE] Updating states');
return void updateStates();
- } // endElse
+ }
} else if (data.startsWith('BDSTATUS')) {
// DENON Ceol Piccolo protocol detected , but we handle it as DE
receiverType = 'DE';
@@ -1269,51 +1238,50 @@ async function handleResponse(data) {
return;
} else {
command = `Z${zoneNumber}${command.slice(1, command.length)}`;
- } // endElse
+ }
if (/^Z\dQUICK.*/g.test(data) || /^Z\dSMART.*/g.test(data)) {
const quickNr = parseInt(data.slice(-1));
- adapter
- .getStateAsync(`zone${zoneNumber}.quickSelect`)
- .then(state => {
- if (state.val === quickNr && state.ack) {
- return;
- }
- adapter.setState(`zone${zoneNumber}.quickSelect`, quickNr, true);
- })
- .catch(() => {
- adapter.setState(`zone${zoneNumber}.quickSelect`, quickNr, true);
- });
+ try {
+ const state = await adapter.getStateAsync(`zone${zoneNumber}.quickSelect`);
+ if (state?.val === quickNr && state.ack) {
+ return;
+ }
+ } catch {
+ // ignore
+ }
+
+ adapter.setState(`zone${zoneNumber}.quickSelect`, quickNr, true);
return;
} else if (/^Z\d.*/g.test(command)) {
// Encode Input Source
const obj = await adapter.getObjectAsync('zoneMain.selectInput');
let zoneSi = data.substring(2);
zoneSi = zoneSi.replace(' ', ''); // Remove blank
- for (const j of Object.keys(obj.common.states)) {
+ for (const j of Object.keys(obj!.common.states)) {
// Check if command contains one of the possible Select Inputs
- if (helper.decodeState(obj.common.states, j.toString()) === zoneSi) {
+ if (helper.decodeState(obj!.common.states, j.toString()) === zoneSi) {
ensureAttrInStates(`zone${zoneNumber}.selectInput`, zoneSi);
adapter.setState(`zone${zoneNumber}.selectInput`, zoneSi, true);
return;
- } // endIf
- } // endFor
- } // endIf
+ }
+ }
+ }
} else {
// Transformation for normal commands
command = data.replace(/\s+|\d+/g, '');
- } // endElse
+ }
if (command.startsWith('DIM')) {
// Handle display brightness
- const obj = await adapter.getObjectAsync('display.brightness');
+ const obj = (await adapter.getObjectAsync('display.brightness'))!;
const bright = data.substring(4);
for (const j of Object.keys(obj.common.states)) {
// Check if command contains one of the possible brightness states
if (helper.decodeState(obj.common.states, j).toLowerCase().includes(bright.toLowerCase())) {
adapter.setState('display.brightness', obj.common.states[j], true);
- } // endIf
- } // endFor
+ }
+ }
return;
} else if (command.startsWith('SI')) {
// Handle select input
@@ -1329,17 +1297,11 @@ async function handleResponse(data) {
return;
} else if (command === 'MSQUICK' || command === 'MSSMART') {
const quickNr = parseInt(data.slice(-1));
- adapter
- .getStateAsync('zoneMain.quickSelect')
- .then(state => {
- if (state.val === quickNr && state.ack) {
- return;
- }
- adapter.setState('zoneMain.quickSelect', quickNr, true);
- })
- .catch(() => {
- adapter.setState('zoneMain.quickSelect', quickNr, true);
- });
+ const state = await adapter.getStateAsync('zoneMain.quickSelect');
+ if (state?.val === quickNr && state?.ack) {
+ return;
+ }
+ adapter.setState('zoneMain.quickSelect', quickNr, true);
return;
} else if (command.startsWith('NSE') && !command.startsWith('NSET')) {
// Handle display content
@@ -1403,25 +1365,27 @@ async function handleResponse(data) {
await createPictureMode();
}
const obj = await adapter.getObjectAsync('settings.pictureMode');
- adapter.setState('settings.pictureMode', obj.common.states[pictureMode], true);
+ adapter.setState('settings.pictureMode', obj!.common.states[pictureMode], true);
return;
} else if (command.startsWith('NSH')) {
const presetNumber = parseInt(data.slice(3, 5));
const state = await adapter.getStateAsync('info.onlinePresets');
- let knownPresets;
+ let knownPresets: Record;
if (!state || !state.val) {
- knownPresets = [];
+ knownPresets = {};
} else {
- knownPresets = JSON.parse(state.val);
+ knownPresets = JSON.parse(state.val as string);
}
+
knownPresets[presetNumber] = {
id: presetNumber,
channel: data.substring(5).replace(/\s\s+/g, '')
};
- const sortedPresets = [];
+ const sortedPresets: string[] = [];
Object.keys(knownPresets)
.sort()
+ // @ts-expect-error revisit this, cannot test currently
.forEach(key => (sortedPresets[key] = knownPresets[key]));
adapter.setState('info.onlinePresets', JSON.stringify(sortedPresets), true);
return;
@@ -1437,7 +1401,7 @@ async function handleResponse(data) {
return;
}
- let zoneNumber;
+ let zoneNumber = '';
if (/Z\d.+/g.test(command)) {
// remove zone number from command and save it
@@ -1488,47 +1452,25 @@ async function handleResponse(data) {
case 'ZMOFF':
adapter.setState('zoneMain.powerZone', false, true);
break;
- case 'SLP':
+ case 'SLP': {
data = data.slice(3, data.length);
- adapter
- .getStateAsync('zoneMain.sleepTimer')
- .then(state => {
- if (state.val !== parseInt(data) || !state.ack) {
- adapter.setState('zoneMain.sleepTimer', parseFloat(data), true);
- }
- })
- .catch(() => adapter.setState('zoneMain.sleepTimer', parseFloat(data), true));
- break;
- case 'SLPOFF':
- adapter
- .getStateAsync('zoneMain.sleepTimer')
- .then(state => {
- if (state.val !== 0 || !state.ack) {
- adapter.setState('zoneMain.sleepTimer', 0, true);
- }
- })
- .catch(() => adapter.setState('zoneMain.sleepTimer', 0, true));
+ const state = await adapter.getStateAsync('zoneMain.sleepTimer');
+ if (state?.val === parseInt(data) && state?.ack) {
+ return;
+ }
+ adapter.setState('zoneMain.sleepTimer', parseFloat(data), true);
break;
+ }
+ case 'SLPOFF': {
+ adapter.setStateChanged('zoneMain.sleepTimer', 0, true);
+ break;
+ }
case 'ZSLP':
data = data.slice(5, data.length);
- adapter
- .getStateAsync(`zone${zoneNumber}.sleepTimer`)
- .then(state => {
- if (state.val !== parseInt(data) || !state.ack) {
- adapter.setState(`zone${zoneNumber}.sleepTimer`, parseFloat(data), true);
- }
- })
- .catch(() => adapter.setState(`zone${zoneNumber}.sleepTimer`, parseFloat(data), true));
+ adapter.setStateChanged(`zone${zoneNumber}.sleepTimer`, parseFloat(data), true);
break;
case 'ZSLPOFF':
- adapter
- .getStateAsync(`zone${zoneNumber}.sleepTimer`)
- .then(state => {
- if (state.val !== 0 || !state.ack) {
- adapter.setState(`zone${zoneNumber}.sleepTimer`, 0, true);
- }
- })
- .catch(() => adapter.setState(`zone${zoneNumber}.sleepTimer`, 0, true));
+ adapter.setStateChanged(`zone${zoneNumber}.sleepTimer`, 0, true);
break;
case 'PSDYNEQON':
adapter.setState('settings.dynamicEq', true, true);
@@ -1545,18 +1487,17 @@ async function handleResponse(data) {
case 'PSSWL': {
// Handle Subwoofer Level for first and second SW
command = data.split(' ')[0];
- let state = data.split(' ')[1];
- state = helper.volToDb(state);
+ const volDb = helper.volToDb(data.split(' ')[1]);
if (command === 'PSSWL') {
// Check if PSSWL or PSSWL2
- adapter.setState('settings.subwooferLevel', parseFloat(state), true);
+ adapter.setState('settings.subwooferLevel', volDb, true);
} else {
if (!capabilities.subTwo) {
// make sure sub two state exists
await createSubTwo();
}
- adapter.setState('settings.subwooferTwoLevel', parseFloat(state), true);
- } // endElse
+ adapter.setState('settings.subwooferTwoLevel', volDb, true);
+ }
break;
}
case 'PSLFCON':
@@ -1585,25 +1526,23 @@ async function handleResponse(data) {
break;
}
case 'PSBAS': {
- let state = data.split(' ')[1];
- state = helper.volToDb(state);
- adapter.setState('zoneMain.equalizerBass', state, true);
+ const volDb = helper.volToDb(data.split(' ')[1]);
+ adapter.setState('zoneMain.equalizerBass', volDb, true);
break;
}
case 'PSTRE': {
- let state = data.split(' ')[1];
- state = helper.volToDb(state);
- adapter.setState('zoneMain.equalizerTreble', state, true);
+ const volDb = helper.volToDb(data.split(' ')[1]);
+ adapter.setState('zoneMain.equalizerTreble', volDb, true);
break;
}
case 'ZPSTRE': {
- const state = helper.volToDb(data.split(' ')[1]);
- adapter.setState(`zone${zoneNumber}.equalizerTreble`, state, true);
+ const volDb = helper.volToDb(data.split(' ')[1]);
+ adapter.setState(`zone${zoneNumber}.equalizerTreble`, volDb, true);
break;
}
case 'ZPSBAS': {
- const state = helper.volToDb(data.split(' ')[1]);
- adapter.setState(`zone${zoneNumber}.equalizerBass`, state, true);
+ const volDb = helper.volToDb(data.split(' ')[1]);
+ adapter.setState(`zone${zoneNumber}.equalizerBass`, volDb, true);
break;
}
case 'ZCVFL': {
@@ -1728,7 +1667,7 @@ async function handleResponse(data) {
adapter.setState('zoneMain.channelVolumeSubwoofer', helper.volToDb(channelVolume), true);
} else {
adapter.setState('zoneMain.channelVolumeSubwooferTwo', helper.volToDb(channelVolume), true);
- } // endElse
+ }
break;
}
case 'PSDILON':
@@ -1738,9 +1677,8 @@ async function handleResponse(data) {
adapter.setState('settings.dialogLevelAdjust', false, true);
break;
case 'PSDIL': {
- let level = data.split(' ')[1];
- level = helper.volToDb(level);
- adapter.setState('settings.dialogLevel', level, true);
+ const level = data.split(' ')[1];
+ adapter.setState('settings.dialogLevel', helper.volToDb(level), true);
break;
}
case 'PSDIC': {
@@ -1758,16 +1696,15 @@ async function handleResponse(data) {
}
default:
adapter.log.debug(`[INFO] <== Unhandled command ${command}`);
- } // endSwitch
-} // endHandleResponse
+ }
+}
/**
* Create all zone specific objects for given zone
*
- * @param {number} zone - zone number to be created
- * @returns {Promise}
+ * @param zone - zone number to be created
*/
-async function createZone(zone) {
+async function createZone(zone: number): Promise {
const promises = [];
promises.push(
@@ -2076,177 +2013,37 @@ async function createZone(zone) {
adapter.log.debug(`[INFO] <== Zone ${zone} detected`);
}
zonesCreated[zone] = true;
- } catch (e) {
+ } catch (e: any) {
adapter.log.warn(`Could not create zone ${zone}: ${e.message}`);
}
-} // endCreateZone
+}
/**
* Creates the display states and more for AVRs which have an http-interface (states still updated via telnet)
- *
- * @returns {Promise}
*/
-async function createDisplayAndHttp() {
+async function createDisplayAndHttp(): Promise {
const promises = [];
- promises.push(
- adapter.setObjectNotExistsAsync('display.displayContent0', {
- type: 'state',
- common: {
- name: 'Display content 0',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('display.displayContent1', {
- type: 'state',
- common: {
- name: 'Display content 1',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('display.displayContent2', {
- type: 'state',
- common: {
- name: 'Display content 2',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('display.displayContent3', {
- type: 'state',
- common: {
- name: 'Display content 3',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('display.displayContent4', {
- type: 'state',
- common: {
- name: 'Display content 4',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('display.displayContent5', {
- type: 'state',
- common: {
- name: 'Display content 5',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('display.displayContent6', {
- type: 'state',
- common: {
- name: 'Display content 6',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('display.displayContent7', {
- type: 'state',
- common: {
- name: 'Display content 7',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('display.displayContent8', {
- type: 'state',
- common: {
- name: 'Display content 8',
- role: 'info.display',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('zoneMain.iconURL', {
- type: 'state',
- common: {
- name: 'Cover',
- role: 'media.cover',
- type: 'string',
- write: false,
- read: true
- },
- native: {}
- })
- );
+ for (const [id, obj] of Object.entries(states.displayHttpStates)) {
+ promises.push(adapter.extendObjectAsync(id, obj));
+ }
try {
await Promise.all(promises);
if (!capabilities.display) {
adapter.setState('zoneMain.iconURL', `http://${host}/NetAudio/art.asp-jpg`, true);
adapter.log.debug('[INFO] <== Display Content created');
- } // endIf
+ }
capabilities.display = true;
- } catch (e) {
+ } catch (e: any) {
adapter.log.error(`Could not create Display Content states: ${e.message}`);
}
-} // endCreateDisplayAndHttp
+}
/**
* Creates the monitor state objects
- *
- * @returns {Promise}
*/
-async function createMonitorState() {
+async function createMonitorState(): Promise {
const promises = [];
promises.push(
@@ -2296,63 +2093,20 @@ async function createMonitorState() {
adapter.log.debug('[INFO] <== Created monitor states');
}
capabilities.multiMonitor = true;
- } catch (e) {
+ } catch (e: any) {
adapter.log.error(`Could not create monitor states: ${e.message}`);
}
-} // endCreateMonitorState
+}
/**
* Creates the subwoofer two objects
- *
- * @returns {Promise}
*/
-async function createSubTwo() {
+async function createSubTwo(): Promise {
const promises = [];
- promises.push(
- adapter.setObjectNotExistsAsync('settings.subwooferTwoLevel', {
- type: 'state',
- common: {
- name: 'Second Subwoofer Level',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: -12,
- max: 12,
- unit: 'dB'
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('settings.subwooferTwoLevelUp', {
- type: 'state',
- common: {
- name: 'Subwoofer Two Level Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('settings.subwooferTwoLevelDown', {
- type: 'state',
- common: {
- name: 'Subwoofer Two Level Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- })
- );
+ for (const [id, obj] of Object.entries(states.subwooferTwoStates)) {
+ promises.push(adapter.extendObjectAsync(id, obj));
+ }
try {
await Promise.all(promises);
@@ -2360,76 +2114,20 @@ async function createSubTwo() {
adapter.log.debug('[INFO] <== Created subwoofer two states');
}
capabilities.subTwo = true;
- } catch (e) {
+ } catch (e: any) {
adapter.log.error(`Could not create subwoofer two states: ${e.message}`);
}
-} // endCreateSubTwo
+}
/**
* Creates th LFC Audyssey objects
- *
- * @returns {Promise}
*/
-async function createLfcAudyssey() {
+async function createLfcAudyssey(): Promise {
const promises = [];
- promises.push(
- adapter.setObjectNotExistsAsync('settings.audysseyLfc', {
- type: 'state',
- common: {
- name: 'Audyssey Low Frequency Containment',
- role: 'switch',
- type: 'boolean',
- write: true,
- read: true
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('settings.containmentAmount', {
- type: 'state',
- common: {
- name: 'Audyssey Low Frequency Containment Amount',
- role: 'level',
- type: 'number',
- write: true,
- read: true,
- min: 1,
- max: 7
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('settings.containmentAmountUp', {
- type: 'state',
- common: {
- name: 'Containment Amount Up',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- })
- );
-
- promises.push(
- adapter.setObjectNotExistsAsync('settings.containmentAmountDown', {
- type: 'state',
- common: {
- name: 'Containment Amount Down',
- role: 'button',
- type: 'boolean',
- write: true,
- read: false
- },
- native: {}
- })
- );
+ for (const [id, obj] of Object.entries(states.lfcCommands)) {
+ promises.push(adapter.extendObjectAsync(id, obj));
+ }
try {
await Promise.all(promises);
@@ -2437,17 +2135,15 @@ async function createLfcAudyssey() {
adapter.log.debug('[INFO] <== Created Audyssey LFC states');
}
capabilities.audysseyLfc = true;
- } catch (e) {
+ } catch (e: any) {
adapter.log.error(`Could not create Audyssey LFC states: ${e.message}`);
}
-} // endCreateLfcAudyssey
+}
/**
* Creates the picture mode objects
- *
- * @returns {Promise}
*/
-async function createPictureMode() {
+async function createPictureMode(): Promise {
await adapter.setObjectNotExistsAsync('settings.pictureMode', {
type: 'state',
common: {
@@ -2470,19 +2166,20 @@ async function createPictureMode() {
native: {}
});
capabilities.pictureMode = true;
-} // endCreatePictureMode
+}
/**
* Creates the Speaker Preset Object
- * @return {Promise}
*/
-async function createSpeakerPreset() {
+async function createSpeakerPreset(): Promise {
await adapter.setObjectNotExistsAsync('settings.speakerPreset', {
type: 'state',
common: {
name: 'Speaker Preset',
type: 'number',
role: 'value',
+ read: true,
+ write: true,
states: {
1: '1',
2: '2'
@@ -2497,14 +2194,13 @@ async function createSpeakerPreset() {
/**
* Ensures that the val is part of the state list of given object id
*
- * @param {string} id - object id
- * @param {string} val - attribute which will be added to the object if not present
- * @return {Promise}
+ * @param id - object id
+ * @param val - attribute which will be added to the object if not present
*/
-async function ensureAttrInStates(id, val) {
+async function ensureAttrInStates(id: string, val: any): Promise {
try {
const obj = await adapter.getObjectAsync(id);
- if (obj && obj.common && helper.isObject(obj.common.states)) {
+ if (obj?.common && helper.isObject(obj.common.states)) {
const values = Object.values(obj.common.states);
// check if its already part of the object
if (!values.includes(val)) {
@@ -2513,7 +2209,7 @@ async function ensureAttrInStates(id, val) {
adapter.log.info(`[INFO] Added ${val} to ${id}`);
}
}
- } catch (e) {
+ } catch (e: any) {
adapter.log.error(`Could not ensure attribute ${val} to be in ${id}: ${e.message}`);
}
}
@@ -2521,29 +2217,30 @@ async function ensureAttrInStates(id, val) {
/**
* Create standard state objects
*
- * @param {'DE'|'US'} type
- * @return {Promise}
+ * @param type
*/
-async function createStandardStates(type) {
+async function createStandardStates(type: AvrType): Promise {
const promises = [];
if (type === 'DE') {
- for (const obj of helper.commonCommands) {
+ for (const obj of states.commonCommands) {
const id = obj._id;
+ // @ts-expect-error optimize structure
delete obj._id;
promises.push(adapter.extendObjectAsync(id, obj, { preserve: { common: ['name'] } }));
- } // endFor
+ }
try {
await Promise.all(promises);
adapter.log.debug('[INFO] DE states created');
- } catch (e) {
+ } catch (e: any) {
adapter.log.error(`Could not create DE states: ${e.message}`);
}
} else if (type === 'US') {
- for (const obj of helper.usCommands) {
+ for (const obj of states.usCommands) {
const id = obj._id;
+ // @ts-expect-error optimize structure
delete obj._id;
promises.push(adapter.extendObjectAsync(id, obj, { preserve: { common: ['name'] } }));
- } // endFor
+ }
for (let i = 1; i <= 6; i++) {
// iterate over zones
@@ -2558,7 +2255,7 @@ async function createStandardStates(type) {
})
);
- for (const obj of helper.usCommandsZone) {
+ for (const obj of states.usCommandsZone) {
const id = `zone${zoneNumber}.${obj._id}`;
promises.push(
adapter.setObjectNotExistsAsync(id, {
@@ -2567,18 +2264,18 @@ async function createStandardStates(type) {
native: obj.native
})
);
- } // endFor
- } // endFor
+ }
+ }
try {
await Promise.all(promises);
adapter.log.debug('[INFO] US states created');
- } catch (e) {
+ } catch (e: any) {
adapter.log.error(`Could not create US states: ${e.message}`);
}
} else {
throw new Error('Unknown receiver type');
}
-} // endCreateStandardStates
+}
if (module === require.main) {
startAdapter();
diff --git a/tsconfig.build.json b/tsconfig.build.json
index f5bbf32..a727813 100644
--- a/tsconfig.build.json
+++ b/tsconfig.build.json
@@ -2,14 +2,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
- "allowJs": true, // we also have js
+ "allowJs": false,
"checkJs": false,
"noEmit": false,
"declaration": true
},
"include": [
- "src/**/*.ts",
- "src/**/*.js" // we also have js currently
+ "src/**/*.ts"
],
"exclude": [
"src/**/*.test.ts"
diff --git a/tsconfig.json b/tsconfig.json
index 55a9c55..78dc725 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -13,7 +13,6 @@
"skipLibCheck": true, // Don't report errors in 3rd party definitions
"noEmitOnError": true,
"outDir": "./build/",
- "rootDir": "src",
"removeComments": false,
"module": "commonjs",
"moduleResolution": "node",