We have moved at community.getvera.com

Author Topic: Luup Code Generator new version 1.028  (Read 32900 times)

Offline TimAlls

  • Hero Member
  • *****
  • Posts: 722
  • Karma: +0/-0
Luup Code Generator new version 1.028
« on: May 09, 2011, 04:58:47 pm »
Download the latest code generator:
http://www.box.net/shared/cs0bxr7ho1
The screenshots are from my original program....the new version is quite different and incorporates a view of all your scenes and devices. Take a look and give me feedback, hopefully this will help Newbies get started with custom Luup code......all copy and paste, no experience needed. I currently have one example and will be adding lots mnore very soon!
END EDIT.........................................

Hi All,
Take a look at the screen shots from the Luup code generator....the basics are tested and functioning perfect.
The first screen shows a dimmer being staged as the "if" input and the second shows the "If / Then" code being generated.
The "If / Then" tab has a pull down control where you select where the staged code is coming from.....eg dimmers levels, thermostat level, zone status, etc. and the second pull down box selects the actions to perform....eg trigger a scene, dim a light, etc.
Getting closer and would love feedback if you are interested.
This will help all of us who are new to Luup coding get started and learn more rather than be overwhelmed!
It will be easy to expand off of this idea with more function.
Regards
Tim Alls
AllSeas Yachts
« Last Edit: May 29, 2011, 10:03:51 pm by TimAlls »

Offline flanew

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: Luup Code Generator
« Reply #1 on: May 09, 2011, 06:26:15 pm »
Nice job man !!!!   :D
Where can i get  that program to test too?
best regards.

Offline TimAlls

  • Hero Member
  • *****
  • Posts: 722
  • Karma: +0/-0
Re: Luup Code Generator
« Reply #2 on: May 09, 2011, 07:26:53 pm »
The code generator is still in developement but still useful even though it is not finished. I recommend you download the Vera Report Generator first which will give you device number and names for dimmers, scenes, and security zones. It will generate two reports....one is a table of your devices with device numbers and names and the other report will give you your raw JSON output.http://www.box.net/shared/jhq6sxojrm
Then download and play with the Code Generator.http://www.box.net/shared/es8jd1k323
Labview runtime engine is required to run any of my programs.....free at http://ftp.ni.com/support/softlib/labview/labview_runtime/8.0/windows/LabVIEW_8.0_Runtime_Engine.exe

Regards
Tim Alls
AllSeas Yachts
« Last Edit: May 09, 2011, 07:30:47 pm by TimAlls »

Offline MNB

  • Hero Member
  • *****
  • Posts: 689
  • Karma: +4/-9
Re: Luup Code Generator
« Reply #3 on: May 09, 2011, 09:03:19 pm »
Tim, Great start... Like your tabs construction logical and makes sense.  :-* will play with it and provide any observations.
Edge-1.7.2607, VRI06-1LX Dimr (6), VS05-1LX Sw (4), GE ZW3002 Dimr (1), HA01C Outlet (12), HA02C Sw (6), HA04C Sw (4), GE Sw (2), HA05 Sw (3), MiniMote Contr (5), HSM200/100 Sensor (2), ZW100A Sensor (8), Nest thermostat (1) & Protect Fire/CO (6) Kwikset Locks (3), F18918W (1) & IP3M-9 (6) Cam's

Offline djrobx

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +1/-0
Re: Luup Code Generator
« Reply #4 on: May 10, 2011, 10:43:31 pm »
As a luup noob, this will be a tremendous help.    I've had a Vera forever, but only recently got communication gong to my alarm panel, which opens up interesting possibilities for doing things automatically when doors open and such.   Luup seems powerful but the syntax is pretty ugly, especially when you're spoiled with auto-complete in Microsoft IDE's. 

I look forward to trying this!

Offline ballroller

  • Sr. Member
  • ****
  • Posts: 286
  • Karma: +0/-0
Re: Luup Code Generator
« Reply #5 on: May 14, 2011, 06:44:25 pm »
Really interesting work, Tim! While it's not finished, it's light years ahead of anything else out there. Especially when MCV told us that it was immensely complicated and probably not going to happen from them anytime soon.

I can't wait for the final polished version. If I can add my .02 from a basic user's point of view- the final version needs to be in a very simple format that anyone can use easily. Pick x,y,z etc  from a drop down menu and have a final code produced that can be copied and pasted into the LUUP tab on the UI (with directions). My point-don't assume we  know what you are talking about! Sometimes programmers talk to programmers at a level that doesn't translate to the bottom rung. And while it might work beautifully, the masses can't figure out what to do with it!

