@toc
Platform=>>Device: 平台端可以通过ehome协议主动请求当前设备配置信息:
<?xml version="1.0" encoding="GB2312" ?>
<PPVSPMessage>
<Version>2.5</Version>
<Sequence>3564</Sequence>
<CommandType>REQUEST</CommandType>
<Method>PARAM</Method>
<Command>GETDEVICECONFIG</Command>
<Params>
<ConfigCmd>GetServerInfo</ConfigCmd>
<ConfigParam1>0</ConfigParam1>
<ConfigParam2>0</ConfigParam2>
<ConfigParam3>0</ConfigParam3>
<ConfigParam4>0</ConfigParam4>
</Params>
</PPVSPMessage>
Device =>>Platform: 设备回复当前基础信息:
<?xml version="1.0" encoding="GB2312"?>
<PPVSPMessage>
<Version>2.0</Version>
<Sequence>3564</Sequence>
<CommandType>RESPONSE</CommandType>
<WhichCommand>GETDEVICECONFIG</WhichCommand>
<Status>200</Status>
<Description>OK</Description>
<Params>
<ConfigXML>
<SERVERINFO>
<ChannelNumber>1</ChannelNumber>
<ChannelAmount>1</ChannelAmount>
<DVRType>31</DVRType>
<DiskNumber>0</DiskNumber>
<SerialNumber>DS-2CD4085F-A20151204CCCH560796072</SerialNumber>
<AlarmInPortNum>1</AlarmInPortNum>
<AlarmInAmount>1</AlarmInAmount>
<AlarmOutPortNum>1</AlarmOutPortNum>
<AlarmOutAmount>1</AlarmOutAmount>
<StartChannel>1</StartChannel>
<AudioChanNum>1</AudioChanNum>
<MaxDigitChannelNum>0</MaxDigitChannelNum>
<AudioEncType>2</AudioEncType>
<SmartType>0</SmartType>
<StartChan>1</StartChan>
<StartDChan>0</StartDChan>
</SERVERINFO>
</ConfigXML>
</Params>
</PPVSPMessage>
Device=>>Platform: 设备与平台之前通过心跳来定时进行保活。
<?xml version="1.0" encoding="GB2312"?>
<PPVSPMessage>
<Version>2.0</Version>
<Sequence>21911</Sequence>
<CommandType>REQUEST</CommandType>
<Command>KEEPALIVE</Command>
<Params>
<DeviceID>560796072</DeviceID>
</Params>
</PPVSPMessage>
Platform=>>Device: 平台在收到保活请求后进行回复。
<?xml version="1.0" encoding="GB2312" ?>
<PPVSPMessage>
<Version>2.5</Version>
<Sequence>21911</Sequence>
<CommandType>RESPONSE</CommandType>
<Method>CONTROL</Method>
<WhichCommand>KEEPALIVE</WhichCommand>
<Status>200</Status>
<Description>OK</Description>
</PPVSPMessage>
技术交流
基友之家: 开源ehome平台
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。