ZeroBrane Studio for Vera -- Lua IDE for debugging on Vera devices

Hi twostep, jasperhb, RexBeckett, and others,

Thank you for your interest in ZeroBrane Studio integration with Vera. I’m pleased to announce that the product is available for purchase and download at ZeroBrane Studio for Vera/MCV devices - Lua IDE/editor/debugger for Windows, Mac OSX, and Linux. I know, it’s been coming soon for several weeks, but I wanted to make sure I incorporate all the feedback from the early users and provide documentation that will make it easier to start using the product.

I’d like to thank all the beta testers, who not only took time to test the product and provide their feedback, but also reviewed and updated the documentation.

I’ll briefly go over its features to provide a summary for those who may be new to the product. The main aspect that should be of interest to most of you is the debugging on the device. You can run Lua code from the IDE and make it execute on the device; not only that, but you can also step through the code, look at the stack and variables, run any Lua and luup commands in the remote console, modify variables there and more.

You can also initiate debugging from the device, which allows to debug Lua code running as part of scenes or plugins. It is setup a bit differently from the “regular” debugging you initiate from the IDE, but otherwise provides access to the same functions (stepping, breakpoints, remote console, and everything else).

The IDE also provides auto-complete and tooltips for Luup functions, support for editing XML files, and ability to upload files to the device, download LuaUPnP.log, and restart the Luup engine on the device.

There are two more things that may help with debugging and troubleshooting Lua scripts. You can use print() expressions when debugging and their result will be redirected to the Output window in the IDE. This is a lightweight alternative to luup.log calls. Not only that, but the output is going to be pretty-printed, which means that print(mytable) will print the table content. You can also use pretty printing in several other places in the IDE, for example, in the Console and in the Watch window.

The last thing I’ll mention is the code analyzer that checks your code for typos and subtle errors.

Onto the pricing. The current introductory price includes 40% discount that is likely to be available through the holidays till the end of the year. You can choose between non-commercial (hobby and learning) and commercial options. I also have subscription plans for those who need work with more than one device. If you need any special arrangements, you can email me at support@zerobrane.com.

Please let me know if you have any questions/suggestions or come across any issues; I’ll keep an eye on this thread and other forum posts. You can also find me on freenode IRC in #zerobrane or email me. Thank you.

Paul.

Hopefully it speeds up software development for vera. The licence agreement doesn’t seem to be appealing though.

“ZeroBrane LLC reserves the right to publish a selected list of users of the Software.” why?

“ZeroBrane LLC reserves the right to make changes to this License at any time without notice to you. It is your responsibility as a user of this Software to periodically return to this page to review…” Need to put a periodical reminder on my calendar …

Hopefully it speeds up software development for vera. The licence agreement doesn’t seem to be appealing though.

Thank you for the feedback!

“ZeroBrane LLC reserves the right to publish a selected list of users of the Software.” why?

So that I could use it as a reference, but I agree; it does look better without it.

“ZeroBrane LLC reserves the right to make changes to this License at any time without notice to you. It is your responsibility as a user of this Software to periodically return to this page to review…” Need to put a periodical reminder on my calendar …

This was something that was suggested by my attorney, although it applies more to services, than to products.

I updated the license to remove both of these; should look shorter and simpler now.

I totally understand the pain of developing this and I hope you make heck lots of money :slight_smile:
Maybe what you need is a personal license and a business license. In business license, it seems to be fine to publish the user name.

You can update the license, but what you have sold is probably going to remain under the older license.

Correct (it’s all version controlled anyway). I don’t think it’s worth splitting to personal/commercial over this as I can always ask for a permission in either case.

@Paul,

am I right in thinking that it won’t upload .xml files (greyed out in the I_XXXX.xml I’m looking at)

also, it would be nice to download files from the vera as well.

certainly a lot easier than blind editing!

Cheers

am I right in thinking that it won’t upload .xml files (greyed out in the I_XXXX.xml I’m looking at)

It will; it will upload any files you have, but only during a debugging session. Note that it won’t compress the files.

also, it would be nice to download files from the vera as well.

It downloads the log file (also during the debugging), but I could not come up with a good interface to get the list of files and select one to download. Also, if you use Vera upload, those files are likely to be compressed and the download through ZBS won’t help as it can’t decompress them.

also, it would be nice to download files from the vera as well.

@Weeves, not quite as straightforward as downloading to a new window, but you can also run something like this in the console (while debugging is in progress):

io.open(‘/etc/cmh-ludl/whatever.lua’):read(‘*a’)

This should print the (serialized) content of the file in the console. The output is limited to 400 characters, but this can be changed in the config file (this is fixed in the next version).

