...
To create this simple Web page (shown below) to view the IzoT Server CPU utilization, follow these steps:
...
To open the IzoT Device Browser Web page on the IzoT Server, enter the following address in a Web browser:
Code Block http://<IzoT Server IP Address>/dashboard/dpview.html
- Find the Server CPU utilization device name and datapoint name. You will need these in step 6. For example, the device name may be localhost and the datapoint name may be cpu_utilization.
- Click the Device Browser Export button to get a list of all devices or the Export Device button to get all the datapoints for a specific device.
- Create a new HTML file in your Web page editing tool or text editor and name it test1.html.
Copy the following code to test1.html:
Code Block <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=9 IE=10" /> <!-- IzoT Vision styles --> <link rel="stylesheet" href="/css/smoothness/jquery-ui-1.10.3.custom.css"> <link rel="stylesheet" type="text/css" href="/dashboard/styles/izotvisionobjects.css"> <!-- IzoT Vision JavaScript --> <script src="/dashboard/scripts/izotvisionobjects.js"></script> <script src="/js/vendor/jquery-1.9.1.js"></script> <script src="/js/vendor/jquery-ui-1.10.3.custom.js"></script> <script src="/dashboard/scripts/main.js"></script> </head> <body> <button type="button" style="float:right;margin-right:20px;background:none;border:none" onclick="loginServer('Log out')">Log out</button> <div style="left:200px; top:110px; z-index:1; position: absolute;"> <span data-izot-type="showvalue" data-izot-name="device_name/datapoint_name">---</span> </div> </body> </html>
- Replace device_name/datapoint_name with the CPU device name and datapoint name that you found in step 2. The device name and datapoint name are case sensitive so both the case and spelling must match.
- If you created the file on your computer, save the test1.html file and SFTP it to the IzoT Server dashboard directory at /home/debian/izot-sdk/www/user. If you created the file on your IzoT Server host, copy the test1.html file to the /home/debian/izot-sdk/www/user directory.
Open a Web browser and copy the following link, substituting the IP address with the IP address of your IzoT Router:
Code Block http://<IzoT Server IP Address>/user/test1.html
The CPU value changes every 10-15 seconds. Hover your mouse over the CPU value to make the Web page tooltip pop up and show you which datapoint is displayed by that IzoT Vision object.
...
Example 3 demonstrates how to update a datapoint from a Web page. The example uses two Image Swappers, one to control the state of the switch (switch image) and one to show the state of the switch (lamp image). This example requires that at least one device on the IzoT Server with state-setting-1 and state-1 datapoints.
...
To implement this example, follow these steps:
...