Remote Access

I have been following this for a while and its looking good!!!
Now that I am having memory issues (overloaded Vera Lite) I am thinking i am going to set this up on a Ras Pi this weekend to take some of the load.
Just a couple of questions I have

  1. How do we achieve remote access? do you use the ALT UI login? or do I need to setup a VPN?
    2)To run this on a windows machine, does it need to be run in a Linux virtual machine or can I run under windows?

This is my setup… Using a VPN for now… MiOS routing that AltUI (and the Vera UI as well) relies on can only target a Vera machine that is registered with MCV Vera.
I am working on a reverse bridge idea during my spare time to access the OpenLuup machine from the Vera to address this (and be able to see both machines from the remote apps like HomeWave). Need to address some circularity issues and avoid recreating plug-ins that eat memeory on the host vera…

Not sure about your question on Windows… I personnaly test my set up in a Linux VM in Virtual Box on a Windows machine… I read somewhere on the forum that Windows can host openLuup but OS calls might create issues in certain cases

openLuup works on Windows, natively, but there may be some plugins which try to make use of OS features which aren’t always there. Depends on what you need. If it was just to run a bridge to Vera you should be OK. I don’t have a definitive list, sorry (can’t test everything), but ask if you need help.

For remote access, you will need VPN.

Hi,

For Pi I installed weaved (weaved.com) and defined a connection to port 3480. It sort of works in that I have to manually add the /data_request?id=lr_ALTUI_Handler&command=home… after making the connection. Weaved does not support adding anything to the host name. I know you can do something with redirects in lighttpd, but I have not tried it yet. Anyone with experience on that?

Also the images are not coming trough as you truly have access to port 3480 only. You can also setup ssh access. But for some occasional emergencies I cannot do by phone/vpn it is a way.

Cheers Rene.

Add the following html as the index.html in the lighttpd document root (should be /www/index.html)… It will redirect to the AltUI homepage.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<meta http-equiv="refresh" content="0; URL=/port_3480/data_request?id=lr_ALTUI_Handler&command=home#" />
<title>Home</title>
<style type="text/css">
*{color:#CCC;background:#000;font-family:Verdana,Helvetica,sans-serif}
p{position:absolute;width:99%;top:50%;margin-top:-3em;line-height:3em;text-align:center}
</style>
</head>
<body>
<p>Redirecting ...<br/>
 <a href="/cmh">main page</a></p>
</body>
</html>

Hi cybrmage,

Sadly this does not work on openLuup. I recall from akbooer that it needs :3480 and does not handle /port_3480 like the Vera does.

Thanks for the suggestion though. I will play with the lighttpd.conf file a bit and see what happens.

Cheers Rene

Rene,

Try this, I would have put this in the guide but I was trying to keep it simple. Doing so from the config caused me issues…

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="0; URL='http://{enter your IP here}:3480/data_request?id=lr_ALTUI_Handler&command=home#'" />
</head>
</html>

[quote=“reneboer, post:6, topic:191102”]Hi cybrmage,

Sadly this does not work on openLuup. I recall from akbooer that it needs :3480 and does not handle /port_3480 like the Vera does.

Thanks for the suggestion though. I will play with the lighttpd.conf file a bit and see what happens.

Cheers Rene[/quote]

Oops… I missed the configuration file for lighttpd that enables the “/port_3480/” redirect…

Create a file called “99-openluup.conf” in the lighttpd configuration directory… (should be /etc/lighttpd/conf/enabled/)… and insert the following:

$HTTP["url"] =~ "^/port_3480/" {
  $HTTP["host"] =~ ".*" {
    url.redirect = ( "^/port_3480/(.*)" => "http://%0:3480/$1" )
    url.redirect-code = 302
  }
}

That will enable openluup handling of any /port_3480/ request…

I’ll definitely give this a try, I never could get my config to work properly … Thanks

Oops… I missed the configuration file for lighttpd that enables the “/port_3480/” redirect…

Create a file called “99-openluup.conf” in the lighttpd configuration directory… (should be /etc/lighttpd/conf/enabled/)… and insert the following:

$HTTP["url"] =~ "^/port_3480/" {
  $HTTP["host"] =~ ".*" {
    url.redirect = ( "^/port_3480/(.*)" => "http://%0:3480/$1" )
    url.redirect-code = 302
  }
}

That will enable openluup handling of any /port_3480/ request…[/quote]

HI,

After a few hours of tinkering I can get something to happen on port 80 as that is where lighttpd is running. However, on port 3480 openLuup is calling the shots. It took me most of tonight to get to that duh… moment ::slight_smile: So if any redirects are required on port 3480 I can try changing the lighttpd config till I’m blue in the face, but it is not going to happen.

The only option is to hack the server.lua and in the receive function for the GET method change an empty path

if (path == "/") then path = "/data_request?id=lr_ALTUI_Handler&command=home" end
I tried that and it actually works and it does not yet like I broke anything :D.

So if you want remote access, have a look at weaved.com and setup a connection to port 3480. It is pretty simple to do. You can then add the /data_request… by hand after connecting or hack akbooer great work over and over as I am not sure he would like to add this as a default option :wink: ;). O, and images do not work as you truly only have a connection to port 3480 this way, not on 80 too.

