Add new buttons to drop-down on NSPanel
When a user pulls down the menu in the top of the panel, add an option to reboot the panel. This might be required if the panel for some reason disconnects from the WiFi as it is the no longer possible to reboot it from NSPanelManager.
It would also be helpful to have a button to factory reset the panel in case someone changes WiFi name and/or password and it can no longer connect. Currently, if this happens a user needs to re-flash the firmware.
Oooh smart one! Like both of them. I will think about where to put it. Maybe we need a separate page for those kind of settings. Before I had a settings page If pressing the top right corner. Maybe can have a button there. Or a page that appears after a swipe but I think the swipe down right now should have those kind of basic smart home buttons only. We should discuss that page btw to see what would be of benefit for most people. Not sure the current one is optimal.
Okay, finally. I've updated the tft files. Both US and EU. There is now a settings page called 'settings' in the tft file. On that page there are two buttons. b_restart and b_factory which can be used to add this functionality as discussed above.
How does a user get to the settings page?
Good question! Forgot about that. In top right corner on first page there is a text box which has release event activated. I can add that to tftdefines as well. That textbox is prepared to show time in the future for users that want that. It's called 't_time'. But my plan was to use this right corner to get to the settings page.
Seems logical. Is there anything that indicates that.it.might be a button? Because I'm guessing that without setting a text in the component it's basically invisible?
Exactly. So yes it is basically invisible. I would rather not have like a settings icon on the first page to clutter the space. But I agree it can be hard for the user to know that it exists.
And maybe it is a better idea to have a small settings symbol on the dropdown page when we do that one. But as a start we could use the time text box.
Oh one last thing. I also added the same slider that we have on the scenes page to not by accident factory reset the panel. I'm thinking the same implementation as the scene page. Long press on the factory reset button and user will have to wait for the slider to reach 100%. The sliders name is the same as on the scene page.
Progress on this one is that there is a settings button on the Dropdown page now. There is also a settings page in the tft files with buttons for restart and factory reset. The page is work in progress. I'm thinking we do this when we decide to add the entire Dropdown buttons functionality.
This would be an optimal place to have a button for cleaning the screen? Implemented/fixing issue #65. I do not believe a "factory reset" button is needed any more as the panel will open the "NSPMPanel" access point when it can't connect to WiFi. But a reboot button would be helpful. Perhaps we could implemented the "Home" and "Sleep" buttons easily by just sending out a "1" on an MQTT topic for it to trigger in OpenHAB/Home Assistant and let the user to the rest? The alarm panel is a bit more finicky and we might be better off creating it's own issue for that, or simply start tracking development in issue #155.
I suggest we remove the "Settings" and replace it with "Reboot". That is simple enough to implement, as we implement the "Home" and "Sleep" buttons as easily as possible right now with a simple trigger for OpenHAB/Home Assistant to trigger on and then we incorporate this in the upcoming stable release? We then try to implement issue #155 in the next upcoming release?
For Home/Away mode, the user gets to select a switch entity that sets the "Home" or "Away" mode.
So this is what I'm thinking right now as dropdown page. Standard preset functions are:
- Home mode
- Sleep mode
- Alarm button - shows current state, if pressed page is changed to alarm code page so user can input code
- Clean screen - user is sent to clean screen page for x seconds. Probably an animation that will happen on clean screen page.
- Reboot button -
User should be able to use which ever of these preset functions whey want to use and where to place them. Right and left arrow exist in top to be able to change to a new page. X nr of extra pages can be configured for the user to add there own custom "short cut buttons", could be a light, a blind, a scene what ever. We could add a couple of extra icons in the font for the user to choose from when adding there custom buttons.
So there are tons of ways to think about buttons and how they should behave. I've been looking on the standard Android dropdown page where you turn on and off different functions, WIFI, bluetooth, flightmode and so on. The icon is colored when the function is on and the text is just ON. I think it is easy to copy that behavior. We have a Home and Sleep mode. Icon is colored when the mode is ON, text is ON. Icon is white when the mode is OFF, text is OFF. For things that don't turn ON or OFF the button will get brighter when pushed.
Alarm button is white when Disarmed but colored on the other modes: Armed Away, Armed Home, Armed Sleep
Just felt like adding the clean screen animation gif...