...
- Determine which datapoints you want to use, and use the CMS Datapoint Browser widget to determine the datapoint path.
<device name>/<block name>/<block index>/<datapoint name> - Copy simplesensor.html and rename it to another name (for example, test.html).
- Copy scripts/simplesensor.js and rename it (for example, test.js).
- Change test.html to have the look and feel you want. You may need a different write function for each button.
- Change test.js:
- Change init1()
- Change the g_sWebpageTag to a unique web page tag.
- Change g_iMax_Age to specify if you are using on-demand polling (max_age).
- In most cases you will set g_iMax_Age=1 to support both on-demand and non-on-demand periodic polling.
- Build up the g_dpList for all the HTML elements in the test.html web page.
- Specify if the datapoint uses max age when you add the datapoint to g_dpList.
dpObj = new dpObject(datapoint_path, bUseMaxAge);
- Specify if the datapoint uses max age when you add the datapoint to g_dpList.
- Modify or add write functions.
- Modify or add validate function for any write data.
- Add any jsFunctions to process multiple datapoints for a single HTML element.
- Change init1()
...