I’m currently working on enhancing my Goodnight Ubi app to integrate with various TTS devices and improve its user interface. In this process, I’ve decided to utilize pages for better organization and navigation. However, I’m encountering an issue where the app doesn’t function as expected after installation, despite the installation process completing without errors.
To diagnose the problem, I’ve simplified the app by replacing the pages with sections and found that the logic works perfectly. This indicates that the issue is likely related to the setup or structure of the pages rather than the core logic of the app. I’m now focusing on identifying what might be going wrong with the pages configuration.
Here’s a snippet of my current setup:
preferences
{
page(name: “pageMain”)
page(name: “pageMisc”)
page(name: “pageDoorWin”)
page(name: “pageLightsOn”)
page(name: “pageLightsOff”)
page(name: “pageRoutine”)
}
And here’s the pageMain function:
groovy
def pageMain() {
dynamicPage(name: “pageMain”, uninstall: true) {
section() {
paragraph “Goodnight SmartHome uses a virtual button to know when to run. You will name that later on.”
paragraph “To run the app, turn that device on either by manually tapping it in the mobile app,”
}
section(“Setup Menu”) {
href “pageMisc”, title:“Setup Button and Speaker”, description:“Tap to open”
href “pageDoorWin”, title:“Select Doors and Windows to check”, description:“Tap to open”
href “pageLightsOn”, title:“Optional: Select which Lights to turn on”, description:“Tap to open”
href “pageLightsOff”, title:“Optional: Select which Light to turn off”, description:“Tap to open”
href “pageRoutine”, title:“Optional: Choose a Routine to Run”, description:“Tap to open”
}
section(“Options”) {
label title:“Assign a name”, required:false
}
}
}
I’ve carefully reviewed the documentation and examples, but I’m still not identifying the root cause. Have others encountered similar issues when working with pages in SmartApps? Any insights or suggestions would be greatly appreciated!