Page 1 of 1

Alternative web views (no edit functionality) or direct links to web parts

Posted: Fri Jan 02, 2015 8:49 am
by Stoche
I have fiddled a bit with OpenNetHome and I like it a lot. Lightweight and easy to get going. The only thing I miss is a limited view for device control panels (like openly available tablets for managing the light). A view without access to edit functions like in the usual web view. Did I miss something obvious or is the idea allways to have full access? For my use it would be enough to just drop the menu bar or even better to a single web part like a room etc. I tried to create a separate web and change the config file but my own limited understanding of the Jetty setup got in the way. :(

Happy for any suggestions or tips...

Re: Alternative web views (no edit functionality) or direct links to web parts

Posted: Fri Jan 02, 2015 11:00 am
by stefangsbb
Interesting question. I have been thinking about the same thing, but I have not really had the need yet, and no one have asked before. It is not currently possible, but it would be quite easy to add a setting to the HomeGUI-Item that it is in non edit mode. Then you could create a separate HomeGUI-Item with limited rights under another path, like 192.1.1.15:8020/public, with a separate start page (you specify the start page with the "Location"-attribute of the HomeGUI-Item). How much should be hidden in that mode? Only the edit-button, or the "Create/Edit"-menu button as well? Or should the whole menu bar be removed?

Re: Alternative web views (no edit functionality) or direct links to web parts

Posted: Fri Jan 02, 2015 11:23 am
by Nasty76
This is good idea, i think good is disabling all feature where u can edit , example kids cant mess system via web interface , only control lights wich are in web view.

Re: Alternative web views (no edit functionality) or direct links to web parts

Posted: Fri Jan 02, 2015 11:54 am
by Stoche
Well, for my personal need, loosing the whole bar would be the best. I guess if one needs a specific link it can just be added with in the GUI like the toggle views in "plan".

Re: Alternative web views (no edit functionality) or direct links to web parts

Posted: Sun Jan 04, 2015 6:50 am
by stefangsbb
So, I actually implemented the read only option in the HomeGUI, so there is now a "AllowEdit"-check-box there. If you want a read only view, you create a new HomeGUI-Item with a new LocalUrl, for example /public (don't forget to change this).

If you don't specify a Location, a new location will be created which looks like the original one which you can then edit. You can also select an existing room for example as Location, and then only the content of that room will be shown.

If you want the page to be really minimalistic, you can also set LeftBanner and RightBanner to a single character ("x" for example), then these banners will also be hidden.

This is now in the nightly build, try it out and see what you think.

Re: Alternative web views (no edit functionality) or direct links to web parts

Posted: Fri Jan 09, 2015 6:18 pm
by Stoche
It covers what I suggested and works perfect. Really nice, Stefan!

Re: Alternative web views (no edit functionality) or direct links to web parts

Posted: Sat Apr 16, 2016 1:13 pm
by Jonas
How to go back to edit mode?

Re: Alternative web views (no edit functionality) or direct links to web parts

Posted: Sat Apr 16, 2016 8:50 pm
by stefangsbb
Well, if you followed the advice and created a separate HomeGUI-Item where you disabled edit, you go via the original URL (and original HomeGUI-Item) and enable the edit again.
If you however disabled edit on the original (and only) HomeGUI, it is a bit harder, then you sort of sawed off the branch you were sitting on. Then you cannot fix it from the GUI any more.

If you are running on a RaspberryPi you do the following:

stop the server with "sudo nethome stop"
edit the configuration file with "sudo nano /etc/opt/nethome/config.xml"
Find the HomeGUI-configuration in the file and set the AllowEdit attribute to "Yes".
Save the file and start the server again with "sudo nethome start"

This should fix the problem!

Re: Alternative web views (no edit functionality) or direct links to web parts

Posted: Tue Apr 19, 2016 2:12 pm
by Jonas
I edit the config file and now it works.

Thanks.