openLuup - running unmodified plugins on any machine

[quote=“mda, post:100, topic:187412”][quote=“akbooer, post:98, topic:187412”]Don’t know if these are any good.
Found them, and the contained sub-directory in /usr/local/lib/[/quote]

worked! Thanks!!! now on to configuring and testing openluup ;)[/quote]

looks like it is working working! Yay! now to try to some cameras and other plugins…

@akbooer

I moved over the camera and foscam files from my vera (decompressed). I tried a foscam device which OpenLuup loaded from my Vera but it does not get an image. Attached is screen shot.

The log shows:

015-08-15 20:45:19.498 openLuup.server:: /data_request?id=request_image&cam=166 tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:19.498 openLuup.server:: request completed (10 bytes, 0 ms) tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:21.060 openLuup.server:: /data_request?id=request_image&cam=166'&t=1439696721005 tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:21.061 openLuup.server:: request completed (10 bytes, 0 ms) tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:22.511 openLuup.server:: /data_request?id=request_image&cam=166'&t=1439696722508 tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:22.512 openLuup.server:: request completed (10 bytes, 0 ms) tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:24.014 openLuup.server:: /data_request?id=request_image&cam=166'&t=1439696724012 tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:24.014 openLuup.server:: request completed (10 bytes, 0 ms) tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:25.519 openLuup.server:: /data_request?id=request_image&cam=166'&t=1439696725517 tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:25.519 openLuup.server:: request completed (10 bytes, 0 ms) tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:27.025 openLuup.server:: /data_request?id=request_image&cam=166'&t=1439696727023 tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:27.025 openLuup.server:: request completed (10 bytes, 0 ms) tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:28.526 openLuup.server:: /data_request?id=request_image&cam=166'&t=1439696728524 tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:28.526 openLuup.server:: request completed (10 bytes, 0 ms) tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:30.031 openLuup.server:: /data_request?id=request_image&cam=166'&t=1439696730029 tcp{client}: 0x7ff3b384ae28 2015-08-15 20:45:30.032 openLuup.server:: request completed (10 bytes, 0 ms) tcp{client}: 0x7ff3b384ae28

(I also tried creating a new camera device in openLuup AltUI in case that was the right approach, but the device did not create).

Please let me know if there is anything i can do to help debug. Next i will test connected to OpenLuup from the HomeWave iPhone app.

I haven’t tried cameras (haven’t got one.) I don’t think I’ve done anything explicit to support them, so it may need something extra. The log should be a good diagnostic of anything missing. You should not have to create anything locally explicitly when bridging to an existing remote Vera.

What worries me about that screen shot is the “Waiting for initial data” at the bottom. This is not how it should be: it’s missing the ‘donate’ button. Look like ALTUI has not started up right? (Just to be clear, this will be an openLuup issue, rather than an ALTUI one!)

I think it’s important to walk before we can run. What else, more basic, do you have and how is that working (switches, sensors, etc.) ?

Should I copy all my json and xml files from Vera to my Mac and try the various devices?

Ah yes, that’s a good plan… probably the reason that ALTUI hangs if you have bridged devices for which you don’t have local files.

Wow, that’s amazing! I shouldn’t sound surprised, but it sounds like you went for the whole works straight away. You’re saying that the Arduino gateway plugin works OK as well as the bridge to both of your Veras? What sensors are you running on the Veras?

Basically the vera’s are just controling my zwave devices and some PLEG on the edge. I started with the lite but ran into memory issues causing multiple restarts a day when i added more than 5 mysensors nodes. I added the edge last December and it works a lot better but the buggy firmware is still frustrating. I bought a pogo plug v4 on ebay for $5 and hacked to to run Debian Linux but it was just sitting around do nothing so when i saw this i thought why not and tried it.
I have LED, temp, motion,light and rainsensors.

Well you’re obviously an expert, and that’s a great example of how I imagined it being used. If there are any lessons learned during the commissioning, or suggestions for improvements, I’d be happy to hear them.

So well done again, and thanks for thinking “why not” in the first place!

i decompressed and copied all the files from /etc/cmh-lu and /etc/cmh-ludl on vera to /etc/cmh on my mac. I could not bring over the Vera Alerts plug in or a couple other encrypted files.

