Author Topic: LuaUPnP discussion -- the next big feature in Vera  (Read 48362 times)

Offline Boyo

  • Full Member
  • ***
  • Posts: 180
  • Karma: +0/-0
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #30 on: August 02, 2009, 06:44:18 pm »
Ah, ok. Vera wont ship until tuesday, so I just have to wait.
Vera UI4 1.1.1183; Schalge Link Door Handle; HA18WD 3-Way/Single-Pole Switch x2; WDHA-12R - Wireless Gateway Module; Trane Thermostat; Retired: WDTC-20 - Z-Wave Enabled Thermostat

Offline nolos

  • Full Member
  • ***
  • Posts: 191
  • Karma: +0/-0
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #31 on: August 17, 2009, 04:39:56 pm »
ok, so i guess i am going to lear to do some scripting.  Here's the stupid question.  Should I be learning Lua or is there a certain VERA-SPECIFIC code i should be learning?  Any site links with free tutorials would be awesome.  Thanks

Offline LibraSun

  • Hero Member
  • *****
  • Posts: 542
  • Karma: +0/-0
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #32 on: August 17, 2009, 05:08:42 pm »
A Lua tutorial was first mentioned in the MCV wiki, but I'm unable to find the specific page (it may have been deleted since my arrival).

But here's the original link, which I found incredibly instructive:
http://lua-users.org/wiki/TutorialDirectory

For Vera-specific guidance, check out the "Luup" pages at:
http://wiki.micasaverde.com/index.php/Special:AllPages

Good luck!
Vera Model I running UI4 (Firmware 1.1.1338), died in 2015
Vera Plus running UI7 (Firmware 1.7.2935)

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #33 on: August 17, 2009, 05:11:21 pm »
Start with learning Lua itself.  I used this:

  http://lua-users.org/wiki/LuaTutorial

to get me started, along with the command line version of Lua (outside of Vera).  That'll get you going.

Eventually I started using the Eclipse editor with a Lua plugin, mostly to help organize the files, do basic XML validation and formatting.  Probably not needed for most stuff.

You'll need this page to get a listing of the Luup "extensions":

  http://wiki.micasaverde.com/index.php/Luup_Lua_extensions

If you're building a device, then you'll want something like the Somfy walkthrough:

  http://wiki.micasaverde.com/index.php/Luup_Somfy_Walkthrough


Or just read the I_GC100.xml code to get a "sense" for what to do.  There's a lot of trial-and-error in this when you start, so you'll want to see the process outlined in the Somfy walkthrough. ("small, incremental changes")

Offline nolos

  • Full Member
  • ***
  • Posts: 191
  • Karma: +0/-0
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #34 on: August 17, 2009, 05:22:25 pm »
Thank you both.  I am well underway.  I took Visual basic for a bit in college and it seems like a lot of the basic stuff is the same.  Such as the if thens ans the operators.  I guess we'll see

Offline LibraSun

  • Hero Member
  • *****
  • Posts: 542
  • Karma: +0/-0
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #35 on: August 17, 2009, 05:26:19 pm »
@guessed: Are you using LunarEclipse to help with your development?

And if not, that is if you simply downloaded Eclipse and used some 3rd party plug-in, would you mind sharing which "package" of Eclipse you got and which Lua plug-in you found to be helpful?

Thanks!
Vera Model I running UI4 (Firmware 1.1.1338), died in 2015
Vera Plus running UI7 (Firmware 1.7.2935)

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #36 on: August 17, 2009, 05:42:26 pm »
It's been a while so I don't have all the URL references anymore, but I have:

    Eclipse build 20090619-0625
    Lua Development Tool 1.1.0.200710012327 (Kepler?)