I'll be happy to be the guinea pig anytime you need me!

Offline TimAlls

  • Hero Member
  • *****
  • Posts: 722
  • Karma: +0/-0
Re: Luup Code Generator
« Reply #6 on: May 14, 2011, 06:57:13 pm »
Thanks for the feedback.....the next version is going to have a few very straight forward examples in it that will allow you to pick your devices and copy / paste the code. I am a little bogged down in learning the best way to handle time events. It won't be much longer so stay tuned!
I will need help from someone using thermostats and sensors, so let me know if your game! Just to intice you, give me the senario you want the code for and I will use it in my next version.
Regards
Tim

Offline ballroller

  • Sr. Member
  • ****
  • Posts: 286
  • Karma: +0/-0
Re: Luup Code Generator
« Reply #7 on: May 14, 2011, 07:23:35 pm »
I have 3 thermostats (Trane) and 3 HSM100's. And Schlage locksets. Let me know what you want me to do and I'll do my best to help out.

Offline TimAlls

  • Hero Member
  • *****
  • Posts: 722
  • Karma: +0/-0
Re: Luup Code Generator
« Reply #8 on: May 15, 2011, 12:43:47 am »
A quick question on the thermostats.....do any of them read temperature in tenths of a degree. I was thinking about adding a trend chart for temperature but it would be more useful if it was more accurate than a single degree.
Thoughts?
Tim

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: Luup Code Generator
« Reply #9 on: May 15, 2011, 09:04:31 am »
Nice application.

Some of my devices have device IDs as high as 16800. LCG seems to limit the device ID to 255.

If LCG would parse Vera's configuration data, LCG could present the user with a list of device names (instead of device IDs).

'If and Time Then' and 'Read Variables' seem to be non-functional in the current release.
« Last Edit: May 15, 2011, 09:17:38 am by Ap15e »

Offline ballroller

  • Sr. Member
  • ****
  • Posts: 286
  • Karma: +0/-0
Re: Luup Code Generator
« Reply #10 on: May 15, 2011, 09:31:30 am »
My Trane's only read in 1 deg increments.


A quick question on the thermostats.....do any of them read temperature in tenths of a degree. I was thinking about adding a trend chart for temperature but it would be more useful if it was more accurate than a single degree.
Thoughts?
Tim

Offline TimAlls

  • Hero Member
  • *****
  • Posts: 722
  • Karma: +0/-0
Re: Luup Code Generator
« Reply #11 on: May 15, 2011, 11:52:53 am »
Nice application.

Some of my devices have device IDs as high as 16800. LCG seems to limit the device ID to 255.

If LCG would parse Vera's configuration data, LCG could present the user with a list of device names (instead of device IDs).

'If and Time Then' and 'Read Variables' seem to be non-functional in the current release.
I must have defined the IDs as byte, I will change them to I32 and look for others that might be limiting. Your system is a good test.....you have a lot installed!
You are correct on the non functioning tabs, I am working on them.
I am going to merge the report generator with the LCG and do exactly what you said.....drop down boxes that let you select you devices. It will make it really easy.
I have been studying another insteon controller and there cognitional logic.....in a thread you steered me to, lots of good ideas.
Thanks for the feedback
Tim

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Code Generator
« Reply #12 on: May 15, 2011, 08:34:56 pm »
A quick question on the thermostats.....do any of them read temperature in tenths of a degree. I was thinking about adding a trend chart for temperature but it would be more useful if it was more accurate than a single degree.
Thoughts?
Tim
Internally in MiOS, it's being "held" as an int (i4), so you'll see whole values only.

Offline TimAlls

  • Hero Member
  • *****
  • Posts: 722
  • Karma: +0/-0
Re: Luup Code Generator
« Reply #13 on: May 15, 2011, 09:37:13 pm »
A quick question on the thermostats.....do any of them read temperature in tenths of a degree. I was thinking about adding a trend chart for temperature but it would be more useful if it was more accurate than a single degree.
Thoughts?
Tim
Internally in MiOS, it's being "held" as an int (i4), so you'll see whole values only.
Is that true for sensors as well? In the Wiki they have example code of temperature in a xx.x format.
Regards
Tim

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Code Generator
« Reply #14 on: May 15, 2011, 11:19:39 pm »
The UPnP service definition also has it as i4 for the CurrentSetpoint value both as a StateVariabke and via the actions/methods