We have moved at community.getvera.com

Author Topic: openLuup - running unmodified plugins on any machine  (Read 127048 times)

Offline delle

  • Full Member
  • ***
  • Posts: 134
  • Karma: +3/-0
Re: openLuup - running unmodified plugins on any machine
« Reply #450 on: October 26, 2015, 01:59:50 pm »
@akbooer

System was running fine until this morning.  It seems I had an interruption for a few minutes in the network connection.  Raspberry recovered when the network connection came up but lua crashed without leaving a trace in the logs.  Is this something which can avoided? 

Thanks for your help

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #451 on: October 26, 2015, 02:15:09 pm »
System was running fine until this morning.  It seems I had an interruption for a few minutes in the network connection.  Raspberry recovered when the network connection came up but lua crashed without leaving a trace in the logs.  Is this something which can avoided? 

I can't see why that would be.  Maybe it's too late to ask, but what was the last log file, and the penultimate one (in /etc/cmh-ludl/ there is the latest LuaUPnP.log and the five previous ones LuaUPnP.log.1 etc.)

I can imagine that some plugin connections using luup.open or the IP address in the device attributes could be compromised, but that shouldn't shut down Lua.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline jcf6288

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +5/-0
Re: openLuup - running unmodified plugins on any machine
« Reply #452 on: October 26, 2015, 03:04:51 pm »
For scenes I cannot get triggers from my veraEdge to show up.  All the devices are listed but cannot select a trigger.  Thanks

Offline delle

  • Full Member
  • ***
  • Posts: 134
  • Karma: +3/-0
Re: openLuup - running unmodified plugins on any machine
« Reply #453 on: October 26, 2015, 04:40:26 pm »
@akbooer

Last log file just ended without an error message
2015-10-26 08:24:25.688   luup.variable_set:4: 42.urn:akbooer-com:serviceId:EventWatcher1.AppMemoryUsed was: 768 now: 772 #hooks:0
2015-10-26 08:24:25.692   luup.variable_set:4: 42.urn:akbooer-com:serviceId:EventWatcher1.MemAvail was: 84344 now: 84300 #hooks:0
2015-10-26 08:24:25.693   luup.variable_set:4: 42.urn:akbooer-com:serviceId:EventWatcher1.MemFree was: 60328 now: 60276 #hooks:0
2015-10-26 08:24:25.694   luup.variable_set:4: 42.urn:akbooer-com:serviceId:EventWatcher1.CpuLoad05 was: 0.27 now: 0.24 #hooks:0

and that's when lua crashed
system log shows nothing more
Oct 26 08:17:43 raspberrypi kernel: [   52.156211] cfg80211: Calling CRDA to update world regulatory domain
Oct 26 08:17:46 raspberrypi kernel: [   55.316301] cfg80211: Calling CRDA to update world regulatory domain
Oct 26 08:17:49 raspberrypi kernel: [   58.476490] cfg80211: Calling CRDA to update world regulatory domain
Oct 26 08:17:52 raspberrypi kernel: [   61.636619] cfg80211: Calling CRDA to update world regulatory domain
Oct 26 08:17:55 raspberrypi kernel: [   64.796759] cfg80211: Exceeded CRDA call max attempts. Not calling CRDA
Oct 26 09:17:01 raspberrypi /USR/SBIN/CRON[2438]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Oct 26 10:17:01 raspberrypi /USR/SBIN/CRON[2448]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Oct 26 11:17:01 raspberrypi /USR/SBIN/CRON[2458]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly

Where else can I have see more info?

Thanks

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #454 on: October 26, 2015, 05:30:23 pm »
Couldn't really say... not a Unix expert at all.

I tried unplugging a Debian system for a minute or two and reconnecting.  Took a while but all OK, no crashes.  Sonos controls still work, as does remote connection to Vera via the bridge.  Not a conclusive test, but it gives some encouragement.

3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #455 on: October 26, 2015, 05:40:58 pm »
For scenes I cannot get triggers from my veraEdge to show up.  All the devices are listed but cannot select a trigger.  Thanks

Does this post shed any light on the situation? http://forum.micasaverde.com/index.php/topic,32315.msg252844/topicseen.html#msg252844

Also

Quote from: User Guide, p. 3
  • supports scenes with timers and ALTUI-style triggers

--

Edit:  Also, are you running the latest version of the VeraBridge ?
« Last Edit: October 26, 2015, 05:52:55 pm by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline jcf6288

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +5/-0
Re: openLuup - running unmodified plugins on any machine
« Reply #456 on: October 27, 2015, 02:20:19 am »
Yes I am running the latest bridge.  I figured out the triggers stuff, and am having trouble with the actions.  I read through the guide as well as the altui doc and am not sure what the scene editor is looking for, for something like turning on a light connected to the vera.  Do I have to use LUA for anything connected to the vera?  Also any idea why my icons aren't showing up. I have them set in the exact directories described in the setup guide?  Thanks for all the help.  I continue to believe this is the best option to move away from Vera and still have all the benefits of Vera if that makes any sense.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #457 on: October 27, 2015, 04:05:21 am »
Actions work exactly the same way as on Vera.  No need for any Lua.  You select the device you want to action, then the actual action from the pop up menu, and finally the value of any parameter.

Re. Icons: I assume, then, that you've tested as described in the guide that you can access these two locations through a browser.  Have you also run the configuration test Lua script and does it give any diagnostic message?  My guess would be that the /www/ directory used by your port 80 server is not, in fact, accessible by that exact path from the root directory, and that you perhaps need a symbolic link to make that actual connection.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline nullx8

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +9/-3
  • Trouble !
