'action.devices.types.LIGHT', 'control-socket' => 'action.devices.types.OUTLET', 'control-temp' => 'action.devices.types.THERMOSTAT', 'control-media' => 'action.devices.types.REMOTECONTROL', ]; private static $traidWordBook = [ 'on/off' => 'action.devices.traits.OnOff', 'temp_cont' => 'action.devices.traits.TemperatureSetting', 'vol_cont' => 'action.devices.traits.Volume', 'media_cont' => 'action.devices.traits.TransportControl', 'media_status' => 'action.devices.traits.MediaState', 'media_apps' => 'action.devices.traits.AppSelector', 'media_input' => 'action.devices.traits.InputSelector', ]; private static $commandWordBook = [ 'action.devices.commands.OnOff' => 'on/off', 'action.devices.commands.ThermostatTemperatureSetpoint' => 'temp_cont', 'action.devices.commands.ThermostatSetMode' => 'temp_cont', 'action.devices.commands.setVolume' => 'vol_cont', 'action.devices.commands.mediaNext' => 'media_status', 'action.devices.commands.mediaPause' => 'media_status', 'action.devices.commands.mediaPrevious' => 'media_status', 'action.devices.commands.mediaResume' => 'media_status', 'action.devices.commands.mediaStop' => 'media_status', 'action.devices.commands.appSelect' => 'media_apps', 'action.devices.commands.SetInput' => 'media_input', ]; private static $attributeWordBook = [ 'on/off' => [ 'commandOnlyOnOff' => false, ], 'temp_cont' => [ 'availableThermostatModes' => ['off', 'heat'], 'thermostatTemperatureUnit' => 'C', ], 'vol_cont' => [ 'volumeCanMuteAndUnmute' => false, 'volumeDefaultPercentage' => 6, 'volumeMaxLevel' => 100, 'levelStepSize' => 2, 'commandOnlyVolume' => false, ], 'media_cont' => [ 'transportControlSupportedCommands' => [ "NEXT", "PREVIOUS", "PAUSE", "STOP", "RESUME", "CAPTION_CONTROL" ], ], 'media_status' => [ 'supportActivityState' => true, 'supportPlaybackState' => true, ], 'media_apps' => [ "availableApplications" => [ [ "key" => "kodi", "names" => [ "name_synonym" => [ "Kodi", ], "lang" => "en", ], ], ], ], 'media_input' => [ "availableInputs" => [ [ "key" => "pc", "names" => [ "name_synonym" => [ "PC", ], "lang" => "en", ], ], ] ], ]; static function getAction($deviceType) { if (!isset(self::$actionWordBook[$deviceType])) return; return self::$actionWordBook[$deviceType]; } static function getTraid($subDeviceType) { if (!isset(self::$traidWordBook[$subDeviceType])) return; return self::$traidWordBook[$subDeviceType]; } static function getType($subDeviceCommand) { if (!isset(self::$commandWordBook[$subDeviceCommand])) return; return self::$commandWordBook[$subDeviceCommand]; } static function getAttribute($subDeviceType) { if (!isset(self::$attributeWordBook[$subDeviceType])) return; return self::$attributeWordBook[$subDeviceType]; } static function getQueryJson($deviceType, $type) { return self::$wordBook[$type]; } }