导航链接

(1)香橙派+apache2与php+天猫精灵=自建平台语音支持--前言

(2)香橙派+apache2与php+天猫精灵=自建平台语音支持--香橙派操作系统安装

(3)香橙派+apache2与php+天猫精灵=自建平台语音支持--香橙派环境配置

(4)香橙派+apache2与php+天猫精灵=自建平台语音支持--apache2与php

(5)香橙派+apache2与php+天猫精灵=自建平台语音支持--MariaDB的安装

(6)香橙派+apache2与php+天猫精灵=自建平台语音支持--天猫精灵对接1

(7)香橙派+apache2与php+天猫精灵=自建平台语音支持--天猫精灵对接2

(8)香橙派+apache2与php+天猫精灵=自建平台语音支持--天猫精灵对接3

(9)香橙派+apache2与php+天猫精灵=自建平台语音支持--天猫精灵对接4

(10)香橙派+apache2与php+天猫精灵=自建平台语音支持--天猫精灵对接5

(11)香橙派+apache2与php+天猫精灵=自建平台语音支持--天猫精灵对接6

(12)香橙派+apache2与php+天猫精灵=自建平台语音支持--天猫精灵对接7

设备查询

还是先上个时序图,看图基本功能也就都知道了。

下图为设备响应指令的详细协议以及协议的解析和响应

    case 'AliGenie.Iot.Device.Query': {error_log('----case in Query----');$result = device_status($obj, $messageId);break;}

协议的解析和设备控制协议的解析采用的思想差不多,只不过查询和控制这两个过程是正好相反的。过程控制是主动存储数据,然后又硬件设备读取,查询是硬件设备返回数据存储到服务器上在查询的时候读取。就这样,具体的代码看aligenies_handle.php中的内容吧,这里会调用存储读取的具体PHP。

function device_status($obj, $messageId)
{error_log('----device_status in----');global $sqlFileName;$deviceId = $obj->payload->deviceId;$action = '';$deviceType = check_type_from_id($deviceId);switch ($obj->header->name) {case 'QueryPowerState':$action = 'powerstate';break;case 'QueryColor':$action = 'color';break;case "QueryTemperature":$action = "temperature";break;case "QueryWindspeed":$action = "windspeed";break;case "QueryBrightness":$action = "brightness";break;case "QueryFog":$action = "fog";break;case "QueryHumidity":$action = "humidity";break;case "QueryPm25":$action = "pm25";break;case "QueryChannel":$action = "channel";break;case "QueryNumber":$action = "number";break;case "QueryDirection":$action = "direction";break;case "QueryAngle":$action = "angle";break;case "QueryAnion":$action = "anion";break;case "QueryEffluent":$action = "effluent";break;case "QueryMode":$action = "mode";break;case "QueryLeftTime":$action = "lefttime";break;case "QueryRemoteStatus":$action = "remotestatus";break;case "QueryOnlineState":$action = "onlinestate";break;case "QueryColorTemperature":$action = "colorTemperature";break;case "Query":$action = "all";break;default:$action = "";}    if ($action == "" || $deviceType == "") {$ret = new AliGenie\QueryResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseDeviceId($deviceId);$ret->payload->putResponseError("DEVICE_NOT_SUPPORT_FUNCTION");$retJson = json_encode($ret);return $retJson;}$properties = array();$findDevice = false;$queryValue = '';if (($txtRes = fopen($sqlFileName, "r")) === false) {error_log('----get_control fopen failed----');$ret = new AliGenie\QueryResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseDeviceId($deviceId);$ret->payload->putResponseError("SERVICE_ERROR", "CANNOT_OPEN");$retJson = json_encode($ret);return $retJson;}$str = fread($txtRes, filesize($sqlFileName));$sqlObj = json_decode($str);$devArray = $sqlObj->dev_array;$ret = new AliGenie\QueryResponse();$ret->header->putResponseName($obj->header->name);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseDeviceId($deviceId);foreach ($devArray as $data) {error_log('entity_id-->'.$data->entity_id);error_log('device_type-->'.$data->device_type);if ($data->entity_id == $deviceId) {$findDevice = true;switch ($data->device_type) {case 'ceiling_lamp': {$brightnessWhite = '';$brightnessYellow = '';foreach ($data->properties as $element) {error_log('name-->'.$element->name);error_log('value-->'.$element->value);if ($element->name =='brightness_w') {$brightnessWhite = $element->value;} elseif ($element->name =='brightness_y') {$brightnessYellow = $element->value;} else {$properties[$element->name] = $element->value;}}$properties['brightness'] = ($brightnessWhite>$brightnessYellow)?$brightnessWhite:$brightnessYellow;if ($brightnessWhite != 0 && $brightnessYellow == 0) {$properties['color'] = 'White';} elseif ($brightnessWhite == 0 && $brightnessYellow != 0) {$properties['color'] = 'Yellow';} elseif ($brightnessWhite == $brightnessYellow && $brightnessYellow != 0) {$properties['mode'] = '自然模式';}break;}}}}fclose($txtRes);if ($action != 'all') {$queryValue = $properties[$obj->header->name];array_splice($properties, 0);$properties[$obj->header->name] = $queryValue;}foreach ($properties as $name => $value) {$pro = new AliGenie\QueryPropertie($name, $value);$ret->properties[] = $pro;}if ($findDevice == false) {$ret = new AliGenie\QueryResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseDeviceId($deviceId);$ret->payload->putResponseError("DEVICE_IS_NOT_EXIST");$retJson = json_encode($ret);return $retJson;} else if ($queryValue == '' && $action != 'all') {$ret = new AliGenie\QueryResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseDeviceId($deviceId);$ret->payload->putResponseError("INVALIDATE_PARAMS");$retJson = json_encode($ret);return $retJson;}$retJson = json_encode($ret);error_log('----device_status out----');return $retJson;
}

