Skip to content
Stephan Mühl edited this page Feb 26, 2023 · 27 revisions

This belongs to the current beta version of Smartpusher (currently v2.00)

During beta you need to delete the config.json before an beta update!

All features from stable also belongs to this beta!

Password for "Smartpusher" AP: 12345678

Please note:
every change to the settings via webinterface needs to be saved with "Save configuration" followed by "Restart ESP"

Create CustomPages

  • navigate to [Smartpusher-IP]/edit
  • Create a new file pages.json add a array of pages (max 4) e.g.:
{  
  "screen1": [  
    {"t":"text", "x": 10, "y": 10, "s":16, "header": "TestValue 1" },  
    {"t":"text", "x": 10, "y": 30, "s":16, "wattage": "500" }
  ],  
 "screen2": [  
    { "t":"image","x": 10, "y": 10, "i":"test"},  
    { "t": "bar", "x": 10, "y": 30, "v":50 }
  ]  
}
  • screen1 & screen2 are the name of the pages, you can name it as you like.

  • The key "t" defines the type of the element. "text", "image", "bar" is possible here:

text

  • Each text-element needs at least the keys "x" and "y" wich defines the position of the text.
  • The key "s" sets the textsize and is optional (accepted values are 10,16 or 24).
  • The next key represents your actual text. You can use any keyname as you like. The keyname must be unique per page and is necessary to change its value via MQTT. The given value in the json is the standard text wich will be displayed until you replace it via MQTT.

image

  • Each image-element need the keys "x", "y", and "i" wich defines the name of your image.

bar

  • Each bar-element need the keys "x", "y", "w", "h", and "v" wich defines the progress of the bar (0-100).

Save your file and restart Smartpusher, dont forget to enable Use customized pages in the general menu.

If you want to change a value via MQTT you just need to send your text to the following topic structure: [PREFIX]/custompage/[PAGENAME]/[VARIABLENAME] e.g. Smartpusher/custompage/screen1/value

New MQTT commands

Switching to page

Topic
[PREFIX]/page/
Payload
Name of the page ("time", "weather" or the name of your custompage )

Enable/Disable scrolling

Topic
[PREFIX]/scrolling/
Payload
"true"/"false"

Clone this wiki locally