Another Newbie into Luup plugins

Folks,
Vera 3, UI5 working perfectly. Now do I muck about trying to develop sorry learn luup plugin on the unit I have or do I stump up for another unit to trash it around until I have made the first few examples as I depend heavily on the one at home. It has the Powermax, squeezebox plugins as well as numerous luup scenes to automate lights/appliances, including monitoring and water level of the pond.
I know I can backup and if it all goes wrong, restore. it is a pain, hence the first question, do most of you folks have two vera units or have you got away with one.

Now my other question.
I have built a 6 relay unit controlled by Raspberry Pi on Wifi + php. I can set and read the relays via luup scenes using…

luup.inet.wget(‘http://’ … IP_address … ‘/relay2.php?port=’ … port …‘&total=on’)
result, ustatus = luup.inet.wget(‘http://’ … IP_address …‘/query.php?port=’ … ups240)

Works quite well.
I would like to move this to the next Giant leap by building a luup pluggin using BinarySwitch? and Powerswitch to be able to control and reflect the status of each relay back onto the UI5 gui.

I have read through the Wiki, this forum and to stay I am confused and overwhelmed is an understatement and I wish to build it from scratch.

Create a switch for one of the relay, control it as I do reflect the status back. (hardcode the IP address etc…)
next step may be have fields for the IP address and Relay names
next step may be populate the children on startup.
Regular polling of the status.

That’s why I am slightly hesitant to play around with the one I have, while I take the first steps. Wish there was a Dummy guide on luup plugin creation.

Deleted

[quote=“mano, post:1, topic:182205”]Folks,
Vera 3, UI5 working perfectly. Now do I muck about trying to develop sorry learn luup plugin on the unit I have or do I stump up for another unit to trash it around until I have made the first few examples as I depend heavily on the one at home. It has the Powermax, squeezebox plugins as well as numerous luup scenes to automate lights/appliances, including monitoring and water level of the pond.
I know I can backup and if it all goes wrong, restore. it is a pain, hence the first question, do most of you folks have two vera units or have you got away with one.[/quote]

For what it’s worth - I did it the hard way: one vera and everything remote across the WAN. Restoring from a backup is quick and easy and the worst that has happened is a device causing a refresh loop. More recently I’m using ZeroBrane ;D ;D ;D for Vera (i.e. the version which will allow testing right on the device) and info viewer :smiley: :smiley: :smiley: for remote log viewing. That and Putty to ssh right in to the OS and WinSCP for general file upload / download …

I developed a reasonably complex plugin and learnt (and am still learning) Lua this way. It’s not a terrible experience by any means. Now - finding good solid documentation and descriptions on the details of plugin creation … well …

Thankfully there are some very talented and experienced forum members that are very generous (and understanding) with their help …

Thanks Guys, for the tip on Zerobrane, will have a look. Reading a little more on the forums, there is also reference to look at the GC100 plugins for relay control as a typical good example.

Perhaps … depends on what you are wanting to do. I started off with an existing plugin and ended up rewriting most of it but that was (1) me doing it differently and (2) to support a range of functional enhancements. So the original was a good starting place … for my needs.

The tricky / frustrating / confusing / why on earth ? parts are really to do with coming to grips with the various files that need to be created and how they interact and what they do. Especially the UI aspects which I still don’t understand and avoid trying to change what is working :stuck_out_tongue:

The documentation, on the whole, I did not find very useful. It’s ok, kinda, once you figure it out but (again just my opinion) pretty poor for realizing a first time plugin (independent of Lua which seems to have plenty of good documentation).

Just my 2c

Stuart,
Absolutely agree, its almost magic in what is linked to what. I have found 2 or 3 examples of Relay Control using socket. Similarly, building lua script for scenes I can fumble forward.
Zerobrane, took me a while to sus out that there is a version to work onto Vera, now need to order it.