到这里所有的文件部署完毕,我们现在天猫精灵上新建一个智能家居,用于真机测试。

下面是

aligenies_gate.php和aligenies_handle.php完整文件的代码。

aligenies_gate.php

<?php
error_log('----aligenies_gate.php in----');
require_once __DIR__.'/aligenies_handle.php';$chars = md5(uniqid(mt_rand(), true));
$uuid  = substr($chars,0,8) . '-';
$uuid .= substr($chars,8,4) . '-';
$uuid .= substr($chars,12,4) . '-';
$uuid .= substr($chars,16,4) . '-';
$uuid .= substr($chars,20,12);$postStr = file_get_contents("php://input");
$obj = json_decode($postStr);
$messageId = $uuid;
error_log('get-request->'.$postStr);
switch ($obj->header->namespace) {case 'AliGenie.Iot.Device.Discovery': {error_log('----case in Discovery----');$result = device_discovery($messageId);break;}case 'AliGenie.Iot.Device.Control': {error_log('----case in Control----');$result = device_control($obj, $messageId);break;}case 'AliGenie.Iot.Device.Query': {error_log('----case in Query----');$result = device_status($obj, $messageId);break;}default: {$result='Nothing return,there is an error~!!';}
}
echo($result);
error_log('----reseponse----');
error_log($result);
error_log('----aligenies_gate.php out----');
?>

aligenies_handle.php