Create Device
« Reply #458 on: October 27, 2015, 05:39:13 am »
somehow i keep failing in creating local devices on openLuup

the AltUI dialog does not work at all

if u use luup.create_device its beeing added but the ALTID is the device name .. and change the name itself does not really work either ..

somethings odd here ...

everything from the verabridge works fine ... but i cant even get a virtual switch to work ..

if i use luup.create_device the device is created .. but watched variables do not fire ..
1 VeraLite, 2 RaspberryPI, Harmony Remote, openLuup, 85 Devices, 34Nodes, 63 Triggers, 49 Scenes

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Create Device
« Reply #459 on: October 27, 2015, 06:44:46 am »
somehow i keep failing in creating local devices on openLuup

the AltUI dialog does not work at all
No, it doesn't.  This is something we need to ask @amg0.  The problem is well defined: it makes a request to port 80, which shows in the syslog file like this...

Code: [Select]
[Tue, 27 Oct 2015 10:26:01 GMT] "OPTIONS /port_49451/upnp/control/hag HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:41.0) Gecko/20100101 Firefox/41.0"
...expecting it to be redirected to port 49451.  Your system doesn't do that redirection, nor does mine, nor does it matter, since I've not implemented a server on port 49451 anyway.

The solution is to use a much more normal port 3480 call documented here: http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions#HomeAutomationGateway1 and also in file S_HomeAutomationGateway1.xml.

Code: [Select]
http://ip_address:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreateDevice&...

Quote
if u use luup.create_device its beeing added but the ALTID is the device name .. and change the name itself does not really work either ..

somethings odd here ...
Are you sure you have the right parameters?  This works:

Code: [Select]
local arduino = luup.create_device ('', "Arduino", "Arduino", "D_Arduino1.xml")       
...giving the device name AND the altid as "Arduino", but you could use anything you like for either/both.

Quote
everything from the verabridge works fine ... but i cant even get a virtual switch to work ..

if i use luup.create_device the device is created .. but watched variables do not fire ..
How exactly are you creating the device and what are you expecting it to do?
« Last Edit: October 27, 2015, 06:53:01 am by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline jcf6288

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +5/-0
Re: openLuup - running unmodified plugins on any machine
« Reply #460 on: October 27, 2015, 09:35:55 am »
Actions work exactly the same way as on Vera.  No need for any Lua.  You select the device you want to action, then the actual action from the pop up menu, and finally the value of any parameter.

Re. Icons: I assume, then, that you've tested as described in the guide that you can access these two locations through a browser.  Have you also run the configuration test Lua script and does it give any diagnostic message?  My guess would be that the /www/ directory used by your port 80 server is not, in fact, accessible by that exact path from the root directory, and that you perhaps need a symbolic link to make that actual connection.
Thanks, I will keep playing with it.  Weird, when installing I was able to see the VeraBridge.PNG now I can't.

When I select the drop down under action with a vera device nothing happens.  It just shows a blank box. 
« Last Edit: October 27, 2015, 09:58:51 am by jcf6288 »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #461 on: October 27, 2015, 11:20:23 am »
i think its time for sub-forum for openLuup ...

So do I, and here we are.

I'm locking this thread (it has got a bit unwieldy) so feel free to make new ones under the new child board here http://forum.micasaverde.com/index.php/board,79.0.html

I've initially made a few threads on likely topics to get us started.  Tell me what's missing.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #462 on: December 18, 2015, 03:42:49 pm »
This is my 3000th post, and I just wanted to place it as a sort of end-stop in an old thread which started more than 6 months ago with my 2000th post.

In that post I laid out a roadmap for openLuup, and, whilst we're not quite there with everything, most of the objectives have been accomplished.  openLuup runs a wide variety of plugins on a wide variety of platforms.  This is not to say I'm at the end of developing this - far from it - but I think it's reaching stability.

Quite coincidentally, today one of my openLuup systems has also reached a milestone that can never be accomplished by Vera: over 31 days of continuous operation without a reload.  Of course, most Veras reload much more often than that, but with care you can get them to run for a month.  But that's the very longest because at the start of every calendar month, Vera will reload.

So here's a couple of screen shots showing openLuup, running on a 400 Mhz Arduino Yun board, after 32 days of continuous use.  It supports a MySensors network, two Netatmo stations with additional modules, a DataYours installation, and is my main machine for plotting DataYours graphs (such as these two plots.)  It averages around 10 Mbytes of memory use and 4.6% of the CPU load (the vertical axis for the plot is Mbytes and CPU %)

In fact, even with a machine linked to 4 remote Veras, I've struggled to make openLuup use much more resource than this.  This was the whole point of the exercise in the first place, so (if you allow some smugness) I'm well pleased.

I hope it works as well for you.

---------

I should definitely add that this would certainly not have been possible without the extended efforts of others - especially @amg0 and all the epic work on AltUI.  Also a small but select band of intrepid beta-testers (you know who you are) who have been brave enough to step into the deep water and try things out.  Without you all, and access to some of your devices, I would have not got far.  Thank you for your patience and support.

« Last Edit: December 18, 2015, 03:50:09 pm by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: openLuup - running unmodified plugins on any machine
« Reply #463 on: December 19, 2015, 03:58:14 am »
Very well done AK

Offline d55m14

  • Sr. Member
  • ****
  • Posts: 449
  • Karma: +8/-1
Re: openLuup - running unmodified plugins on any machine
« Reply #464 on: December 19, 2015, 04:22:35 am »
Great fantastic job akbooer !!