I have a USB<->Serial device with digital inputs and relays (http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=260881091798) hooked to my veralite usb input. At the UI5 web interface under APPS->DEVELOP APPS->Serial Port Configuration, I see some stuff (Name: ftdi_sio, Device Number: usb-rt3883-ohci-1, Port: 3481) so I think the gadget is connected. Now what? Nothing shows up under devices. I have been reading the forum/wiki and trying to figure out stuff for 4 hours now. I set up and logged in using PuTTY. I can’t find anywhere how to send/receive commands to/from it (via console or web or anything). The first thing I want to do is just make a relay click (send an ASCII ‘G’ to the serial port @ 1200bps), then I eventually need to turn a zwave device on/off via one of the digital inputs.
How to do this in 3 easy steps would be MOST appreciated, but even offhanded references on where to go to read up on how to do it myself will be appreciated also.
Ryan, there is no Three Easy Steps. There is Fifty Undocumented Steps. You would need to make a plugin, attach the plugin to the serial port, then put code in the plugin to use luup.io.write() to send the byte out over the serial port.
How much of a programmer are you? Do you want to learn a new language or three? Are you good at reading partial documentation and working examples and munging them until your code works, with nothing but print-statements for debugging? (I’m really not trying to discourage you.)
I don’t see you getting this working without seriously hacking the Vera and its underlying Linux OS.
But here is a thread about using a network attached Arduino to control relays via Vera. It would require more hardware and is also undocumented/supported, but most of the work is already done with lots of instructions how to do it yourself.
Isn’t the serial port mounted (or whatever the linux term is)? Isn’t there a command I can type into a window to send a byte to the serial port to make the relay click?
Ryan, in general there are no Unix command-line tools for configuring serial port parameters such as speed. You might be lucky and have a command like setserial. Probably you don’t, not on Vera. Then there is buffering and flow control, which will also interfere with you trying to echo bytes to the serial port device directly.
Out of the two options (1) write a Vera plugin and (2) mess around with the Vera command line, you will get better results with (1).
A few hours later and gadget is working… no need to hack the OS.
I followed the ‘Luup Somfy Walkthrough’, recalculating for problems due to outdated documentation, and it was I’d say about 20 moderately easy steps. The simple ‘type in a command’ I was looking for to get relay 1 to click is: luup.io.write(“g”,17) typed into the ‘Test Luup code’ window under the “Apps->Develop Apps” window (after changing the baud rate using the drop down in the Apps->Develop Apps->Serial Port Configuration window. But as futzle knows, the big catch is that you have to have a device (in my case, the #17) plugin written and running as a doorway to the serial port. (I thought there would be a direct window… maybe mcvflorin knows how to do it in 3 easy steps?) In reality however, the somfy example was 90% what I needed, so it wasn’t too much work.
I apologize but I really have to say how disappointed I am in zwave. For a 12 year old protocol, it’s very pathetic how little is done. Compare this to the Apple world. Had I grasped this before I started, I would have just went with making my own gadgets using arduinos and wifi/ethernet. By the time things are tweaked into everyday usability, I’m ending up having to do most of the work anyway, and the zwave is 10% of the equation that could have just been replaced with a bit more custom stuff. Very disappointing. From my perspective anyway.
Not really sure what you’re on about, Ryan. You were asking about a USB serial device plugged directly into Vera. You were offered options and wound up writing your own LUUP code to go with a plugin, as was recommended, in order to get the job done.
But, none of that has anything to do with Z-Wave. Not Vera, not USB serial dongles, not LUUP code. And, compare what to the Apple world? Z-Wave to Apple? Does Apple have a home automation product or protocol now?
I am however glad that you were able to get the results you wanted.
I suppose you could argue that it was off topic (lol), but I don’t give a rats crap about it enough to start a thread. I am disappointed with zwave though, so I just decided to vent on my own little thread… which I am done with now so…
I’m out. Peace.
Best Home Automation shopping experience. Shop at Ezlo!