#Architecture and Function
<p>[TOC]</p>
<h1>1. Product Architecture</h1>
<h2>1.1 System Interaction Diagram</h2>
<p>![Kalay1.0 Standard Plus System Interaction](<a href="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=b69940fc792e6947138f75783fda6d42&file=file.png">https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=b69940fc792e6947138f75783fda6d42&file=file.png</a> "Kalay1.0 Standard Plus System Interaction")</p>
<p><strong>Service Description:</strong></p>
<ul>
<li>P2P Service: Provide P2P connection services;</li>
<li>Nebula Service: Provides Nebula connection and command transmission capabilities;</li>
<li>KOTA Service: Provides remote upgrade of device firmware;</li>
<li>KPNS Service: Provides device motion detection message push service;</li>
</ul>
<h2>1.2 Project Structure</h2>
<ul>
<li><strong>Viewer Layer</strong>:
<ul>
<li>KPNS Module (excluding server part code)</li>
<li>KOTA Module (excluding server part code)</li>
</ul></li>
<li><strong>KalayControl Layer</strong>:IOCmd + Nebula Cmd</li>
<li><strong>IOTCamera Framework</strong>:
<ul>
<li>Decode Module:Audio Encode + Audio Decode + Video Decode</li>
<li>P2P Connection Module:IOTC+AVAPI3</li>
<li>Nebula Connection Module:Nebula</li>
</ul></li>
</ul>
<p><code>Codec Module includes:Video Decoding + Audio Encoding(Speaking) + Audio Decoding(Listening)</code></p>
<p>![Kalay1.0 Standard Plus Project Structure](<a href="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=e626fb39cd66290e58c1e36b46cd8942&file=file.png">https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=e626fb39cd66290e58c1e36b46cd8942&file=file.png</a> "Kalay1.0 Standard Plus Project Structure")</p>
<p><strong>Android:</strong></p>
<ul>
<li>Developed based on Java language;</li>
<li>Run in Android Studio environment;</li>
<li>Provided in aar form;</li>
<li>v2.4.23.6 or above can support x86_64 operation.</li>
</ul>
<p><strong>IOS:</strong></p>
<ul>
<li>Developed based on Objective-C language;</li>
<li>Run in XCode environment;</li>
<li>Provided in the form of Framework;</li>
<li>v2.4.23.6 or above can support x86 operation.</li>
</ul>
<h1>2. User Flow</h1>
<h2>2.1 User Flow</h2>
<p>![Kalay1.0业务流程图](<a href="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=e884ce2e4c240144f9d6d69d3de9a26e&file=file.jpg">https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=e884ce2e4c240144f9d6d69d3de9a26e&file=file.jpg</a> "Kalay1.0业务流程图")</p>
<h1>3. Function Module</h1>
<h2>3.1 Total Function Module</h2>
<p>![设备列表](<a href="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=bd8d036a34beaf3a24c16433d6b2543e&file=file.png">https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=bd8d036a34beaf3a24c16433d6b2543e&file=file.png</a> "设备列表")
![添加设备](<a href="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=980ad74c28fc067efc9ea470ffc26d18&file=file.png">https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=980ad74c28fc067efc9ea470ffc26d18&file=file.png</a> "添加设备")</p>
<h2>3.2 Liveview Timing Diagram</h2>
<p>![LiveView流程](<a href="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=b51307ad70092548445172e4c1b6532f&file=file.png">https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=b51307ad70092548445172e4c1b6532f&file=file.png</a> "LiveView流程")</p>
<h2>3.3 Push Notification Timing Diagram</h2>
<p>![Push流程](<a href="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=9fde461a2db8c6f430922565523fc774&file=file.png">https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=9fde461a2db8c6f430922565523fc774&file=file.png</a> "Push流程")</p>
<h2>3.4 Function List</h2>
<table>
<thead>
<tr>
<th>Module</th>
<th>Main Function</th>
<th>Sub Function</th>
<th>V2.4.23</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Home</td>
<td>Device List</td>
<td>Photo</td>
<td>v</td>
<td>Enter the phone's local album</td>
</tr>
<tr>
<td>Home</td>
<td>Device List</td>
<td>Switch List</td>
<td>v</td>
<td>Switch to 4 Segments Page</td>
</tr>
<tr>
<td>Home</td>
<td>Device List</td>
<td>Device Thumbnail</td>
<td>v</td>
<td>Save the last frame of the real-time screen to the device list display</td>
</tr>
<tr>
<td>Home</td>
<td>Device List</td>
<td>Shared UID</td>
<td>v</td>
<td>Generate a device UID QR code (not meant the sharing devices through accounts)</td>
</tr>
<tr>
<td>Home</td>
<td>Device List</td>
<td>Device Settings</td>
<td>v</td>
<td>Turn to device settings page</td>
</tr>
<tr>
<td>Home</td>
<td>Device List</td>
<td>Delete Device</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Home</td>
<td>4 Segments</td>
<td>Device Status</td>
<td>v</td>
<td>1.Online 2.Connecting 3.Offline 4.Password Error</td>
</tr>
<tr>
<td>Home</td>
<td>4 Segments</td>
<td>Channel Switch</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Home</td>
<td>4 Segments</td>
<td>Waterfall Display</td>
<td>v</td>
<td>Decoding livelivew of added channel</td>
</tr>
<tr>
<td>Home</td>
<td>4 Segments</td>
<td>Full Screen</td>
<td>v</td>
<td>View the liveview of the vertical screen status of the current channel</td>
</tr>
<tr>
<td>Home</td>
<td>Side Menu</td>
<td>About</td>
<td>v</td>
<td>1.App Version 2.IOTC Version 3.AVAPI Version</td>
</tr>
<tr>
<td>Home</td>
<td>Side Menu</td>
<td>User Agreement</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Home</td>
<td>Side Menu</td>
<td>Privacy Polity</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Add Device</td>
<td>Not Been Connected to the Router</td>
<td>Scan WiFi QRCode</td>
<td>v</td>
<td>The mobile phone generates a WiFi QR code for the device to scan and add</td>
</tr>
<tr>
<td>Add Device</td>
<td>Not Been Connected to the Router</td>
<td>AP Configuration</td>
<td>v</td>
<td>Connect the mobile phone to the AP hotspot of the device to add the distribution network</td>
</tr>
<tr>
<td>Add Device</td>
<td>Been Connected to the Router</td>
<td>Lan Search</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Add Device</td>
<td>Been Connected to the Router</td>
<td>Scan UID QRCode</td>
<td>v</td>
<td>Includes the function of select the QR code from phone's local photo album</td>
</tr>
<tr>
<td>Add Device</td>
<td>Been Connected to the Router</td>
<td>User Manual</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Add Device</td>
<td>Ahthkey</td>
<td>Use Authkey</td>
<td>v</td>
<td>Create an IOTC connection channel through the authkey verification method</td>
</tr>
<tr>
<td>Add Device</td>
<td>Device Token</td>
<td>Use Device Token</td>
<td>v</td>
<td>Switch to the token method to add devices, and the password verification method will be turned off</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Device Status</td>
<td>v</td>
<td>1.Online 2.Connecting 3.Offline 4.Password Error</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Switch Channel</td>
<td>v</td>
<td>Switch to another channel of the device to play</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Liveview</td>
<td>v</td>
<td>Support H.264 SW/HW、H.265 SW/HW;up to 2K resolution</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Security Password Check</td>
<td>v</td>
<td>Checks whether the password complies with the rules</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Debug Mode</td>
<td>v</td>
<td>QVGA /Connection Mode /NAT /Decode Method /Packet Drop Rate /FPS /bps /Online Number /SID /CMD</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Speaking</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Listening</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Two-way Audio</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Local Recording</td>
<td>v</td>
<td>Save to the local phone</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Snapshot</td>
<td>v</td>
<td>Save to the local phone</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Video Quality</td>
<td>v</td>
<td>1.HD 2.SD 3.Fluency</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Zoom in/out</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Mirror</td>
<td>v</td>
<td>Flip horizontally 180°</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Flip</td>
<td>v</td>
<td>Flip vertically 180°</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>PTZ Control</td>
<td>v</td>
<td>1.Control panel steering 2.Slide screen steering</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Filter</td>
<td>v</td>
<td>1.Original 2.Whitening 3.Black and White</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Screen Switch</td>
<td>v</td>
<td>Click the button to switch the horizontal screen, return to switch the vertical screen</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Play Preset Record</td>
<td>v</td>
<td>Click the button to send command to the device to play the preset record set</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Video Call</td>
<td>v</td>
<td>Click the button to initiate a two-way video call from the app to the device end</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Encode Resolution</td>
<td>v</td>
<td>Click the button to switch the resolution of the App encoding: 1. SD 2. Fluency</td>
</tr>
<tr>
<td>Liveview</td>
<td>Liveview</td>
<td>Switch Camera</td>
<td>v</td>
<td>Click the button to switch the front and rear cameras encoded on the App side</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Change Device Name</td>
<td>v</td>
<td>Change device's name</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Change Device Password</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Wi-Fi Setting</td>
<td>v</td>
<td>Perform wifi network configuration</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Recording Mode</td>
<td>v</td>
<td>1.Off 2.Full Time 3.Motion Detection</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Event Settings</td>
<td>v</td>
<td>1. Detection switch: on/off 2. Detection sensitivity: low/middle/high/highest</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Debug Mode</td>
<td>v</td>
<td>On/Off</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Sync Time</td>
<td>v</td>
<td>Synchronize phone time to device</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Notification</td>
<td>v</td>
<td>Enable/Disable Receive device detection push notifications</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>SD Card Information</td>
<td>v</td>
<td>1. Free space 2. All space 3. Format SD card</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Humanoid Detection</td>
<td>v</td>
<td>Enable/disable the humanoid detection push function of the device</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Night Vision</td>
<td>v</td>
<td>Turn on/off the night vision function of the device</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Summer Time</td>
<td>v</td>
<td>On/Off Device summer time function</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Device Information</td>
<td>v</td>
<td>1.Modle 2.Product 3.Manufacturer 4.Current Firmware Version 5.Latest Firmware Version</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>OTA Upgrade</td>
<td>v</td>
<td>Remote firmware upgrade</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Delete Device</td>
<td>v</td>
<td></td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Voice Changer</td>
<td>v</td>
<td>Change the voice of the speaking: Original Voice /Voice1 /Voice2 /Voice3</td>
</tr>
<tr>
<td>Settings</td>
<td>Device Settings</td>
<td>Preset Record</td>
<td>v</td>
<td>Record voice locally, and send the checked preset record to the device for playback</td>
</tr>
<tr>
<td>SD Card Events</td>
<td>Event List</td>
<td>Event List</td>
<td>v</td>
<td>1.All 2.Full Time 3.Motion Detection</td>
</tr>
<tr>
<td>SD Card Events</td>
<td>Event List</td>
<td>Search Event</td>
<td>v</td>
<td>1. Within half a day 2. Within one day 3. Custom</td>
</tr>
<tr>
<td>SD Card Events</td>
<td>Event List</td>
<td>Play Seek</td>
<td>v</td>
<td>Add cmd docking interface</td>
</tr>
<tr>
<td>SD Card Events</td>
<td>Event List</td>
<td>Download SDcard Event</td>
<td>v</td>
<td>Click the button to download SD card events to the phone sandbox/album path</td>
</tr>
<tr>
<td>Others</td>
<td>Push Notification(Android)</td>
<td>China Mainland</td>
<td>v</td>
<td>Push Channel: 1. Jpush(Free) 2. huawei/vivo/oppo/meizu/xiaomi; Push Type: 1. Motion Detection 2. Call Ring 3.Video Call</td>
</tr>
<tr>
<td>Others</td>
<td>Push Notification(Android)</td>
<td>Non-Mainland China</td>
<td>v</td>
<td>Push Channel: FCM; Push Type: 1. Motion Detection 2. Call Ring 3.Video Call</td>
</tr>
<tr>
<td>Others</td>
<td>Push Notification(iOS)</td>
<td>China Mainland</td>
<td>v</td>
<td>Push Channel: APNS; Push Type: 1. Motion Detection 2. Call Ring 3.Video Call</td>
</tr>
<tr>
<td>Others</td>
<td>Push Notification(iOS)</td>
<td>Non-Mainland China</td>
<td>v</td>
<td>Push Channel: APNS; Push Type: 1. Motion Detection 2. Call Ring 3.Video Call</td>
</tr>
<tr>
<td>Others</td>
<td>Wake Up</td>
<td>Low Power Wake</td>
<td>v</td>
<td>Auto Wake up</td>
</tr>
</tbody>
</table>