自定义状态页
创建自定义状态页面
www目录中有一个名为'frontpage_example.html'的示例文件,该文件像你展示如何创建一个自己的状态页面
这个例子是为iPad设计的,来自BiWired (希望你不要介意,否则请告诉我,我会改掉)
Domoticz从1.1534版开始拥有此特性从,请保持使用最新版Domoticz。
你可以看看这个论坛,里面有很多特别棒的例子: http://domoticz.com/forum/viewforum.php?f=8
制作
The statuspage needs the roomnumber to grab the status of the devices you placed in that roomplan.
You have to create a room for this layout and place all devices you want to present on this page in this room.
But instead of creating different rooms, you could also use roomplan 0 (zero), which contains all devices present in your Domoticz installation. With a lot of devices in Domoticz, choosing this roomplan might cause Domoticz to be slow.
Now copy the frontpage_example.html to another file, for example frontpage.html
in this file change $.roomplan at the bottom and the domoticz url $.domoticzurl
you have to customize this page, and also customize the $.PageArray
idx is the Domoticz device index
value is the JSON-tag you would like to display. So for a switch it displays "Status": "Off"
, and you would like to display 'Off' so you use 'Status' (without quotes)
label is the HTML id of the destination
comment can be anything, i use it to specify the sensor name
The value can be found at http://127.0.0.1:8080/json.htm?type=devices&plan=0
. The output can be made better readable by pasting it into http://jsonviewer.stack.hu/
The final page can be found at http://IP_OF_YOUR_DOMOTICZ:8080/frontpage.html
If you want to view it from an external location i would recommend using a VPN to login to your home network.