RS232 Over IP Via Vera

Hi

I can see numerous posts on using RS232, but I was struggling to find details of the hardware people have used.

I can see simple ‘TCP/IP to RS232’ devices on eBay for about £20 (which are just bare boards) but I’m not sure if they are suitable. I also saw a post on ‘Wifi to RS232’ too, so the hope of this post is to see if people can share the ones they have.

On a side note, I have seen a matrix switcher i like which looks for binary information to be sent, so my plan will be (if I get it) to tweak one of the existing plugins already posted.

A few of us use these: https://www.sparkfun.com/products/9476

Personally I tend to have real computers near to where I need, so I run ser2net on the computer.

Hi Futzle, how are ‘those’ recognised by Vera? Do you just use the IP and that is it?

IPv4 address and TCP port number, yes.

Configuration (bits, speed, parity) is done through a Windows-only tool that talks to it on a different port.

OK so your’re saying they have to be configured in advance via PC, before they can be used by Vera, even though they are IP devices.

When you say IP and port, do you have to put something like this in the Device setting on Vera 192.168.1.232:1234?

Thanks

The exact IP-and-port syntax is not dictated anywhere, but the example you gave is what a few of us have settled on in our plugins. Take a look at the Caddx source file (L_*.lua) to see how the initialization code looks.

In theory, if Vera knew how to configure the WizNet adapter over IP, you could avoid having to use a PC ahead of time. But that part of the WizNet’s protocol isn’t published, and it tends to differ for every serial-to-TCP device so there isn’t a great deal of interest in bypassing the supplied setup tool.

These WIZnet devices work very well. I use them in some URC installs, haven’t tried them with Vera yet though

Hi, how does a Lua coding approach differ from the one Guessed posted?

http://forum.micasaverde.com/index.php/topic,2989.msg12655.html#msg12655

My guess is you have this as part of the L_xxxx.xml so you do not need to have the IP to serial adapter as a separate device in the UI? Is that right?

Hi, is anyone able to comment on my post?

I’m just curious if an RS232 set up is best run (like an IR transmitter) as a Device (D_xxxxx.xml) and Implementation (I_xxxxx.xml) file for the unit. And then have a separate Device (D_xxxxx.xml) and Implementation (I_xxxxx.xml) file for the codes you want to send?

I was also wondering if there could be a benefit in having a standard (app store) plugin for the device itself, and then instuctions on creating the codes to send ?

For my serial devices I use serial to USB cables connected to a Raspberry Pi running ser2net. Works very well. :slight_smile:

That IPSerial device hack was around before I got involved with Vera. It may be that it’s not needed now that we have luup.io.open(). In any case, I consider the IPSerial device mechanism to be too hard for users to get working, even with guessed’s plugin files, so I now make it a habit of using luup.io.open() in all my plugins that need serial communication.

You can find the answer to your question by reading the source of one of those plugins. Sorry to fob you off onto TFS, but you won’t get far with Vera programming without reading other developers’ code.

Agreed, although reading it is one thing, understanding it is a whole other ball game… :smiley:

You’re correct. It was a short-term hack (3yrs ago) to enable folks to connect up “Serial only” devices over IP. We’ve since way moved on, with most plugins now directly supporting some form of configuration to let the user do it directly.

The intent was for MCV and team to effectively let users “directly” register IP-based stuff with Vera, presumably in the Serial Config UI (which is burried)… but it’s never risen to their “implement me” level.

Hi all

It’s amazing how much clearer all this becomes the more you dig into it :wink:

As some of you might’ve seen (http://forum.micasaverde.com/index.php/topic,12947.0.html) I’m now up and running with a Raspberry Pi Ser2net server, which Vera is already capturing USB to serial data for the Envir energy monitor.

Refocusing back on this particular thread, I take it now have the ser2net server up and running, there is nothing to stop me buying a basic USB to serial(RS232) cable and connecting that to the Pi and the TV?

If so, my next question is are you aware of which entertainment device plugins for Vera use Luup.io.open() and could be compatible with the above set up, for a TV or Hdmi Matrix with some tweaking?

Thanks again for all your help.

There are both TV and HDMI switch plugins over on http://code.mios.com. If you have the protocol you’d be able to modify these to the specific devices that you have. They’re old, but functional, so they’ll be easy to understand.

I admire your faith in me ;D

Thanks, i was not sure if they used the luup.io.open, so that’s good I’ll go check them out …

Hi

I’ve just picked up one of these 42 HDMI matrixs (http://www.cmicable.com/en/product-16.shtml) and it looks very similar to the monoprice one, so I’m going to try and use the Vera 44 HDMI Matrix.

I’ve had a look the installation files (http://code.mios.com/trac/mios_monoprice-hdmi-switch/changeset/4/tags/0.2-UI5-merge?old_path=/&format=zip) but I’m unsure what I need to change in them so I can control it via my Raspberry Pi running ser2net?

The Pi is already in use for the current cost plugin.

Can anyone help?

Hi

Does anyone have any ideas on how the current monoprice matrix plugin can work over IP (like the current cost plugin can) rather than a direct serial cable connection ?

I have ser2net up and working and a RS232 cable to connect to the matrix and ready to go.

Considering the current monoprice matrix plugin is just a Device an Implementation file, my guess is that it will need a .lua file created for ito . Which is sadly out of my league to know how to do that.

But working towards a more IP world, I’d like to know what it would take and if anyone is able to help me do it.?

Just summarising my earlier post

Does anyone know how to make the monoprice Matrix plugin work over IP, rather than via a direct serial conne Fiona?

Maybe it will work for you like my edit to the Pioneer Receiver plugin works for me. I appreciate check that thread in plugin for the file.
It was relatively easy considering I am in way over my head.
I changed the telnet port in the implementation file from 23 to 5000 and used the up serial plugin to use the IP of my network to serial adapter, the port was already 5000. I clicked the drop down menu to point to my Pioneer receiver plugin and it worked to my amazement.