Author Topic: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices  (Read 26337 times)

Offline rollertrol

  • Jr. Member
  • **
  • Posts: 55
  • Karma: +1/-0
Re: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices
« Reply #75 on: July 10, 2014, 11:01:43 am »
Hi All, just wanted to mention that I purchased ZeroBrane yesterday, and I was able to create and execute the program I needed in the first 5 minutes of use. I have (had) zero knowledge of the Lua programming knowledge.

I have been programming computers for about 35 years and I don't think I have ever seen an environment that is easier to get started with. It is a rare occasion to see 'no brainer' software developed like this, where no assumptions were made about the newbie's skill level (or lack thereof).

Cheers, Adrian
RollerTrol Automation Systems

Offline mano

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +0/-0
Re: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices
« Reply #76 on: July 31, 2014, 03:51:32 pm »
Paul,
 Read it somewhere, if I have 2 vera boxes, one at 192.168.0.102 and the other at 192.168.0.103, How do I force/specify  the IDE to use 103.
Mano

Offline paulclinger

  • Jr. Member
  • **
  • Posts: 84
  • Karma: +5/-0
Re: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices
« Reply #77 on: July 31, 2014, 04:15:23 pm »
Read it somewhere, if I have 2 vera boxes, one at 192.168.0.102 and the other at 192.168.0.103, How do I force/specify  the IDE to use 103.

Mano, when you run your script or start a debugging session from the IDE and it detects you have multiple devices, you will get a prompt to select a particular device you want to work with. All the subsequent debugging and interactions will be done with that device. You won?t be asked again until you restart ZeroBrane Studio.

If you only work with one device and don't want to see the dialog, you can explicitly configure ZBS to use that device by adding to the configuration file (Edit | Preferences | Settings: User)

path.vera = '192.168.0.103'

Make sure to restart ZBS after changing the settings. I've added this to the FAQ.

Paul.
« Last Edit: July 31, 2014, 04:36:06 pm by paulclinger »

Offline mano

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +0/-0
Re: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices
« Reply #78 on: July 31, 2014, 04:29:16 pm »
Paul,
Did not get an option for selection of multiple devices.
Added the path.vera to User settings and after close and re-open ZBS it goes to the correct unit.
Tks
Mano


Offline paulclinger

  • Jr. Member
  • **
  • Posts: 84
  • Karma: +5/-0
Re: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices
« Reply #79 on: July 31, 2014, 04:39:19 pm »
Did not get an option for selection of multiple devices.
Added the path.vera to User settings and after close and re-open ZBS it goes to the correct unit.

Mano, thank you for the update. The selection of devices is done based on the results returned by http://cp.mios.com/firmware/detect_unit.php (if there is more than one device reported). I'm curious to see why it's not working in your case. Can you PM me the response returned from that URL? Maybe there is only one device listed (for example, the one you used last)? Thank you.

Paul.

Offline mano

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +0/-0
Re: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices
« Reply #80 on: July 31, 2014, 05:05:02 pm »
Paul,
PM sent, strangely on the command only one of the unit shows as...  (edited for general info..)

[{"FK_AccessPoint":"301ZZZZZZZ","InternalIP":"192.168.0.102","AliveDate":"2014-07-31 13:27:47","MACAddress":"00:0X:XX:84:XX:XX","ForceUpgradeVersion":null,"ForceUpgradeUrl":null,"UpgradeInProgress":"0"}]

Where as getVera shows 2 when you use the control/Remote Access, in text format..

-----------------------------------------------------
Mano (301XXXXXX)  [ Rename ]

Serial #301XXXXX// IP: 192.168.0.102 [ Dashboard ]
-----------------------------------------------------
VeraPlay (351XXXXX)  [ Rename ]

Serial #351XXXXX // IP: 192.168.0.103 [ Dashboard ]
-----------------------------------------------------

Offline paulclinger

  • Jr. Member
  • **
  • Posts: 84
  • Karma: +5/-0
Re: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices
« Reply #81 on: July 31, 2014, 05:29:55 pm »
PM sent, strangely on the command only one of the unit shows as...  (edited for general info..)

Yes, that's why ZBS doesn't give you the option to select the unit as it only sees one. I'm not sure how that data is populated on the MCV side, but the manual configuration you applied bypasses that check, so you should be good with the current configuration. Paul.

Offline mano

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +0/-0
Re: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices
« Reply #82 on: July 31, 2014, 05:47:34 pm »
Paul,
 Thanks, I'll check on the command few days time. The 2nd unit was a shop soiled unit, may be left over debris in MCV causing the issue.
Mano

Offline paulclinger

  • Jr. Member
  • **
  • Posts: 84
  • Karma: +5/-0
Re: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices
« Reply #83 on: January 14, 2015, 05:25:28 pm »
The new version of ZBS for Vera (0.90) has been released. See this topic for details: http://forum.micasaverde.com/index.php/topic,30049.0.html

Offline fouclo62

  • Full Member
  • ***
  • Posts: 105
  • Karma: +2/-0
Re: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices
« Reply #84 on: April 18, 2015, 08:36:42 pm »
Hi,

Not sure what is going on... I have been enjoying ZeroBrane for a few weeks and all was working fine since day one until today. 

Now every time ZeroBrane encounters a LUUP command it gives me an error (for example, when I run (debug or execute) the little program below)
1.   print("Hello")
2.   luup.log("World")
Code: [Select]
Program starting as '"C:\Program Files\ZeroBraneStudioVera-0.90-win32\bin\lua.exe" -e "io.stdout:setvbuf('no')" "C:\Users\Claude\AppData\Local\Temp\.9C30.tmp"'.
Program 'lua.exe' started in 'C:\Program Files\ZeroBraneStudioVera-0.90-win32\myprograms' (pid: 5924).
Debugging session started in 'C:\Program Files\ZeroBraneStudioVera-0.90-win32\myprograms\'.
Hello
ztest.lua:2: attempt to index global 'luup' (a nil value)
stack traceback:
ztest.lua: in main chunk
Debugging session completed (traced 1 instruction).
Program completed in 3.02 seconds (pid: 5924).
I reloaded my vera3,  rebooted my vera3,  even rebooted my computer, but no luck.  I did notice a message when I first started ZeroBrane today;  my Windows7 firewall gave me a warning that ZeroBrane was attempting to access the internet, to which I clicked "allow".  Also, during my numerous attempts of rebooting and what not,  I also at one point completely disabled my firewall for a while but it didn't change anything.

I am currently running the ZeroBrane Studio (0.90; MobDebug 0.607)  Built with wxWidgets 2.9.5

I have been reading the various forums here and on ZeroBrane website but to no avail.  I guess I do have a good connection to my vera because when I type the command:
Code: [Select]
require('socket.http').request('http://192.168.1.222/cgi-bin/cmh/online_check.sh?tmp=1'):match('"PK_AccessPoint":"(.+)"')... in the ZeroBrane console, it returns my Vera3-number.

Can you help please
Thx
Claude

Offline fouclo62

  • Full Member
  • ***
  • Posts: 105
  • Karma: +2/-0
Re: ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices
« Reply #85 on: April 18, 2015, 09:49:49 pm »
Ok never mind... found it.

Somehow,  my Project interpreter had been reset to Lua (I have no clue how it happened... I certainly did not change this manually myself). 

So all I had to do was to set it back to Vera.

Now at least I can execute "LUUP" programs...  The debugger doesn't work anymore but I'm pretty sure I read plenty of other posts of other people that had a "debugger" problem so I will reread the thread and probably figure it out.

Thx
Claude