and the underlying JVM to run Eclipse.  For the components I just used a lot of Google searches to find them all (I'm on a Mac)

Again, it's probably overkill for most.


Since most of the Luup stuff is really XML files, the Syntax editing and other stuff really isn't going to work correctly.  I use the Eclipse setup mostly for the Project/Package mgmt, a basic XML-aware editor (etc).

The one gotcha here is that, because we're working in XML, you have to remember to "XML Escape" your Lua code (change "&" to "&amp;", "<" to "&lt;" etc, etc).  This will take a while to remember, and several "broken" uploads)

If you're writing a pure-Lua program, the Eclipse editor has a console (etc) so you can see output.

I also moved to here because AnscaMobile has a Lua platform for writing iPhone applications, so I figured I needed an env to do it all (just haven't gotten to the latter just yet) 


Offline 325xi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1101
  • Karma: +0/-0
  • V1, V2, still V2...
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #37 on: August 17, 2009, 09:26:20 pm »
ok, so i guess i am going to lear to do some scripting.  Here's the stupid question.  Should I be learning Lua or is there a certain VERA-SPECIFIC code i should be learning?  Any site links with free tutorials would be awesome.  Thanks

Before you start... what are you planning to do?
If it's all about adding a condition or two into scenes - you do not need to learn Lua or any other language! Read Luup-related wiki pages, average copy-n-paste skills is more then enough.

For simple plugins the above still applies, especially you have at least some scripting experience.

Only if you're going to write something more complex you might have to actually go and learn Lua.

Offline nolos

  • Full Member
  • ***
  • Posts: 191
  • Karma: +0/-0
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #38 on: August 18, 2009, 10:28:55 am »
I'm going to do some scripting like:  Turning on the "Watch Movie" scene turns on the projector, the stereo, and the Blu-Ray, and have the source on the stereo changed to Blu-Ray, Dim the lights in the theater room, blah blah blah

Offline micasaverde

  • Administrator
  • Hero Member
  • *****
  • Posts: 1667
  • Karma: +15/-1
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #39 on: August 19, 2009, 10:14:01 pm »
Next week we're adding an 'advanced' button to scenes, which also works with A/V.  So you can say:

send: 'power on'
wait 3 seconds
send 'input2'
send ...
etc.

You can then attach the scene to a button on the remote.  The remote building is due the week after next.  It lets you build universal remote screens.

Offline nolos

  • Full Member
  • ***
  • Posts: 191
  • Karma: +0/-0
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #40 on: August 20, 2009, 08:52:02 am »
Thats the most exciting news I have heard yet.  The main reason for me getting Vera was the hope of controlling A/V.  I have a USBUIRT on the way, one Remote extender Transmitter, and a bunch of Receivers.  Can't wait for the update.  How do you make an .xml file?  I suppose it's a little different from just saving the Lua code?  Or can you just save the code as .xml?

Offline LibraSun

  • Hero Member
  • *****
  • Posts: 542
  • Karma: +0/-0
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #41 on: August 28, 2009, 12:57:58 am »
FEEDBACK on Firmware rev. 1.0.879 ... from Vera's main page, clicking 'Devices' > 'Cameras' (or any subcategory besides 'Z-Wave' or 'Luup plugins') causes the small info window at right to retain either 'Add, edit and delete your devices.' or 'Plug-ins' text.


Vera Model I running UI4 (Firmware 1.1.1338), died in 2015
Vera Plus running UI7 (Firmware 1.7.2935)

Offline LibraSun

  • Hero Member
  • *****
  • Posts: 542
  • Karma: +0/-0
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #42 on: August 28, 2009, 01:00:26 am »
FEEDBACK, cont'd:

Clicking the 'DEVICES' button immediately after the 'USERS' button results in the following text remaining in the info window: "Profiles for all the users in your home"
Vera Model I running UI4 (Firmware 1.1.1338), died in 2015
Vera Plus running UI7 (Firmware 1.7.2935)

Offline nielsvdw

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #43 on: September 10, 2010, 09:25:49 am »
Why not use a NevoConnect? Z-wave with IR output...

Offline iflyM3

  • Full Member
  • ***
  • Posts: 144
  • Karma: +0/-0
Re: LuaUPnP discussion -- the next big feature in Vera
« Reply #44 on: February 28, 2011, 12:02:50 am »
I would like to see more support for Camera's, I know that I am out of context defined by the threads category but I really don't care.  Vera needs more solid Camera support, all the way around.  A complete overhaul in that department. Just my 2 cents.

Vera could also use more support for IR to be able to control A/V as well, besides the infamous SQ Blaster. 
« Last Edit: February 28, 2011, 12:05:27 am by iflym3 »
Vera 2 UI5 (1.5.622)... and too many Z-Wave/Ethernet/Wi-Fi devices to list.