The good news is i can turn z-wave lights on/off from AltUI on openluup and the multiswitch values display (though clicking on a multiswitch button does not have any effect, which is fine ;). I can also connect to openluup with HomeWave on iOS and can control bridged vera z-wave lights through openluup.

But, the bridged cameras still do not display images on altUI or on Homewave – however this does not matter to me since I want to connect openluup directly to the camera and avoid the camera being in vera as my next step, so i do not need to get bridged cameras working.

But…

I have changed OpnLuup’s startup.lua to have my location but AltUI shows Chantilly Virginia as my location (I am in California), and “Waiting Initial Data” so something is still not right. I also replaced “Upstairs” with “Master” in the Room setup in startup.lua but AltUI is showing Upstairs, Downstairs, and Master (where is it getting “Upstairs” from?)

So before i start to create devices in startup.lua i think i still need to figure out why OpenLuup is not taking into account my startup.lua changes correctly and still “Waiting Initial Data”?

I will PM you my logs.

Thanks!

That is good news.

But, the bridged cameras still do not display images on altUI or on Homewave -- however this does not matter to me since I want to connect openluup directly to the camera and avoid the camera being in vera as my next step, so i do not need to get bridged cameras working.
OK, fair plan. I've taken a look and there is one critical HTTP request that I have not yet implemented: request_image, as documented (not very well) here: [url=http://wiki.micasaverde.com/index.php/Luup_Requests#request_image]http://wiki.micasaverde.com/index.php/Luup_Requests#request_image[/url]

I’ll take a look at doing this. My initial worry is that cameras seem (from reading other posts) to be a bit of a challenge to set up. I’m not sure why this is, but no doubt I will find out. Not having a camera at all will mean a bit of trial and error on the way.