<?php
require_once __DIR__.'/DiscoveryResponse.php';
require_once __DIR__.'/ControlResponse.php';
require_once __DIR__.'/QueryResponse.php';$sqlFileName = "../sqldata.txt";function device_discovery($messageId)
{error_log('----device_discovery in----');global $sqlFileName;if (($txtRes = fopen($sqlFileName, "r")) === false) {error_log('----gate_implement fopen failed----');$ret = new AliGenie\DiscoveryResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseError("SERVICE_ERROR", "CANNOT_OPEN");$retJson = json_encode($ret);return $retJson;}$str = fread($txtRes, filesize($sqlFileName));error_log("str-->".$str);$obj = json_decode($str);$ret = new AliGenie\DiscoveryResponse();$ret->header->putResponseMessageId($messageId);foreach ($obj->dev_array as $devElement) {error_log('entity_id-->'.$devElement->entity_id);switch ($devElement->device_type) {case 'ceiling_lamp': {$dev = new AliGenie\DiscoveryDevice();$dev->putResponseDeviceInfo($devElement->entity_id, "吸顶灯", device_id_to_devicetype($devElement->entity_id), "https://www.rtplay.cn/icon/td.png");$dev->actions = array("TurnOn","TurnOff","SetBrightness","SetColor","AdjustUpBrightness","AdjustDownBrightness","QueryBrightness","QueryPowerState","QueryColor","Query");$brightnessWhite = '';$brightnessYellow = '';foreach ($devElement->properties as $propertie) {if ($propertie->name =='brightness_w') {$brightnessWhite = $propertie->value;} elseif ($propertie->name =='brightness_y') {$brightnessYellow = $propertie->value;} else {$pro = new AliGenie\DiscoveryPropertie($propertie->name, $propertie->value);$dev->putResponseProperties($pro);}}$brightness = ($brightnessWhite>$brightnessYellow)?$brightnessWhite:$brightnessYellow;$pro = new AliGenie\DiscoveryPropertie("brightness", $brightness);$dev->putResponseProperties($pro);if ($brightnessWhite == 100 && $brightnessYellow == 0) {$pro = new AliGenie\DiscoveryPropertie("color", "White");$dev->putResponseProperties($pro);} elseif ($brightnessWhite == 0 && $brightnessYellow == 100) {$pro = new AliGenie\DiscoveryPropertie("color", "Yellow");$dev->putResponseProperties($pro);} elseif ($brightnessWhite == $brightnessYellow && $brightnessYellow != 0) {$pro = new AliGenie\DiscoveryPropertie("mode", "自然模式");$dev->putResponseProperties($pro);}$ext = new AliGenie\DiscoveryExtension();$dev->putResponseExtensions($ext);$ret->payload->putResponseDevices($dev);break;}case 'gateway_switch': {$dev = new AliGenie\DiscoveryDevice();$dev->putResponseDeviceInfo($devElement->entity_id, "插排", device_id_to_devicetype($devElement->entity_id), "https://www.rtplay.cn/icon/cz.png");$dev->actions = array("TurnOn","TurnOff","QueryPowerState","Query");foreach ($devElement->properties as $propertie) {$pro = new AliGenie\DiscoveryPropertie($propertie->name, $propertie->value);$dev->putResponseProperties($pro);}$ext = new AliGenie\DiscoveryExtension();$dev->putResponseExtensions($ext);$ret->payload->putResponseDevices($dev);break;}}}$retJson = json_encode($ret);error_log('retJson-->'.$retJson);error_log('----device_discovery out----');return $retJson;
}function device_status($obj, $messageId)
{error_log('----device_status in----');global $sqlFileName;$deviceId = $obj->payload->deviceId;$action = '';$deviceType = check_type_from_id($deviceId);switch ($obj->header->name) {case 'QueryPowerState':$action = 'powerstate';break;case 'QueryColor':$action = 'color';break;case "QueryTemperature":$action = "temperature";break;case "QueryWindspeed":$action = "windspeed";break;case "QueryBrightness":$action = "brightness";break;case "QueryFog":$action = "fog";break;case "QueryHumidity":$action = "humidity";break;case "QueryPm25":$action = "pm25";break;case "QueryChannel":$action = "channel";break;case "QueryNumber":$action = "number";break;case "QueryDirection":$action = "direction";break;case "QueryAngle":$action = "angle";break;case "QueryAnion":$action = "anion";break;case "QueryEffluent":$action = "effluent";break;case "QueryMode":$action = "mode";break;case "QueryLeftTime":$action = "lefttime";break;case "QueryRemoteStatus":$action = "remotestatus";break;case "QueryOnlineState":$action = "onlinestate";break;case "QueryColorTemperature":$action = "colorTemperature";break;case "Query":$action = "all";break;default:$action = "";}    if ($action == "" || $deviceType == "") {$ret = new AliGenie\QueryResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseDeviceId($deviceId);$ret->payload->putResponseError("DEVICE_NOT_SUPPORT_FUNCTION");$retJson = json_encode($ret);return $retJson;}$properties = array();$findDevice = false;$queryValue = '';if (($txtRes = fopen($sqlFileName, "r")) === false) {error_log('----get_control fopen failed----');$ret = new AliGenie\QueryResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseDeviceId($deviceId);$ret->payload->putResponseError("SERVICE_ERROR", "CANNOT_OPEN");$retJson = json_encode($ret);return $retJson;}$str = fread($txtRes, filesize($sqlFileName));$sqlObj = json_decode($str);$devArray = $sqlObj->dev_array;$ret = new AliGenie\QueryResponse();$ret->header->putResponseName($obj->header->name);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseDeviceId($deviceId);foreach ($devArray as $data) {error_log('entity_id-->'.$data->entity_id);error_log('device_type-->'.$data->device_type);if ($data->entity_id == $deviceId) {$findDevice = true;switch ($data->device_type) {case 'ceiling_lamp': {$brightnessWhite = '';$brightnessYellow = '';foreach ($data->properties as $element) {error_log('name-->'.$element->name);error_log('value-->'.$element->value);if ($element->name =='brightness_w') {$brightnessWhite = $element->value;} elseif ($element->name =='brightness_y') {$brightnessYellow = $element->value;} else {$properties[$element->name] = $element->value;}}$properties['brightness'] = ($brightnessWhite>$brightnessYellow)?$brightnessWhite:$brightnessYellow;if ($brightnessWhite != 0 && $brightnessYellow == 0) {$properties['color'] = 'White';} elseif ($brightnessWhite == 0 && $brightnessYellow != 0) {$properties['color'] = 'Yellow';} elseif ($brightnessWhite == $brightnessYellow && $brightnessYellow != 0) {$properties['mode'] = '自然模式';}break;}}}}fclose($txtRes);if ($action != 'all') {$queryValue = $properties[$obj->header->name];array_splice($properties, 0);$properties[$obj->header->name] = $queryValue;}foreach ($properties as $name => $value) {$pro = new AliGenie\QueryPropertie($name, $value);$ret->properties[] = $pro;}if ($findDevice == false) {$ret = new AliGenie\QueryResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseDeviceId($deviceId);$ret->payload->putResponseError("DEVICE_IS_NOT_EXIST");$retJson = json_encode($ret);return $retJson;} else if ($queryValue == '' && $action != 'all') {$ret = new AliGenie\QueryResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseDeviceId($deviceId);$ret->payload->putResponseError("INVALIDATE_PARAMS");$retJson = json_encode($ret);return $retJson;}$retJson = json_encode($ret);error_log('----device_status out----');return $retJson;
}function device_control($obj, $messageId)
{error_log('----device_control in----');global $sqlFileName;$deviceId = $obj->payload->deviceId;$action = '';$deviceType = '';//Customize device type$deviceType = device_id_to_type($deviceId);error_log("deviceType-->".$deviceType);$action = get_control_action($obj->header->name);error_log("action-->".$action);if ($action == "" || $deviceType == "") {error_log('----get_control_action failed----');$ret = new AliGenie\ControlResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseError("SERVICE_ERROR", "action or device not support,name:".$obj->header->name." device:".substr($deviceId,0,stripos($deviceId,".")));$retJson = json_encode($ret);return $retJson;}$validArray = array ("deviceId" => $deviceId,"deviceType" => $deviceType,"actionName" => $obj->header->name,"action" => $action,"attribute" => $obj->payload->attribute,"value" => $obj->payload->value);$checkResult = control_checker($validArray);if ($checkResult != 'succeed') {error_log('----control_checker failed----');$ret = new AliGenie\ControlResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseError("DEVICE_NOT_SUPPORT_FUNCTION");$retJson = json_encode($ret);return $retJson;}//-----------------------------------if (($txtRes = fopen($sqlFileName, "r+")) === false) {error_log('----get_control fopen failed----');$ret = new AliGenie\ControlResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseError("SERVICE_ERROR", "CANNOT_OPEN");$retJson = json_encode($ret);return $retJson;}$str = fread($txtRes, filesize($sqlFileName));error_log("str-->".$str);$sqlObj = json_decode($str);//error_log("sqlObj-->".print_r($sqlObj, true));$ret = new AliGenie\ControlResponse();$ret->header->putResponseMessageId($messageId);$ret->header->putResponseName($obj->header->name);$ret->payload->putResponseDeviceId($obj->payload->deviceId);foreach ($sqlObj->dev_array as $devElement) {error_log('entity_id-->'.$devElement->entity_id);if ($devElement->entity_id == $validArray['deviceId']) {$ret->payload->putResponseDeviceId($devElement->entity_id);switch ($devElement->device_type) {case 'ceiling_lamp': {switch ($validArray['action']) {case 'turn_on': {foreach ($devElement->properties as $propertie) {error_log('name-->'.$propertie->name);if ($propertie->name == "powerstate") {$propertie->value = "on";break;}}break;}case 'turn_off': {foreach ($devElement->properties as $propertie) {error_log('name-->'.$propertie->name);if ($propertie->name == "powerstate") {$propertie->value = "off";break;}}break;}case 'bright_set': {foreach ($devElement->properties as $propertie) {error_log('name-->'.$propertie->name);if ($propertie->name == "brightness_w" && $propertie->value != 0) {$propertie->value = $validArray['value'];} else if ($propertie->name == "brightness_y" && $propertie->value != 0) {$propertie->value = $validArray['value'];}}break;}case 'bright_up': {foreach ($devElement->properties as $propertie) {error_log('name-->'.$propertie->name);if ($propertie->name == "brightness_w" && $propertie->value != 0) {$propertie->value += $validArray['value'];if ($propertie->value > 100) {$propertie->value = 100;}} else if ($propertie->name == "brightness_y" && $propertie->value != 0) {$propertie->value += $validArray['value'];if ($propertie->value > 100) {$propertie->value = 100;}}if ($propertie->name == "powerstate") {$propertie->value = "on";break;}}break;}case 'bright_down': {$brightnessWhite = '10';$brightnessYellow = '10';foreach ($devElement->properties as $propertie) {error_log('name-->'.$propertie->name);if ($propertie->name == "brightness_w" && $propertie->value != 0) {$propertie->value -= $validArray['value'];if ($propertie->value < 0) {$propertie->value = 0;}$brightnessWhite = $propertie->value;} else if ($propertie->name == "brightness_y" && $propertie->value != 0) {$propertie->value -= $validArray['value'];if ($propertie->value < 0) {$propertie->value = 0;}$brightnessYellow = $propertie->value;}if ($brightnessWhite == 0 && $brightnessYellow == 0) {foreach ($devElement->properties as $propertie) {error_log('name-->'.$propertie->name);if ($propertie->name == "powerstate") {$propertie->value = "off";break;}}}}break;}case 'mode_set': {$brightnessWhite = '0';$brightnessYellow = '0';foreach ($devElement->properties as $propertie) {error_log('name-->'.$propertie->name);if ($propertie->name == "brightness_w") {$brightnessWhite = $propertie->value;} else if ($propertie->name == "brightness_y") {$brightnessYellow = $propertie->value;}}$brightness = ($brightnessWhite>$brightnessYellow)?$brightnessWhite:$brightnessYellow;foreach ($devElement->properties as $propertie) {error_log('name-->'.$propertie->name);if ($propertie->name == "brightness_w" || $propertie->name == "brightness_y") {$propertie->value = $brightness;}}break;}case 'color_set': {if ($validArray['value'] == 'White') {foreach ($devElement->properties as $propertie) {error_log('name-->'.$propertie->name);if ($propertie->name == "brightness_w") {$propertie->value = 100;} else if ($propertie->name == "brightness_y") {$propertie->value = 0;}}} else if ($validArray['value'] == 'Yellow') {foreach ($devElement->properties as $propertie) {error_log('name-->'.$propertie->name);if ($propertie->name == "brightness_w") {$propertie->value = 0;} else if ($propertie->name == "brightness_y") {$propertie->value = 100;}}}break;}}break;}}}}$jsonData = json_encode($sqlObj);error_log('jsonData-->'.$jsonData);fclose($txtRes);if (($txtRes = fopen($sqlFileName, "w+")) === false) {error_log('----get_control fopen failed----');$ret = new AliGenie\ControlResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseError("SERVICE_ERROR", "CANNOT_OPEN");$retJson = json_encode($ret);return $retJson;}if (!fwrite($txtRes, $jsonData)) {fclose($txtRes);error_log('----get_control fwrite failed----');$ret = new AliGenie\ControlResponse(true);$ret->header->putResponseMessageId($messageId);$ret->payload->putResponseError("SERVICE_ERROR", "CANNOT_WRITE");$retJson = json_encode($ret);return $retJson;}fclose($txtRes);$retJson = json_encode($ret);error_log('----device_control out----');return $retJson;
}function check_type_from_id($deviceId)
{$deviceType = device_id_to_type($deviceId);if ($deviceType != 'ceiling_lamp' && $deviceType != 'gateway_switch') {$deviceType = "";}return $deviceType;
}function get_control_action($controlName)
{$action = "";switch ($controlName) {case 'TurnOn':$action = 'turn_on';break;case 'TurnOff':$action = 'turn_off';break;case 'SelectChannel':$action = 'channel_set';break;case 'AdjustUpChannel':$action = 'channel_up';break;case 'AdjustDownChannel':$action = 'channel_down';break;case 'AdjustUpVolume':$action = 'volume_up';break;case 'AdjustDownVolume':$action = 'volume_down';break;case 'SetVolume':$action = 'volume_set';break;case 'SetMute':$action = 'mute_set';break;case 'CancelMute':$action = 'mute_cancel';break;case 'Play':$action = 'play';break;case 'Pause':$action = 'pause';break;case 'Continue':$action = 'continue';break;case 'Next':$action = 'next';break;case 'Previous':$action = 'previous';break;case 'SetBrightness':$action = 'bright_set';break;case 'AdjustUpBrightness':$action = 'bright_up';break;case 'AdjustDownBrightness':$action = 'bright_down';break;case 'SetTemperature':$action = 'temperature_set';break;case 'AdjustUpTemperature':$action = 'temperature_up';break;case 'AdjustDownTemperature':$action = 'temperature_down';break;case 'SetWindSpeed':$action = 'windspeed_set';break;case 'AdjustUpWindSpeed':$action = 'WindSpeed_up';break;case 'AdjustDownWindSpeed':$action = 'WindSpeed_down';break;case 'SetMode':$action = 'mode_set';break;case 'SetColor':$action = 'color_set';break;case 'OpenFunction':$action = 'function_open';break;case 'CloseFunction':$action = 'function_close';break;case 'Cancel':$action = 'cancel';break;case 'CancelMode':$action = 'mode_cancel';break;default:break;}return $action;
}function device_id_to_type($deviceId)
{$deviceType = "";$deviceArray = [];$deviceArray = explode('.', $deviceId);$deviceType = $deviceArray[1];return $deviceType;
}function device_id_to_devicetype($deviceId)
{$deviceType = "";$deviceArray = [];$deviceArray = explode('.', $deviceId);$deviceType = $deviceArray[0];return $deviceType;
}function control_checker($arrayData)
{error_log('----control_checker in----');if (empty($arrayData)) {return "jsonData null";}switch ($arrayData['deviceType']) {case 'ceiling_lamp': {if ($arrayData['attribute'] == 'powerstate' || $arrayData['attribute'] == 'brightnessStep' || $arrayData['attribute'] == 'brightness' ) {//Full Support Request Actionreturn 'succeed';}if ($arrayData['attribute'] == 'mode' && $arrayData['value'] == '自然模式') {return 'succeed';}if ($arrayData['attribute'] == 'color' && ($arrayData['value'] == 'White' || $arrayData['value'] == 'Yellow')) {return 'succeed';}return 'failed';}break;case 'gateway_switch': {}break;default:break;}error_log('----control_checker out----');
}?>

(11)香橙派+apache2与php+天猫精灵=自建平台语音支持--天猫精灵对接6相关推荐

  1. (8)香橙派+apache2与php+天猫精灵=自建平台语音支持--天猫精灵对接3

    导航链接 (1)香橙派+apache2与php+天猫精灵=自建平台语音支持--前言 (2)香橙派+apache2与php+天猫精灵=自建平台语音支持--香橙派操作系统安装 (3)香橙派+apache2 ...

  2. (6)香橙派+apache2与php+天猫精灵=自建平台语音支持--天猫精灵对接1

    导航链接 (1)香橙派+apache2与php+天猫精灵=自建平台语音支持--前言 (2)香橙派+apache2与php+天猫精灵=自建平台语音支持--香橙派操作系统安装 (3)香橙派+apache2 ...

  3. (13)香橙派+apache2与php+天猫精灵=自建平台语音支持--duerOS对接

    这篇主要总结一下小度音箱的对接方法,答题流程与天猫精灵一样,只是php稍有不同,我也会把php源码上传,需要的可以下载,流程与天猫精灵的php文件大体相同,只是其中的细节稍有差异. php文件链接:h ...

  4. 【阿里云生活物联网架构师专题 ②】esp8266 sdk 直连接入阿里云物联网平台,实现天猫精灵找队友零配网功能和语音控制;

    本系列博客学习由非官方人员 半颗心脏 潜心所力所写,仅仅做个人技术交流分享,不做任何商业用途.如有不对之处,请留言,本人及时更改. 1.esp32接入阿里云物联网平台,实现天猫精灵语音控制: 2.es ...

  5. 【阿里云生活物联网架构师专题 ①】esp32 sdk 直连接入阿里云物联网平台,实现天猫精灵语音控制;

    本系列博客学习由非官方人员 半颗心脏 潜心所力所写,仅仅做个人技术交流分享,不做任何商业用途.如有不对之处,请留言,本人及时更改. 1.esp32接入阿里云物联网平台,实现天猫精灵语音控制: 2.es ...

  6. 【香橙派4B】1、重刷系统

    目录 准备材料 准备软件 准备系统镜像文件 下载镜像 解压镜像包 烧录镜像到SD卡 格式化SD卡 烧录镜像 SD卡烧录镜像到香橙派4B 买回来的香橙派4B,刚上电是安卓的系统,无法进行开发,所以需要进 ...

  7. 全志H616方案香橙派Zero2开发板Linux系统设置静态 IP 地址的方法

    注意: 1)请不要通过修改/etc/network/interfaces 配置文件的方式来设置静态 IP 地址 2)下文测试方法使用的是全志H616芯片的香橙派zero2开发板,如果使用的是香橙派其他 ...

  8. 全志H616芯片香橙派Orange Pi Zero2开发板26pinGPIO口测试

    香橙派Zero2开发板采用全志H616 四核 64位处理器,拥有512MB/1GB 内存可选,集成千兆以太 wiringOP 已适配 Orange Pi Zero 2 开发板,使用 wiringOP ...

  9. c# .net iot树莓派/香橙派用到物联网包Iot.Device.bindings 支持设备说明文档

    c# .net iot树莓派(进口,贵)/香橙派(国产,功能相同,性价比高)用到物联网包Iot.Device.bindings 支持设备说明文档 我们c# .net iot开发树莓派/香橙派都需要用到 ...

最新文章

  1. 5、Scala模式匹配
  2. 《算法基础》——2.3 求幂运算
  3. python多线程执行其他模块的文件_python并发编程--进程线程--其他模块-从菜鸟到老鸟(三)...
  4. cenotos 卸载mysql_CentOS 6.2编译安装Nginx1.0.12+MySQL5.5.21+PHP5.3.10 | 系统运维
  5. Putty(菩提)远程连接服务器教程
  6. LintCode 1690. 朋友推荐(二分插入)
  7. android 虚拟wifi定位,基于Android手机的WiFi定位系统设计
  8. mapgis6.7破解版|mapgis6.7破解版客户端(附安装教程)下载
  9. 木木早教机器人说明书_机器人操作说明VS小孩使用指南
  10. checksum命令 linux_Linux命令大全完整版
  11. 分段点处导数怎么求,导数和导函数的极限有关系吗?
  12. 2013年第四届C B组蓝桥杯省赛真题
  13. html+js 调用摄像头识别二维码
  14. 我来侃手机--连载二之四十岁的女人,风韵犹存
  15. 在百度Create 2021大会聆听李彦宏,王海峰“论道”AI
  16. 直接插入排序顺序结构
  17. DebugView Windows 7 不显示调试信息
  18. Lambda 表达式(一)-码住
  19. GPS的NMEA数据解析
  20. Webrtc Native C++在root模式下启用PulseAudio,音频采集替换为ALSA模式

热门文章

  1. 江苏省计算机二级ppt版本,江苏省计算机等级考试二级基础知识.ppt
  2. python小游戏毕设 滑雪小游戏设计与实现 (源码)
  3. R数据分析:临床预测模型中校准曲线和DCA曲线的意义与做法
  4. 百世退场,极兔加速,快递行业“内卷”何时休?
  5. 要关闭Windows是否需要shutdown.exe?
  6. 全球及中国前交叉韧带重建行业研究及十四五规划分析报告
  7. 网站接入支付功能完整教程
  8. 教育学计算机,计算机教育学简历范文
  9. Codeforces Round #853 (Div. 2) C. Serval and Toxel‘s Arrays【统计次数,算贡献】
  10. Win 10系统修复,DISM