[mh] How to build a web-based keypad in IA7
Jeff Siddall via misterhouse-users <[email protected]> Tue, 19 Apr 2022 17:17:24 -0400
| Newsgroups | gmane.comp.misc.misterhouse.user |
|---|---|
| Message-ID | <[email protected]> |
I would like to build a web interface to implement the function of a hardware keypad (ex: https://m.media-amazon.com/images/I/71jaCjRVlxL._AC_SL1500_.jpg) on a small touchscreen with a web browser like an old mobile phone. As such I want a totally clean UI (no banners, footers, etc.) with a specific set of buttons that have a state indication and will toggle when the button is pressed (ex: green when on like the default UI). Some way to make a button set a specific state for an item would be handy too (i.e.: like scenes) but I could use a 2 state item and some user code that automatically turns itself off. Unfortunately, by default, IA7 pops open a sub-control that lets you select the state instead of directly controlling it, which isn't great on a small touchscreen. I did some digging on this but didn't get very far given my limited knowledge on how the whole web interface works. I had a look here: https://github.com/hollie/misterhouse/wiki/Customising-Web and here: https://github.com/hollie/misterhouse/wiki/Modern-Web-Interface---IA7 but neither really seemed to cover what I am trying to do. I did figure out how to make a child menu with a custom collections.json, but that is a pretty small step in the whole task. Here is where I am at: Problem 1: how to include some user defined pages into IA7? I tried setting html_alias2_ia7 to the location of my HTML files, but it appears it only looks for in the alias location if the file already exists in the system ia7 folder. Is there some other way to inject new user files into the MH web server without removing all the default stuff? Problem 2: how to implement a toggle button? I did some reading from a mailing list posts from many years back titled "Custom IA7 pages with direct control" and while I followed some of it, when I built the button it didn't actually do anything when clicked, and I really don't know where to go next. Maybe that isn't even what I need. Problem 3: how to build/arrange buttons that fit the format of the screen I want to display the page on If anyone has some tips on how to do this and could point me in the right direction I would appreciate it. When I am done I could add some info to the wiki pages about it in case others are interested. ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users