certainly a lot easier than blind editing!

That’s the goal; thank you!

@Paul,

I think I found why I can’t upload a file - it’s throwing a compilation error :
Compilation error on line 201:
[string “D:\Users\Joe\Documents\Vera Files\L_IPhone.lua”]:201: invalid escape sequence near ‘"’

the line in question is executed successfully in the vera, but ZBS seems to object to it

                      function escapeQuotes( str )

this line ----> return str:gsub(“'”, “\'”):gsub(“?”, ‘\?’):gsub(‘"’,‘\"’) – escape quote characters
end

@Weeves, yes, ? is an invalid escape. ZBS is using LuaJIT interpreter internally, which is a bit more strict about escape sequence and will complain even when Lua 5.1 allows those to go through. You can just replace “?” with “?” in your script.

Good job, @paulclinger, this works really well. I think it should be very helpful to people starting-out with Lua/Luup programming for Vera scenes and plugins. I would say it was good value at the current offer price.

It would be good if the Documentation entry in the Help menu included links to the Vera-specific documentation. Also a link to the Lua Reference Manual would be very useful.

@paulclinger,
do u accept Paypal?

do u accept Paypal?

@persimmonx, I do, but I don’t want to enable it as one of the payment options for various reasons. I really like Stripe integration and I don’t have any access to the credit card information, but if you prefer paypal, please email me at support@zerobrane.com and I’ll send you payment information.

If you don’t mind me asking, is paypal much better than the current payment option? I don’t store this information and I don’t think that Stripe stores it either; everything goes over https, so it should be fairly secure.

Good job, @paulclinger, this works really well.

@RexBeckett, thank you for the feedback!

It would be good if the Documentation entry in the Help menu included links to the Vera-specific documentation. Also a link to the Lua Reference Manual would be very useful.

That’s a great point; the links should all point to the Vera-specific resources as you suggested. I’ll add it in the next version.

In terms of Lua Reference Manual, I can add a link, but I can actually do better. I have a plugin that adds a context menu item when you use it on a particular function (like “print” or “io.open”) and it will open the manual page in the browser for that particular function. The plugin and instructions are in this post: http://www.freelists.org/post/zerobrane/Unsolicited-feature-wishlist,1

In terms of Lua Reference Manual, I can add a link, but I can actually do better. I have a plugin that adds a context menu item when you use it on a particular function (like "print" or "io.open") and it will open the manual page in the browser for that particular function. The plugin and instructions are in this post: http://www.freelists.org/post/zerobrane/Unsolicited-feature-wishlist,1
Thank you, @paulclinger. The [i]showluareference[/i] plugin works well. Actually I think it works better than the context-sensitive help in MS Visual Studio. ;D

[quote=“paulclinger, post:13, topic:178001”]> do u accept Paypal?

If you don’t mind me asking, is paypal much better than the current payment option? I don’t store this information and I don’t think that Stripe stores it either; everything goes over https, so it should be fairly secure.[/quote]

Yes, Paypal is much more appealing if one are buying over internet. I know you said you don’t store credit card info, but in theory, the buyer cannot be sure. Besides, processing credit card info requires PCI compliance, and again, users aren’t sure if the seller actually has it.

Personally, I don’t provide credit card info online, unless I am buying from a major company or paying by Paypal, Google wallet or Amazon checkout .

Regards.

Besides, processing credit card info requires PCI compliance, and again, users aren’t sure if the seller actually has it.

@persimmonx, I agree; it’s a valid concern. The advantage of using Stripe is that it allows me to satisfy PCI compliance without capturing and protecting CC info on my side. You (as a user) indeed can’t be sure, but you can inspect the JavaScript code to verify that I follow Stripe guidelines and don’t get CC information (not that you need to, but you could).

As to the other payment methods, I may provide Amazon payments as an alternative, but a bit later.

@Weeves, agree. I added loading/editing/saving files from the device; see this post for details: http://forum.micasaverde.com/index.php/topic,17807.0.html. Give it a try and let me know how it works for you.

didn’t work for me:

Debugging session started in 'D:\Users\Joe\Documents\Vera Files'.
Failed to load file ‘L_SmartSwitch_core.lua’: L_SmartSwitch_core.lua: No such file or directory.

that lua file is one of the few that isn’t compressed.

Do I need to add a path?

Failed to load file ‘L_SmartSwitch_core.lua’: L_SmartSwitch_core.lua: No such file or directory.
Do I need to add a path?

@Weeves, yes, put in a full path as it can get a file from any folder. I may add /etc/cmh-ludl by default if a relative path is detected.