O well, it was a fun night.

Cheers Rene

I really don’t see any down side to having that as a default. Happy to add if it makes things easier (unless there IS a problem.)

[sup]This is my setup… Using a VPN for now… MiOS routing that AltUI (and the Vera UI as well) relies on can only target a Vera machine that is registered with MCV Vera.
I am working on a reverse bridge idea during my spare time to access the OpenLuup machine from the Vera to address this (and be able to see both machines from the remote apps like HomeWave). Need to address some circularity issues and avoid recreating plug-ins that eat memeory on the host vera…[/sup]
[sub]
I really like the sound of the reverse bridge. I will be looking out for that!!![/sub]

I guess one other thing I am trying to get my head around is how everyone is handling there logic if PLEG is not supported?
Does ALT UI have anything different to Veras Lua?

This is my setup... Using a VPN for now... MiOS routing that AltUI (and the Vera UI as well) relies on can only target a Vera machine that is registered with MCV Vera. I am working on a reverse bridge idea during my spare time to access the OpenLuup machine from the Vera to address this (and be able to see both machines from the remote apps like HomeWave). Need to address some circularity issues and avoid recreating plug-ins that eat memeory on the host vera...
I really like the sound of the reverse bridge. I will be looking out for that!!![/sub]

I guess one other thing I am trying to get my head around is how everyone is handling there logic if PLEG is not supported?
Does ALT UI have anything different to Veras Lua?

[quote=“JCH, post:13, topic:191102”]I guess one other thing I am trying to get my head around is how everyone is handling there logic if PLEG is not supported?
Does ALT UI have anything different to Veras Lua?[/quote]

Yes, it has device variable watch triggers (which, in fact, is what PLEG uses as well) and then you can use straight-forward Lua expressions or a graphical blockly user interface to define your conditional logic.

I really don’t see any down side to having that as a default. Happy to add if it makes things easier (unless there IS a problem.)[/quote]
So my subtle winking helped ;D. It would be brilliant if it could be something you can define in startup.lua as a top-level attribute?

Cheers Rene

I was just thinking of looking for index.html and then you could do what you like with a redirect.

I’ve just realised that if, on loading, I convert all icon file references in .json files to HTTP port 3480 references, then this should work just fine with remote (or local) access.

Hi akbooer,

let me know if you want me to test anything.

Cheers Rene

I’ve updated the development branch so that the server looks for index.html files.

I place the following in [tt]/etc/cmh-ludl/index.html[/tt]

<!DOCTYPE html>
<html>
<head>
   <!-- HTML meta refresh URL redirection -->
   <meta http-equiv="refresh"
   content="0; url=/data_request?id=lr_ALTUI_Handler&command=home#">
</head>
<body>
</body>
</html>

and now [tt]http://openLuupIP:3480/[/tt] redirects to AltUI.

Does this work for you in remote mode?

If so, I’ll press ahead with considering the icon fix. I really do want to see openLuup performing well with remote access.

Thanks.

@reneboer

Did you have an opportunity to test Ak’s latest change ? I’m curious as I’m still maybe a day or so out before I can. I had to reach out to Weaved this morning as they don’t have an installer for OpenWrt on an ARM device. Seems I’m the first to ask (wait till I ask for an x86 installer) so they provided me with really good instructions to manually load using various binaries (I need to find one that’s compatible). So if you don’t get a chance then I should be able to hopefully soon.

Thanks

[quote=“reneboer, post:18, topic:191102”]Hi akbooer,

let me know if you want me to test anything.

Cheers Rene[/quote]