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

Functionality and usage of the OpenNethome Server
Post Reply
Stoche
Posts: 3
Joined: Mon Dec 29, 2014 2:19 pm

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

Post 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...
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

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

Post 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?
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

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

Post 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.
Stoche
Posts: 3
Joined: Mon Dec 29, 2014 2:19 pm

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

Post 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".
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

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

Post 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.
Stoche
Posts: 3
Joined: Mon Dec 29, 2014 2:19 pm

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

Post by Stoche »

It covers what I suggested and works perfect. Really nice, Stefan!
Jonas
Posts: 2
Joined: Fri Apr 15, 2016 5:36 pm

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

Post by Jonas »

How to go back to edit mode?
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

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

Post 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!
Jonas
Posts: 2
Joined: Fri Apr 15, 2016 5:36 pm

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

Post by Jonas »

I edit the config file and now it works.

Thanks.
Post Reply