yunkong2.material/www/vendor.js.map
2018-11-11 11:03:17 +08:00

1 line
81 KiB
Plaintext

{"version":3,"sources":["detector.js"],"names":["Types","unknown","blind","button","camera","url","image","dimmer","door","fireAlarm","floodAlarm","gate","humidity","info","instance","light","lock","media","motion","rgb","ct","rgbSingle","hue","slider","socket","temperature","thermostat","valve","volume","volumeGroup","window","windowTilt","weatherCurrent","weatherForecast","warning","ChannelDetector","this","patternWorking","role","indicator","name","required","patternUnreach","type","patternLowbat","patternMaintain","patternError","patternDirection","patterns","mediaPlayer","states","write","noSubscribe","notSingle","min","max","stateName","multiple","inverted","unit","searchInParent","rgbOld","blinds","enums","roleOrEnumBlind","read","roleOrEnumWindow","channelRole","obj","roleOrEnum","doorsRoles","doorsWords","roleOrEnumLight","levelSlider","noDeviceDetection","ignoreRole","roles","words","indexOf","common","found","forEach","en","pos","lastIndexOf","lang","substring","hasOwnProperty","find","reg","test","lightWords","de","ru","lightRoles","blindWords","blindRoles","windowRoles","that","getAllStatesInDevice","keys","channelId","list","RegExp","replace","_id","push","getParentId","id","copyState","oldState","newState","JSON","parse","stringify","Array","t","length","original","icon","_applyPattern","objects","statePattern","match","state","split","pop","undefined","noOneOk","_getEnumsForId","members","getFunctionEnums","result","e","channel","_testOneState","context","pattern","channelStates","usedIds","_usedIds","ignoreIndicators","parts","console","log","j","_found","u","c","error","cid","bind","_detectNext","options","_keysOptional","_usedIdsOptional","allowedTypes","s","allRequiredFound","a","oneOf","b","deviceStates","deviceId","i","m","exec","detect","cache","Object","sort","detected","module","parent","exports"],"mappings":"AAyBA,aAEA,IAAAA,MAAA,CACAC,QAAA,UAEAC,MAAA,QACAC,OAAA,SACAC,OAAA,SACAC,IAAA,MACAC,MAAA,QACAC,OAAA,SACAC,KAAA,OACAC,UAAA,YACAC,WAAA,aACAC,KAAA,OACAC,SAAA,WACAC,KAAA,OACAC,SAAA,WACAC,MAAA,QACAC,KAAA,OACAC,MAAA,QACAC,OAAA,SACAC,IAAA,MACAC,GAAA,KAC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dogafox@gmail.com>\n *\n * The MIT License (MIT)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n **/\n// Version 0.1.0, 2018.08.14\n\n'use strict';\n\nvar Types = {\n unknown: 'unknown',\n\n blind: 'blind',\n button: 'button',\n camera: 'camera',\n url: 'url',\n image: 'image',\n dimmer: 'dimmer',\n door: 'door',\n fireAlarm: 'fireAlarm',\n floodAlarm: 'floodAlarm',\n gate: 'gate',\n humidity: 'humidity',\n info: 'info',\n instance: 'instance',\n light: 'light',\n lock: 'lock',\n media: 'media',\n motion: 'motion',\n rgb: 'rgb',\n ct: 'ct',\n rgbSingle: 'rgbSingle',\n hue: 'hue',\n slider: 'slider',\n socket: 'socket',\n temperature: 'temperature',\n thermostat: 'thermostat',\n valve: 'valve',\n volume: 'volume',\n volumeGroup: 'volumeGroup',\n window: 'window',\n windowTilt: 'windowTilt',\n weatherCurrent: 'weatherCurrent',\n weatherForecast: 'weatherForecast',\n warning: 'warning'\n};\n\n// Description of flags\n// role - RegEx to detect role\n// channelRole - RegEx to detect channel role of state\n// ignoreRole - RegEx to ignore some specific roles\n// indicator - is it will be shown like small icon or as a value\n// type - state type: 'number', 'string' or 'boolean' or array of possible values\n// name - own TAG of the state to process it in the logic\n// write - if set to true or false, it will be checked the write attribute, if no attribute, so \"false\" will be assumed\n// read - if set to true or false, it will be checked the write attribute, if no attribute, so \"true\" will be assumed\n// min - type of attribute: number', 'string' or 'boolean'. This attribute must exists in common\n// max - type of attribute: number', 'string' or 'boolean'. This attribute must exists in common\n// required - if required to detect the pattern as valid\n// noSubscribe - no automatic subscription for this state (e.g if write only)\n// searchInParent - if this pattern should be search in device too and not only in channel\n// enums - function to execute custom category detection\n// multiple - if more than one state may have this pattern in channel\n// noDeviceDetection - do not search indicators in parent device\n// notSingle - this state may belong to more than one tile simultaneously (e.g. volume tile and media with volume)\n// inverted - is state of indicator must be inverted\n// stateName - regex for state names (IDs). Not suggested\n\nfunction ChannelDetector() {\n if (!(this instanceof ChannelDetector)) return new ChannelDetector();\n\n var patternWorking = {role: /^indicator\\.working$/, indicator: true, name: 'WORKING', required: false};\n var patternUnreach = {role: /^indicator(\\.maintenance)?\\.unreach$/, indicator: true, type: 'boolean', name: 'UNREACH', required: false};\n var patternLowbat = {role: /^indicator(\\.maintenance)?\\.lowbat$|^indicator(\\.maintenance)?\\.battery/, indicator: true, type: 'boolean', name: 'LOWBAT', required: false};\n var patternMaintain = {role: /^indicator\\.maintenance$/, indicator: true, type: 'boolean', name: 'MAINTAIN', required: false};\n var patternError = {role: /^indicator\\.error$/, indicator: true, name: 'ERROR', required: false};\n var patternDirection = {role: /^indicator\\.direction$/, indicator: true, name: 'DIRECTION', required: false};\n var patternReachable = {role: /^indicator\\.reachable$/, indicator: true, type: 'boolean', name: 'CONNECTED', required: false, inverted: true};\n\n var patterns = {\n mediaPlayer: {\n // receive the state of player via media.state. Controlling of the player via buttons\n states: [\n // one of\n {role: /^media.state(\\..*)?$/, indicator: false, type: ['boolean', 'number'], name: 'STATE', required: true},\n // optional\n {role: /^button.play(\\..*)?$|^action.play(\\..*)?$/, indicator: false, write: true, type: 'boolean', name: 'PLAY', required: false, noSubscribe: true},\n {role: /^button.pause(\\..*)?$|^action.pause(\\..*)?$/, indicator: false, write: true, type: 'boolean', name: 'PAUSE', required: false, noSubscribe: true},\n {role: /^button.stop(\\..*)?$|^action.stop(\\..*)?$/, indicator: false, write: true, type: 'boolean', name: 'STOP', required: false, noSubscribe: true},\n {role: /^button.next(\\..*)?$|^action.next(\\..*)?$/, indicator: false, write: true, type: 'boolean', name: 'NEXT', required: false, noSubscribe: true},\n {role: /^button.prev(\\..*)?$|^action.prev(\\..*)?$/, indicator: false, write: true, type: 'boolean', name: 'PREV', required: false, noSubscribe: true},\n {role: /^media.mode.shuffle(\\..*)?$/, indicator: false, write: true, type: 'boolean', name: 'SHUFFLE', required: false, noSubscribe: true},\n {role: /^media.mode.repeat(\\..*)?$/, indicator: false, write: true, type: 'number', name: 'REPEAT', required: false, noSubscribe: true},\n {role: /^media.artist(\\..*)?$/, indicator: false, write: false, type: 'string', name: 'ARTIST', required: false},\n {role: /^media.album(\\..*)?$/, indicator: false, write: false, type: 'string', name: 'ALBUM', required: false},\n {role: /^media.title(\\..*)?$/, indicator: false, write: false, type: 'string', name: 'TITLE', required: false},\n // one of following\n [\n {role: /^media.cover$|^media.cover.big$/, indicator: false, write: false, type: 'string', name: 'COVER', required: false, notSingle: true},\n {role: /^media.cover(\\..*)$/, indicator: false, write: false, type: 'string', name: 'COVER', required: false, notSingle: true},\n ],\n {role: /^media.duration(\\..*)?$/, indicator: false, write: false, type: 'number', name: 'DURATION', required: false, noSubscribe: true},\n {role: /^media.elapsed(\\..*)?$/, indicator: false, type: 'number', name: 'ELAPSED', required: false, noSubscribe: true},\n {role: /^media.season(\\..*)?$/, indicator: false, write: true, type: 'number', name: 'SEEK', required: false, noSubscribe: true},\n {role: /^media.seek(\\..*)?$/, indicator: false, write: true, type: 'number', name: 'SEEK', required: false, noSubscribe: true},\n {role: /^media.track(\\..*)?$/, indicator: false, type: 'string', name: 'TRACK', required: false, noSubscribe: true},\n {role: /^media.episode(\\..*)?$/, indicator: false, type: 'string', name: 'EPISODE', required: false, noSubscribe: true},\n {role: /^media.season(\\..*)?$/, indicator: false, type: 'string', name: 'SEASON', required: false, noSubscribe: true},\n {role: /^level.volume?$/, indicator: false, type: 'number', min: 'number', max: 'number', write: true, name: 'VOLUME', required: false, notSingle: true, noSubscribe: true},\n {role: /^value.volume?$/, indicator: false, type: 'number', min: 'number', max: 'number', write: false, name: 'VOLUME_ACTUAL', required: false, notSingle: true, noSubscribe: true},\n {role: /^media.mute?$/, indicator: false, type: 'boolean', write: true, name: 'MUTE', required: false, notSingle: true, noSubscribe: true},\n // Ignore following states of chromecast\n {stateName: /\\.paused$|\\.playerState$/, indicator: false, name: 'IGNORE', required: false, multiple: true, noSubscribe: true},\n patternReachable,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.media\n },\n weatherForecast : {\n states: [\n {role: /^weather.icon$|^weather.icon.forecast.0$/, indicator: false, type: 'string', name: 'ICON', required: true},\n {role: /^value.temperature.min.forecast.0$/, indicator: false, type: 'number', name: 'TEMP_MIN', required: true},\n {role: /^value.temperature.max.forecast.0$/, indicator: false, type: 'number', name: 'TEMP_MAX', required: true},\n // optional\n {role: /^value.precipitation$|^value.precipitation.forecast.0$/, indicator: false, type: 'number', name: 'PRECIPITATION_CHANCE', unit: '%', required: false},\n {role: /^date$|^date.forecast.0$/, indicator: false, type: 'string', name: 'DATE', required: false},\n {role: /^dayofweek$|^dayofweek.forecast.0$/, indicator: false, type: 'string', name: 'DOW', required: false},\n {role: /^weather.state$|^weather.state.forecast.0$/, indicator: false, type: 'string', name: 'STATE', required: false},\n {role: /^value.temperature$|^value.temperature.forecast.0$/, indicator: false, type: 'number', name: 'TEMP', required: false},\n {role: /^value.pressure$/, indicator: false, type: 'number', name: 'PRESSURE', required: false},\n\n {role: /^value.humidity$|value.humidity.forecast.0$/, indicator: false, type: 'number', name: 'HUMIDITY', required: false},\n\n {role: /^value.temperature.windchill$|^value.temperature.windchill.forecast.0$/, indicator: false, type: 'number', name: 'WIND_CHILL', required: false},\n {role: /^value.temperature.feelslike$|^value.temperature.feelslike$.forecast.0$/, indicator: false, type: 'number', name: 'FEELS_LIKE', required: false},\n {role: /^value.speed.wind$|^value.speed.wind.forecast.0$/, indicator: false, type: 'number', name: 'WIND_SPEED', required: false},\n {role: /^value.direction.wind$|^value.direction.wind.forecast.0$/, indicator: false, type: 'number', name: 'WIND_DIRECTION',required: false},\n {role: /^weather.direction.wind$|^weather.direction.wind.forecast.0$/, indicator: false, type: 'string', name: 'WIND_DIRECTION_STR',required: false},\n {role: /^weather.icon.wind$|^weather.icon.wind.forecast.0$/, indicator: false, type: 'string', name: 'WIND_ICON', required: false},\n {role: /^weather.chart.url$/, indicator: false, type: 'string', name: 'HISTORY_CHART', required: false, noSubscribe: true},\n {role: /^weather.chart.url.forecast$/, indicator: false, type: 'string', name: 'FORECAST_CHART', required: false, noSubscribe: true},\n {role: /^location$/, indicator: false, type: 'string', name: 'LOCATION', required: false, multiple: true},\n\n // other days\n {role: /^weather.icon.forecast.(\\d)$/, indicator: false, type: 'string', name: 'ICON%d', required: false, searchInParent: true, multiple: true, noSubscribe: true, notSingle: true},\n\n {role: /^value.temperature.min.forecast.(\\d)$/, indicator: false, type: 'number', name: 'TEMP_MIN%d', required: false, searchInParent: true, multiple: true, noSubscribe: true},\n {role: /^value.temperature.max.forecast.(\\d)$/, indicator: false, type: 'number', name: 'TEMP_MAX%d', required: false, searchInParent: true, multiple: true, noSubscribe: true},\n\n {role: /^date.forecast.(\\d)$/, indicator: false, type: 'string', name: 'DATE%d', required: false, searchInParent: true, multiple: true, noSubscribe: true},\n {role: /^dayofweek.forecast.(\\d)$/, indicator: false, type: 'string', name: 'DOW%d', required: false, searchInParent: true, multiple: true, noSubscribe: true},\n {role: /^weather.state.forecast.(\\d)$/, indicator: false, type: 'string', name: 'STATE%d', required: false, searchInParent: true, multiple: true, noSubscribe: true},\n {role: /^value.temperature.forecast.(\\d)$/, indicator: false, type: 'number', name: 'TEMP%d', required: false, searchInParent: true, multiple: true, noSubscribe: true},\n\n {role: /^value.humidity.forecast.(\\d)$/, indicator: false, type: 'number', name: 'HUMIDITY%d', required: false, searchInParent: true, multiple: true, noSubscribe: true},\n {role: /^value.humidity.max.forecast.(\\d)$/, indicator: false, type: 'number', name: 'HUMIDITY_MAX%d', required: false, searchInParent: true, multiple: true, noSubscribe: true},\n\n {role: /^value.precipitation.forecast.(\\d)$/, indicator: false, type: 'number', unit: '%', name: 'PRECIPITATION_CHANCE%d', required: false, searchInParent: true, multiple: true, noSubscribe: true},\n\n {role: /^value.speed.wind.forecast.(\\d)$/, indicator: false, type: 'number', name: 'WIND_SPEED%d', required: false, searchInParent: true, multiple: true, noSubscribe: true},\n {role: /^value.direction.wind.forecast.(\\d)$/, indicator: false, type: 'number', name: 'WIND_DIRECTION%d',required: false, searchInParent: true, multiple: true, noSubscribe: true},\n {role: /^weather.direction.wind.forecast.(\\d)$/, indicator: false, type: 'string', name: 'WIND_DIRECTION_STR%d',required: false, searchInParent: true, multiple: true, noSubscribe: true},\n {role: /^weather.icon.wind.forecast.(\\d)$/, indicator: false, type: 'string', name: 'WIND_ICON%d', required: false, searchInParent: true, multiple: true, noSubscribe: true},\n ],\n type: Types.weatherForecast\n },\n rgb: {\n states: [\n {role: /^level\\.color\\.red$/, indicator: false, type: 'number', write: true, name: 'RED', required: true},\n {role: /^level\\.color\\.green$/, indicator: false, type: 'number', write: true, name: 'GREEN', required: true},\n {role: /^level\\.color\\.blue$/, indicator: false, type: 'number', write: true, name: 'BLUE', required: true},\n {role: /^level\\.dimmer$/, indicator: false, type: 'number', write: true, name: 'DIMMER', required: false},\n {role: /^level\\.brightness$/, indicator: false, type: 'number', write: true, name: 'BRIGHTNESS', required: false},\n {role: /^level\\.color\\.saturation$/, indicator: false, type: 'number', write: true, name: 'SATURATION', required: false},\n {role: /^level\\.color\\.temperature$/, indicator: false, type: 'number', write: true, name: 'TEMPERATURE', required: false},\n {role: /^switch\\.light$/, indicator: false, type: 'boolean', write: true, name: 'ON_LIGHT', required: false},\n {role: /^switch$/, indicator: false, type: 'boolean', write: true, name: 'ON', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.rgb\n },\n // remove it when all adapters fixed (2018.08.15) r=>red, g=>green, b=>blue\n rgbOld: {\n states: [\n {role: /^level\\.color\\.r$/, indicator: false, type: 'number', write: true, name: 'RED', required: true},\n {role: /^level\\.color\\.g$/, indicator: false, type: 'number', write: true, name: 'GREEN', required: true},\n {role: /^level\\.color\\.b$/, indicator: false, type: 'number', write: true, name: 'BLUE', required: true},\n {role: /^level\\.dimmer$/, indicator: false, type: 'number', write: true, name: 'DIMMER', required: false},\n {role: /^level\\.brightness$/, indicator: false, type: 'number', write: true, name: 'BRIGHTNESS', required: false},\n {role: /^level\\.color\\.saturation$/, indicator: false, type: 'number', write: true, name: 'SATURATION', required: false},\n {role: /^level\\.color\\.temperature$/, indicator: false, type: 'number', write: true, name: 'TEMPERATURE', required: false},\n {role: /^switch\\.light$/, indicator: false, type: 'boolean', write: true, name: 'ON_LIGHT', required: false},\n {role: /^switch$/, indicator: false, type: 'boolean', write: true, name: 'ON', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.rgb\n },\n rgbSingle: {\n states: [\n {role: /^level\\.color\\.rgb$/, indicator: false, type: 'string', write: true, name: 'RGB', required: true},\n {role: /^level\\.dimmer$/, indicator: false, type: 'number', write: true, name: 'DIMMER', required: false},\n {role: /^level\\.brightness$/, indicator: false, type: 'number', write: true, name: 'BRIGHTNESS', required: false},\n {role: /^level\\.color\\.saturation$/, indicator: false, type: 'number', write: true, name: 'SATURATION', required: false},\n {role: /^level\\.color\\.temperature$/, indicator: false, type: 'number', write: true, name: 'TEMPERATURE', required: false},\n {role: /^switch\\.light$/, indicator: false, type: 'boolean', write: true, name: 'ON_LIGHT', required: false},\n {role: /^switch$/, indicator: false, type: 'boolean', write: true, name: 'ON', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.rgbSingle\n },\n hue: {\n states: [\n {role: /^level\\.color\\.hue$/, indicator: false, type: 'number', write: true, name: 'HUE', required: true},\n {role: /^level\\.dimmer$/, indicator: false, type: 'number', write: true, name: 'DIMMER', required: false, searchInParent: true},\n {role: /^level\\.brightness$/, indicator: false, type: 'number', write: true, name: 'BRIGHTNESS', required: false},\n {role: /^level\\.color\\.saturation$/, indicator: false, type: 'number', write: true, name: 'SATURATION', required: false},\n {role: /^level\\.color\\.temperature$/, indicator: false, type: 'number', write: true, name: 'TEMPERATURE', required: false},\n {role: /^switch.light$/, indicator: false, type: 'boolean', write: true, name: 'ON', required: false},\n {role: /^switch$/, indicator: false, type: 'boolean', write: true, name: 'ON', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.hue\n },\n ct: {\n states: [\n {role: /^level\\.color\\.temperature$/, indicator: false, type: 'number', write: true, name: 'TEMPERATURE', required: true},\n {role: /^level\\.dimmer$/, indicator: false, type: 'number', write: true, name: 'DIMMER', required: false},\n {role: /^level\\.brightness$/, indicator: false, type: 'number', write: true, name: 'BRIGHTNESS', required: false},\n {role: /^level\\.color\\.saturation$/, indicator: false, type: 'number', write: true, name: 'SATURATION', required: false},\n {role: /^switch.light$/, indicator: false, type: 'boolean', write: true, name: 'ON', required: false},\n {role: /^switch$/, indicator: false, type: 'boolean', write: true, name: 'ON', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.ct\n },\n warning: {\n states: [\n {role: /^value\\.warning$/, indicator: false, name: 'LEVEL', required: true},\n // optional\n {role: /^weather\\.title\\.short$/, indicator: false, type: 'string', name: 'TITLE', required: false},\n {role: /^weather\\.title$/, indicator: false, type: 'string', name: 'INFO', required: false},\n {role: /^date\\.start$/, indicator: false, type: 'string', name: 'START', required: false},\n {role: /^date\\.end$/, indicator: false, type: 'string', name: 'END', required: false},\n {role: /^date$/, indicator: false, type: 'string', name: 'START', required: false},\n {role: /^weather\\.chart\\.url/, indicator: false, type: 'string', name: 'ICON', required: false},\n\n // For detailed screen\n {role: /^weather\\.state$/, indicator: false, type: 'string', name: 'DESC', required: false, noSubscribe: true},\n ],\n type: Types.warning\n },\n thermostat: {\n states: [\n {role: /temperature(\\..*)?$/, indicator: false, write: true, type: 'number', name: 'SET', required: true},\n // optional\n {role: /temperature(\\..*)?$/, indicator: false, write: false, type: 'number', searchInParent: true, name: 'ACTUAL', required: false},\n {role: /humidity(\\..*)?$/, indicator: false, write: false, type: 'number', searchInParent: true, name: 'HUMIDITY', required: false},\n {role: /^switch\\.boost(\\..*)?$/, indicator: false, write: true, type: 'number', searchInParent: true, name: 'BOOST', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.thermostat\n },\n blinds: {\n states: [\n {role: /^level(\\.blind)?$/, indicator: false, type: 'number', write: true, enums: roleOrEnumBlind, name: 'SET', required: true},\n // optional\n {role: /^value(\\.blind)?$/, indicator: false, type: 'number', enums: roleOrEnumBlind, name: 'ACTUAL', required: false},\n {role: /^button\\.stop$|^action\\.stop$/, indicator: false, type: 'boolean', write: true, enums: roleOrEnumBlind, name: 'STOP', required: false, noSubscribe: true},\n patternDirection,\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.blind\n },\n lock: {\n states: [\n {role: /^switch\\.lock$/, indicator: false, type: 'boolean', write: true, name: 'SET', required: true},\n // optional\n {role: /^state$/, indicator: false, type: 'boolean', write: false, name: 'ACTUAL', required: false},\n { indicator: false, type: 'boolean', write: true, read: false, name: 'OPEN', required: false, noSubscribe: true},\n patternDirection,\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.lock\n },\n motion: {\n states: [\n {role: /^state\\.motion$|^sensor\\.motion$/, indicator: false, type: 'boolean', name: 'ACTUAL', required: true},\n // optional\n {role: /brightness$/, indicator: false, type: 'number', name: 'SECOND', required: false},\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.motion\n },\n window: {\n states: [\n {role: /^state(\\.window)?$|^sensor(\\.window)?/, indicator: false, type: 'boolean', enums: roleOrEnumWindow, name: 'ACTUAL', required: true},\n // optional\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.window\n },\n windowTilt: {\n states: [\n {role: /^state?$|^value(\\.window)?$/, indicator: false, type: 'number', enums: roleOrEnumWindow, name: 'ACTUAL', required: true},\n // optional\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.windowTilt\n },\n fireAlarm: {\n states: [\n {role: /^state?$|^sensor(\\.alarm)?\\.fire/, indicator: false, type: 'boolean', name: 'ACTUAL', required: true, channelRole: /^sensor(\\.alarm)?\\.fire$/},\n // optional\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.fireAlarm\n },\n door: {\n states: [\n {role: /^state?$|^state(\\.door)?$|^sensor(\\.door)?/, indicator: false, type: 'boolean', write: false, enums: roleOrEnumDoor, name: 'ACTUAL', required: true},\n // optional\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.door\n },\n dimmer: {\n states: [\n {role: /^level(\\.dimmer)?|^level\\.brightness$/, indicator: false, type: 'number', write: true, enums: roleOrEnumLight, name: 'SET', required: true},\n // optional\n {role: /^value(\\.dimmer)?$/, indicator: false, type: 'number', write: false, enums: roleOrEnumLight, name: 'ACTUAL', required: false},\n {role: /^switch(\\.light)?$|^state$/, indicator: false, type: 'boolean', write: true, enums: roleOrEnumLight, name: 'ON_SET', required: false},\n {role: /^switch(\\.light)?$|^state$/, indicator: false, type: 'boolean', write: false, enums: roleOrEnumLight, name: 'ON_ACTUAL', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.dimmer\n },\n light: {\n states: [\n {role: /^switch(\\.light)?$|^state$/, indicator: false, type: 'boolean', write: true, enums: roleOrEnumLight, name: 'SET', required: true},\n // optional\n {role: /^switch(\\.light)?$|^state$/, indicator: false, type: 'boolean', write: false, enums: roleOrEnumLight, name: 'ACTUAL', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.light\n },\n volume: {\n states: [\n {role: /^level\\.volume$/, indicator: false, type: 'number', min: 'number', max: 'number', write: true, name: 'SET', required: true},\n // optional\n {role: /^value\\.volume$/, indicator: false, type: 'number', min: 'number', max: 'number', write: false, name: 'ACTUAL', required: false},\n {role: /^media\\.mute$/, indicator: false, type: 'boolean', write: true, name: 'MUTE', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.volume\n },\n volumeGroup: {\n states: [\n {role: /^level\\.volume\\.group?$/, indicator: false, type: 'number', min: 'number', max: 'number', write: true, name: 'SET', required: true},\n {role: /^value\\.volume\\.group$/, indicator: false, type: 'number', min: 'number', max: 'number', write: false, name: 'ACTUAL', required: false},\n {role: /^media\\.mute\\.group$/, indicator: false, type: 'boolean', write: true, name: 'MUTE', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.volumeGroup\n },\n levelSlider: {\n states: [\n {role: /^level(\\..*)?$/, indicator: false, type: 'number', min: 'number', max: 'number', write: true, name: 'SET', required: true},\n {role: /^value(\\..*)?$/, indicator: false, type: 'number', min: 'number', max: 'number', write: false, name: 'ACTUAL', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.slider\n },\n socket: {\n states: [\n {role: /^switch$|^state$|^switch\\.active$/, indicator: false, type: 'boolean', write: true, name: 'SET', required: true},\n {role: /^state$|^state\\.active$/, indicator: false, type: 'boolean', write: false, name: 'ACTUAL', required: false},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.socket\n },\n button: {\n states: [\n {role: /^button(\\.[.\\w]+)?$|^action(\\.[.\\w]+)?$/, indicator: false, type: 'boolean', read: false, write: true, name: 'SET', required: true, noSubscribe: true},\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.button\n },\n temperature: {\n states: [\n {role: /temperature$/, indicator: false, write: false, type: 'number', name: 'ACTUAL', required: true},\n {role: /humidity$/, indicator: false, write: false, type: 'number', name: 'SECOND', required: false},\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.temperature\n },\n info: {\n states: [\n { indicator: false, name: 'ACTUAL', required: true, multiple: true, noDeviceDetection: true, ignoreRole: /\\.inhibit$/},\n patternWorking,\n patternUnreach,\n patternLowbat,\n patternMaintain,\n patternError\n ],\n type: Types.info\n }\n };\n\n function checkEnum(obj, enums, words) {\n var found = false;\n if (enums) {\n enums.forEach(function(en) {\n var pos = en.lastIndexOf('.');\n if (pos !== -1) {\n en = en.substring(pos + 1);\n }\n for (var lang in words) {\n if (words.hasOwnProperty(lang)) {\n if (words[lang].find(function (reg) {return reg.test(en);})) {\n found = true;\n return false;\n }\n }\n }\n });\n }\n return found;\n }\n\n function roleOrEnum(obj, enums, roles, words) {\n if (roles && roles.indexOf(obj.common.role) !== -1) {\n return true;\n }\n return checkEnum(obj, enums, words);\n }\n\n// -------------- LIGHT -----------------------------------------\n var lightWords = {\n en: [/lights?/i, /lamps?/i, /ceilings?/i],\n de: [/licht(er)?/i, /lampen?/i, /beleuchtung(en)?/i],\n ru: [/свет/i, /ламп[аы]/i, /торшеры?/, /подсветк[аи]/i, /лампочк[аи]/i, /светильники?/i]\n };\n var lightRoles = ['switch.light', 'dimmer', 'value.dimmer', 'level.dimmer', 'sensor.light', 'state.light'];\n function roleOrEnumLight(obj, enums) {\n return roleOrEnum(obj, enums, lightRoles, lightWords);\n }\n\n// -------------- BLINDS -----------------------------------------\n var blindWords = {\n en: [/blinds?/i, /windows?/i, /shutters?/i],\n de: [/rollladen?/i, /fenstern?/i, /beschattung(en)?/i],\n ru: [/ставни/i, /рольставни/i, /окна|окно/, /жалюзи/i]\n };\n\n var blindRoles = ['blind', 'level.blind', 'value.blind', 'action.stop', 'button.stop'];\n function roleOrEnumBlind(obj, enums) {\n return roleOrEnum(obj, enums, blindRoles, blindWords);\n }\n\n// -------------- WINDOWS -----------------------------------------\n var windowRoles = ['window', 'state.window', 'sensor.window', 'value.window'];\n function roleOrEnumWindow(obj, enums) {\n return roleOrEnum(obj, enums, windowRoles, blindWords);\n }\n\n// -------------- DOORS -----------------------------------------\n var doorsWords = {\n en: [/doors?/i, /gates?/i, /wickets?/i, /entry|entries/i],\n de: [/türe?/i, /tuere?/i, /tore?/i, /einfahrt(en)?/i, /pforten?/i],\n ru: [/двери|дверь/i, /ворота/i, /калитка|калитки/, /въезды?/i, /входы?/i]\n };\n\n var doorsRoles = ['door', 'state.door', 'sensor.door'];\n function roleOrEnumDoor(obj, enums) {\n return roleOrEnum(obj, enums, doorsRoles, doorsWords);\n }\n\n function getAllStatesInChannel(keys, channelId) {\n var list = [];\n var reg = new RegExp('^' + channelId.replace(/\\./g, '\\\\.') + '\\\\.[^.]+$');\n keys.forEach(function(_id) {\n if (reg.test(_id)) list.push(_id);\n });\n return list;\n }\n function getAllStatesInDevice(keys, channelId) {\n var list = [];\n var reg = new RegExp('^' + channelId.replace(/\\./g, '\\\\.') + '\\\\.[^.]+\\\\.[^.]+$');\n keys.forEach(function(_id) {\n if (reg.test(_id)) list.push(_id);\n });\n return list;\n }\n\n function getFunctionEnums(objects) {\n var enums = [];\n var reg = /^enum\\.functions\\./;\n for (var id in objects) {\n if (objects.hasOwnProperty(id) && reg.test(id) && objects[id] && objects[id].type === 'enum' && objects[id].common && objects[id].common.members && objects[id].common.members.length) {\n enums.push(id);\n }\n }\n return enums;\n }\n\n function getParentId(id) {\n var pos = id.lastIndexOf('.');\n if (pos !== -1) {\n return id.substring(0, pos);\n } else {\n return id;\n }\n }\n\n this._applyPattern = function (objects, id, statePattern) {\n if (objects[id] && objects[id].common) {\n var role = null;\n if (!statePattern) {\n debugger;\n }\n if (statePattern.role) {\n role = statePattern.role.test(objects[id].common.role || '');\n\n if (role && statePattern.channelRole) {\n var channelId = getParentId(id);\n if (objects[channelId] && (objects[channelId].type === 'channel' || objects[channelId].type === 'device')) {\n role = statePattern.channelRole.test(objects[channelId].common.role);\n } else {\n role = false;\n }\n }\n }\n if (role === false) {\n return;\n }\n\n if (statePattern.stateName && !statePattern.stateName.test(id)) {\n return false;\n }\n if (statePattern.unit && statePattern.unit !== objects[id].common.unit) {\n return false;\n }\n\n if (statePattern.ignoreRole && statePattern.ignoreRole.test(objects[id].common.role)) {\n return;\n }\n\n if (statePattern.indicator === false && (objects[id].common.role || '').match(/^indicator(\\.[.\\w]+)?$/)) {\n return;\n }\n\n if (statePattern.state && !statePattern.state.test(id.split('.').pop())) {\n return;\n }\n\n if (statePattern.write !== undefined && statePattern.write !== (objects[id].common.write || false)) {\n return;\n }\n if (statePattern.min === 'number' && typeof objects[id].common.min !== 'number') {\n return;\n }\n if (statePattern.max === 'number' && typeof objects[id].common.max !== 'number') {\n return;\n }\n\n if (statePattern.read !== undefined && statePattern.read !== (objects[id].common.read === undefined ? true : objects[id].common.read)) {\n return;\n }\n\n if (statePattern.type) {\n if (typeof statePattern.type === 'string') {\n if (statePattern.type !== objects[id].common.type) {\n return;\n }\n } else {\n var noOneOk = true;\n for (var t = 0; t < statePattern.type.length; t++) {\n if (statePattern.type[t] === objects[id].common.type) {\n noOneOk = false;\n break;\n }\n }\n if (noOneOk) {\n return;\n }\n }\n }\n\n if (statePattern.enums && typeof statePattern.enums === 'function') {\n var enums = this._getEnumsForId(objects, id);\n if (!statePattern.enums(objects[id], enums)) {\n return;\n }\n }\n\n return true;\n } else {\n return false;\n }\n };\n\n this._getEnumsForId = function (objects, id) {\n this.enums = this.enums || getFunctionEnums(objects);\n var result = [];\n this.enums.forEach(function (e) {\n if (objects[e].common.members.indexOf(id) !== -1) {\n result.push(e);\n }\n });\n if (!result.length && objects[id] && objects[id].type === 'state') {\n var channel = getParentId(id);\n if (objects[channel] && (objects[channel].type === 'channel' || objects[channel].type === 'device')) {\n this.enums.forEach(function (e) {\n if (objects[e].common.members.indexOf(channel) !== -1) {\n result.push(e);\n }\n });\n }\n }\n\n return result.length ? result : null;\n };\n\n function copyState(oldState, newState) {\n if (!newState) {\n newState = JSON.parse(JSON.stringify(oldState));\n }\n\n if (newState instanceof Array) {\n for (var t = 0; t < newState.length; t++) {\n newState[t].original = oldState[t].original || oldState[t];\n if (oldState[t].enums) {\n newState[t].enums = oldState[t].enums;\n }\n if (oldState[t].role) {\n newState[t].role = oldState[t].role;\n }\n if (oldState[t].channelRole) {\n newState[t].channelRole = oldState[t].channelRole;\n }\n if (oldState[t].icon) {\n newState[t].icon = oldState[t].icon;\n }\n }\n } else {\n newState.original = oldState.original || oldState;\n if (oldState.enums) {\n newState.enums = oldState.enums;\n }\n if (oldState.role) {\n newState.role = oldState.role;\n }\n if (oldState.channelRole) {\n newState.channelRole = oldState.channelRole;\n }\n if (oldState.icon) {\n newState.icon = oldState.icon;\n }\n }\n\n return newState;\n }\n\n this._testOneState = function (context) {\n var objects = context.objects;\n var pattern = context.pattern;\n var state = context.state;\n var channelStates = context.channelStates;\n var usedIds = context.usedIds;\n var _usedIds = context._usedIds;\n var ignoreIndicators = context.ignoreIndicators;\n var result = context.result;\n var found = false;\n\n channelStates.forEach(function (_id) {\n if ((state.indicator || (usedIds.indexOf(_id) === -1 && (state.notSingle || _usedIds.indexOf(_id) === -1))) &&\n this._applyPattern(objects, _id, state)) {\n if (state.indicator && ignoreIndicators) {\n var parts = _id.split('.');\n\n if (ignoreIndicators.indexOf(parts.pop()) !== -1) {\n console.log(_id + ' ignored');\n return;\n }\n }\n\n if (!state.indicator && !state.notSingle){\n _usedIds.push(_id);\n }\n if (!result) {\n context.result = result = JSON.parse(JSON.stringify(patterns[pattern]));\n result.states.forEach(function (state, j) {\n copyState(patterns[pattern].states[j], state);\n });\n }\n if (!result.type) {\n debugger;\n }\n\n if (!result.states.find(function (e) {return e.id === _id;})) {\n var _found = false;\n for (var u = 0; u < result.states.length; u++) {\n if (result.states[u] instanceof Array) {\n for (var c = 0; c < result.states[u].length; c++) {\n if (result.states[u][c].name === state.name && result.states[u][c].role === state.role) {\n result.states[u] = result.states[u][c];\n result.states[u].id = _id;\n _found = true;\n break;\n }\n }\n if (_found) {\n break;\n }\n } else {\n if (result.states[u].name === state.name) {\n result.states[u].id = _id;\n _found = true;\n break;\n }\n }\n }\n if (!_found) {\n console.error('Cannot find state for ' + _id);\n }\n }\n found = true;\n if (state.multiple && channelStates.length > 1) {\n // execute this rule for every state in this channel\n channelStates.forEach(function (cid) {\n if (cid === _id) return;\n if ((state.indicator || (usedIds.indexOf(cid) === -1 && (state.notSingle || _usedIds.indexOf(cid) === -1))) &&\n this._applyPattern(objects, cid, state)) {\n if (!state.indicator && !state.notSingle) {\n _usedIds.push(cid);\n }\n var newState = copyState(state);\n newState.id = cid;\n result.states.push(newState);\n }\n }.bind(this));\n }\n return false; // stop iteration\n }\n }.bind(this));\n return found;\n };\n\n this._detectNext = function (options) {\n var objects = options.objects;\n var id = options.id;\n var keys = options._keysOptional;\n var usedIds = options._usedIdsOptional;\n var ignoreIndicators = options.ignoreIndicators;\n var allowedTypes = options.allowedTypes;\n\n if (!usedIds) {\n usedIds = [];\n options._usedIdsOptional = usedIds;\n }\n\n if (objects[id] && objects[id].common) {\n var channelStates;\n\n if (objects[id].type === 'state') {\n channelStates = [id];\n } else if (objects[id].type === 'device') {\n channelStates = getAllStatesInDevice(keys, id);\n } else { // channel\n channelStates = getAllStatesInChannel(keys, id);\n }\n\n if (id.indexOf('yeelight-2.0.color-') !== -1) {\n console.log('aaa');\n }\n var context = {\n objects: objects,\n channelStates: channelStates,\n usedIds: usedIds,\n ignoreIndicators: ignoreIndicators\n };\n\n for (var pattern in patterns) {\n if (!patterns.hasOwnProperty(pattern) || (allowedTypes && allowedTypes.indexOf(patterns[pattern].type) === -1)) continue;\n context.result = null;\n\n if (pattern === 'hue' && id.indexOf('yeelight-2.0.color-') !== -1) {\n console.log(pattern);\n }\n\n var _usedIds = [];\n context.pattern = pattern;\n context._usedIds = _usedIds;\n patterns[pattern].states.forEach(function (state) {\n var found = false;\n\n if (state.name === 'ON') {\n //console.log('ON');\n }\n\n // one of following\n if (state instanceof Array) {\n for (var s = 0; s < state.length; s++) {\n context.state = state[s];\n if (this._testOneState(context)) {\n found = true;\n break;\n }\n }\n if (!found) {\n context.result = null;\n return false;\n }\n } else {\n context.state = state;\n if (this._testOneState(context)) {\n found = true;\n }\n if (state.required && !found) {\n context.result = null;\n return false;\n }\n }\n }.bind(this));\n\n // if all required states found?\n var allRequiredFound = true;\n if (context.result) {\n for (var a = 0; a < context.result.states.length; a++) {\n if (context.result.states[a] instanceof Array) {\n // one of\n var oneOf = false;\n for (var b = 0; b < context.result.states[a].length; b++) {\n if (context.result.states[a][b].required && context.result.states[a].id) {\n oneOf = true;\n break;\n }\n }\n if (!oneOf) {\n allRequiredFound = false;\n break;\n }\n } else {\n if (context.result.states[a].required && !context.result.states[a].id) {\n allRequiredFound = false;\n break;\n }\n }\n }\n } else {\n allRequiredFound = false;\n }\n\n\n if (allRequiredFound) {\n _usedIds.forEach(function (id) {usedIds.push(id);});\n // context.result.id = id;\n //this.cache[id] = context.result;\n var deviceStates;\n\n if (pattern === 'info') {\n //console.log('AA');\n }\n\n // looking for indicators and special states\n if (objects[id].type !== 'device') {\n // get device name\n var deviceId = getParentId(id);\n if (objects[deviceId] && (objects[deviceId].type === 'channel' || objects[deviceId].type === 'device')) {\n deviceStates = getAllStatesInDevice(keys, deviceId);\n if (deviceStates) {\n deviceStates.forEach(function (_id) {\n context.result.states.forEach(function (state, i) {\n if (!state.id && (state.indicator || state.searchInParent) && !state.noDeviceDetection) {\n if (this._applyPattern(objects, _id, state.original)) {\n context.result.states[i].id = _id;\n }\n }\n }.bind(this));\n }.bind(this));\n }\n }\n }\n context.result.states.forEach(function (state) {\n if (state.name.indexOf('%d') !== -1 && state.role && state.id) {\n var m = state.role.exec(context.objects[state.id].common.role);\n if (m) {\n state.name = state.name.replace('%d', m[1]);\n }\n }\n if (state.role) {\n delete state.role;\n }\n if (state.enums) {\n delete state.enums;\n }\n if (state.original) {\n if (state.original.icon) {\n state.icon = state.original.icon;\n }\n delete state.original;\n }\n });\n\n return context.result;\n }\n }\n }\n return null;\n };\n\n this.detect = function (options) {\n var objects = options.objects;\n var id = options.id;\n var _keysOptional = options._keysOptional;\n var _usedIdsOptional = options._usedIdsOptional;\n var ignoreIndicators = options.ignoreIndicators;\n // var allowedTypes = options.allowedTypes;\n\n if (this.cache[id] !== undefined) {\n return this.cache[id];\n }\n\n if (!_keysOptional) {\n _keysOptional = Object.keys(objects);\n _keysOptional.sort();\n options._keysOptional = _keysOptional;\n }\n\n var result = [];\n if (_usedIdsOptional) {\n _usedIdsOptional = [];\n options._usedIdsOptional = _usedIdsOptional;\n }\n\n var detected;\n\n while((detected = this._detectNext(options))) {\n result.push(detected);\n }\n\n this.cache[id] = result.length ? result : null;\n\n return this.cache[id];\n };\n\n (function _constructor (that) {\n that.enums = null;\n that.cache = {};\n })(this);\n\n return this;\n}\n\nif (typeof module !== 'undefined' && module.parent) {\n module.exports = {\n Types: Types,\n ChannelDetector: ChannelDetector\n };\n}"]}