I have changed OpnLuup's startup.lua to have my location but AltUI shows Chantilly Virginia as my location (I am in California)
I'll take a look at the startup file and see what that tells me. To help further diagnostics it would be good to have the output from the id=user_data request.
and "Waiting Initial Data" so something is still not right. I also replaced "Upstairs" with "Master" in the Room setup in startup.lua but AltUI is showing Upstairs, Downstairs, and Master (where is it getting "Upstairs" from?)
As documented, room states, and scenes, are persistent. The are saved in the file user_data.json on a clean exit from openLuup (ie. after an HTTP request with id=exit). You can directly edit that file to remove the room, or use and HTTP request (documented here [url=http://wiki.micasaverde.com/index.php/Luup_Requests#room]http://wiki.micasaverde.com/index.php/Luup_Requests#room[/url]) to remove it.
So before i start to create devices in startup.lua i think i still need to figure out why OpenLuup is not taking into account my startup.lua changes correctly and still "Waiting Initial Data"?
Sounds like we both have a bit of work to do.

Hi akbooer,

how can I change the listening port of Datayours Cache on a Openluup/Datayours ?

tnks

donato

@mda

I have changed OpnLuup's startup.lua to have my location but AltUI shows Chantilly Virginia as my location (I am in California)

What ALTUI shows is a weather location - I don’t know exactly where it gets it from. Simply click on the banner to go to the weather website and select your desired location.

The ACTUAL location used (for sunrise / sunset) is taken from the latitude and longitude settings. The convention, for Vera, is , I believe, NEGATIVE for WEST of the meridian, so you should be using -118, or thereabouts?

[quote=“akbooer, post:112, topic:187412”]@mda

I have changed OpnLuup's startup.lua to have my location but AltUI shows Chantilly Virginia as my location (I am in California)

What ALTUI shows is a weather location - I don’t know exactly where it gets it from. Simply click on the banner to go to the weather website and select your desired location.

The ACTUAL location used (for sunrise / sunset) is taken from the latitude and longitude settings. The convention, for Vera, is , I believe, NEGATIVE for WEST of the meridian, so you should be using -118, or thereabouts?[/quote]

ALTUI uses accuweather widget in autolocation mode ( so it is accuweather which determines your location based on your ip ).
you can check out http://www.accuweather.com/en/free-weather-widgets/current

Thanks!

@akbooer - i have PM’d you a link that may be helpful. Thanks.

First of Thanks for this Virtual Vera I stumbled upon it tonight and I’m having fun so far but the ALTUI is not coming up after boot. I even removed the MYS and VeraBridge just in case that was the hangup. I can access the webpage for calling up user_data, etc. The images come up when called like in the tutorial as well. I tink this is something with apache? but not sure what to do.

2015-08-17 00:10:00.215 openLuup.server:: /J_ALTUI_uimgr.js tcp{client}: 0x850908 6 2015-08-17 00:10:00.216 openLuup.server:: error 'timeout' sending 379225 bytes to tcp{client}: 0x850908 11

why is this happening?

Here is a little core of the log for perspective…

2015-08-17 00:22:44.167 openLuup.server:: new client connection: tcp{client}: 0x8508a8 8 2015-08-17 00:22:44.167 openLuup.server:: new client connection: tcp{client}: 0x840af8 8 2015-08-17 00:22:44.167 openLuup.server:: new client connection: tcp{client}: 0x915e28 8 2015-08-17 00:22:44.167 openLuup.server:: new client connection: tcp{client}: 0x9218b8 8 2015-08-17 00:22:44.172 openLuup.server:: /data_request?id=lr_ALTUI_Handler&command=home tcp{client}: 0x8508a8 6 2015-08-17 00:22:44.172 luup_log:3: ALTUI: ALTUI_Handler: request is: lr_ALTUI_Handler 8 2015-08-17 00:22:44.172 luup_log:3: ALTUI: ALTUI_Handler: parameters is: {"command":"home"} 8 2015-08-17 00:22:44.172 luup_log:3: ALTUI: ALTUI_Handler: outputformat is: null 8 2015-08-17 00:22:44.174 luup_log:3: ALTUI: getScriptContent(J_ALTUI_plugins.js) 5 2015-08-17 00:22:44.174 luup_log:3: ALTUI: getScriptContent(J_ALTUI_iphone.js) 5 2015-08-17 00:22:44.174 luup_log:3: ALTUI: getScriptContent(J_ALTUI_jquery.ui.touch-punch.min.js) 5 2015-08-17 00:22:44.176 openLuup.server:: request completed (65197 bytes, 4 ms) tcp{client}: 0x8508a8 11 2015-08-17 00:22:44.410 openLuup.server:: /J_ALTUI_utils.js tcp{client}: 0x8508a8 6 2015-08-17 00:22:44.410 openLuup.server:: request completed (33527 bytes, 0 ms) tcp{client}: 0x8508a8 11 2015-08-17 00:22:44.410 openLuup.server:: /J_ALTUI_verabox.js tcp{client}: 0x840af8 6 2015-08-17 00:22:44.411 openLuup.server:: request completed (89086 bytes, 0 ms) tcp{client}: 0x840af8 11 2015-08-17 00:22:44.418 openLuup.server:: /J_ALTUI_multibox.js tcp{client}: 0x840af8 6 2015-08-17 00:22:44.419 openLuup.server:: request completed (26181 bytes, 0 ms) tcp{client}: 0x840af8 11 2015-08-17 00:22:44.424 openLuup.server:: /J_ALTUI_uimgr.js tcp{client}: 0x840af8 6 2015-08-17 00:22:44.425 openLuup.server:: error 'timeout' sending 379225 bytes to tcp{client}: 0x840af8 11 2015-08-17 00:22:44.425 openLuup.server:: request completed (379225 bytes, 1 ms) tcp{client}: 0x840af8 11

Thanks,
Jeff

Oh good, I’m glad you found it. I nearly called it ‘Virtual Vera’ before then worrying about trademarks, etc.

...but the ALTUI is not coming up after boot. I even removed the MYS and VeraBridge just in case that was the hangup. I can access the webpage for calling up user_data, etc. The images come up when called like in the tutorial as well. I tink this is something with apache? but not sure what to do.
OK, this is a real problem - you're the second one to find this problem: it was @amg0 (of ALTUI fame) who ran into this too, but that was running in a virtual machine environment, so I put it down to that.
[code]2015-08-17 00:10:00.215 openLuup.server:: /J_ALTUI_uimgr.js tcp{client}: 0x850908 6 2015-08-17 00:10:00.216 openLuup.server:: error 'timeout' sending 379225 bytes to tcp{client}: 0x850908 11 [/code] why is this happening?

There’s two theories so far:

[ol][li]it genuinely IS a timeout on the transaction,[/li]
[li]it is length-related, perhaps a buffer length problem.[/li][/ol]

Your observation is extremely helpful in underlining the issue, but I’ve not been able to replicate it on Debian or Open-WRT, although neither of these are running Apache. I also run on a Mac which does use that and doesn’t show the problem either.

However, the transaction which is failing is to the port 3480 server - which is definitely an openLuup problem, and seems to be file-length related. The file J_ALTUI_uimgr.js is the big one in the ALTUI package - I don’t know if there’s an easy way to split it, I’m not in any way JavaScript competent.

If anyone has suggestions or insights into this, I’m very happy to listen. But I will anyway pursue my own investigations.

Sorry for the inconvenience.

Oh good, I’m glad you found it. I nearly called it ‘Virtual Vera’ before then worrying about trademarks, etc.

...but the ALTUI is not coming up after boot. I even removed the MYS and VeraBridge just in case that was the hangup. I can access the webpage for calling up user_data, etc. The images come up when called like in the tutorial as well. I tink this is something with apache? but not sure what to do.
OK, this is a real problem - you're the second one to find this problem: it was @amg0 (of ALTUI fame) who ran into this too, but that was running in a virtual machine environment, so I put it down to that.
[code]2015-08-17 00:10:00.215 openLuup.server:: /J_ALTUI_uimgr.js tcp{client}: 0x850908 6 2015-08-17 00:10:00.216 openLuup.server:: error 'timeout' sending 379225 bytes to tcp{client}: 0x850908 11 [/code] why is this happening?

There’s two theories so far:

[ol][li]it genuinely IS a timeout on the transaction,[/li]
[li]it is length-related, perhaps a buffer length problem.[/li][/ol]

Your observation is extremely helpful in underlining the issue, but I’ve not been able to replicate it on Debian or Open-WRT, although neither of these are running Apache. I also run on a Mac which does use that and doesn’t show the problem either.

However, the transaction which is failing is to the port 3480 server - which is definitely an openLuup problem, and seems to be file-length related. The file J_ALTUI_uimgr.js is the big one in the ALTUI package - I don’t know if there’s an easy way to split it, I’m not in any way JavaScript competent.

If anyone has suggestions or insights into this, I’m very happy to listen. But I will anyway pursue my own investigations.

Sorry for the inconvenience.[/quote]

AK,
I wonder about the client:setoption(option [, value]) or client:settimeout(value [, mode]) API documented in LuaSocket: TCP/IP support
especially the ‘linger’ option ,or the ‘b’ and ‘t’ timeout options…

[quote=“amg0, post:117, topic:187412”]I wonder about the client:setoption(option [, value]) or client:settimeout(value [, mode]) API documented in LuaSocket: TCP/IP support
especially the ‘linger’ option ,or the ‘b’ and ‘t’ timeout options…[/quote]

Yes, good steer. I’m wondering about that too. I thought I had set a 10 second timeout, but looking at it right now. Thanks!

[quote=“d55m14, post:111, topic:187412”]Hi akbooer,

how can I change the listening port of Datayours Cache on a Openluup/Datayours ?

tnks

donato[/quote]

Hi akbooer,

to change the parameter indicated above Have I to set the following in startup.lua ?

luup.variable_set (“urn:akbooer-com:serviceId:DataYours1”, “UDP_RECEIVER_PORT”, “port_number”, dy7)

tnks

donato

[quote=“d55m14, post:119, topic:187412”]to change the parameter indicated above Have I to set the following in startup.lua ?

luup.variable_set (“urn:akbooer-com:serviceId:DataYours1”, “UDP_RECEIVER_PORT”, “port_number”, dy7)[/quote]

Sorry I missed your original post. Yes, that’s all you need to do. But you must make sure that your DESTINATIONS ip:port match that port number.

This is perhaps more of a DataYours question than an openLuup one, but I see the dilemma. Maybe better for future similar queries to ask in the “DataYours on Rpi” thread?