CustomStatusPage

From Domoticz
Jump to navigation Jump to search

From stable version 2023.2 the access is restricted to at least user with viewer rights. So accessing this page requires the same login as your normal Domoticz web interface!

The normal user login rules are applicable, see page User Management

Creating a Custom status page

In the www/views folder there is an example file called 'frontpage_example.html' that shows you how you could create a custom status page also named Front page.
Have a look at this forum topic for some almost ready to use examples: https://domoticz.com/forum/viewtopic.php?f=8&t=4698

Instructions

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. You can also place the copy in the www folder directly for easy access.
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 (replace the IP number with the Domoticz IP, of course). The output can be made better readable by pasting it into https://jsonformatter.org or https://codebeautify.org/jsonviewer

The final page can be found at http://IP_OF_YOUR_DOMOTICZ:8080/frontpage.html or http://IP_OF_YOUR_DOMOTICZ:8080/views/frontpage.html
If you want to view it from an external location i would recommend using a VPN to login to your home network.

See also