Vera - Smarter Home Control Forum

Advanced => Programming => Plugins & Plugin Development => Topic started by: drag0n on December 07, 2011, 08:17:59 am

Title: RS232 quad relay controller
Post by: drag0n on December 07, 2011, 08:17:59 am
I have created a plugin that uses an RS232 quad-relay to control my wired projector screen motor.

The relay is available from ebay from seller r32190:
http://www.ebay.com/sch/r32190/m.html?_nkw=relay&_sacat=0&_odkw=relay&_osacat=0&_trksid=p3911.c0.m270.l1313

Each quad relay can control up to 2 screens/window blinds.
The plugin is based on the somfy plugin code, with adaptation to this particular relay's command set as detailed in this document: https://docs.google.com/document/d/1XtO0Z6RytXgoOUks6W0QdVszueB60ekZ9-OiA5Nvhb4/edit?authkey=COf8lCc

The code is based on the following wiring:
relay port 1: screen 1 up
relay port 2: screen 1 down
relay port 3: screen 2 up
relay port 4: screen 2 down

For installation and usage instructions, see the somfy plugin instructions  here: http://wiki.micasaverde.com/index.php/Somfy_Plugin, (skip step 5 which is not relevant).

See plugin files attachment in post #6 below
Title: Re: RS232 quad relay controller
Post by: shady on December 07, 2011, 03:34:24 pm
Well done! Thank you for this!
Title: Re: RS232 quad relay controller
Post by: strangely on December 07, 2011, 05:51:04 pm
That's really good value for money. Not sure what I could use this for, but the HA geek in me says buy one!


@shady, what else can I do with that old somfy motor I got for my awning :D ???
Title: Re: RS232 quad relay controller
Post by: shady on December 07, 2011, 06:16:49 pm
Exactly, lets buy one first and find a use later.

I have been wanting to play with motorizing a few windows using tubular shade motors.  Using either a gear and rack config or cables and pulleys or screw drive.  I have seen people create linear actuators from these motors, but it probably makes more sense to buy linear actuators.  You could try to build one of those framed artwork covers for your flatscreen.  I have always wanted a hidden door (motorized possibly), to what I have no idea, but I can dream can't I.

This relay board is a great solution for turning PC's on/off remotely, among many other things. 

EDIT:  I just went to get one and I am a little confused by the sellers package deals or optional parts.  I see it doesn't come with a power supply, but I can get a small board to run it off of USB 5V.  If I click on the picture of the USB to 12V board it takes me to a PIR sensor, where it mentions "Combo purchase of quad relay module, bidding this item will get a USB power to quad relay power converter. Free gift: ABS housing. (NO mounting screw)".  Does this mean if I buy a $5 PIR sensor with it I get a bunch of free stuff?  @drag0n what did you purchase exactly?  He's got some interesting stuff (NAS/BT box, etc).
Title: Re: RS232 quad relay controller
Post by: drag0n on December 08, 2011, 02:43:52 am
I just purchased the quad relay for $18.5 and added a note to the seller that I want to add an enclosure for additional $7.
I then used my own 12v power supply that I already had hanging around.
Actually, I didn't notice the PIR sensor deal -   the seller is very responsive, you can contact him for clarification. 
Title: Re: RS232 quad relay controller
Post by: ian_vtec on April 05, 2012, 11:37:07 am
I tried installing the plugin on Firmware Version 1.5.346, but failed.
Help please....
Title: Re: RS232 quad relay controller
Post by: drag0n on April 05, 2012, 02:09:04 pm
I've attached the latest version of my plugin, which works fine with UI5 v 1.5.346.
I think the only change I've made is to account for:
Quote
The Lua files must be terminated with a newline character, i.e the last code line shouldn't be the last line in the file.
I plan to have it published at the Mios marketplace for easier installation
Title: Re: RS232 quad relay controller
Post by: ian_vtec on April 05, 2012, 11:32:51 pm
Hi drag0n,

Possible to publish and share the plugin link in Mios MarketPlace?
I tried using your D & I file to create my plugin in MarketPlace and install but it doesnt seem to be able to install.

Thanks for your prompt reply, cheers!
Title: Re: RS232 quad relay controller
Post by: ian_vtec on April 05, 2012, 11:42:36 pm
Hi DragOn,

I saw your plugin, https://apps.mios.com/plugin.php?id=2008
Tried installing but fail to install error message popped up.
Please advise and appreciate you help.

Thanks!
Title: Re: RS232 quad relay controller
Post by: drag0n on April 06, 2012, 04:25:07 am
The attached files work for me with manual installation - with UI5, select APPS, develop apps, luup files, upload the 2 attached files and check Restart Luup after upload.
If it doesn't work for you, please be more specific regarding the error messages you get.
I still couldn't get the app to install through the marketplace. It's my first plugin, so I'm still figuring this out
Title: Re: RS232 quad relay controller
Post by: ian_vtec on April 06, 2012, 11:55:50 am
Hi DragOn,

Its working perfectly!

Thanks for your kind effort in helping.

Cheers!
Title: Re: RS232 quad relay controller
Post by: drag0n on April 08, 2012, 03:14:40 am
@MCV: I've submitted this plugin for approval (#2008).
Please help figure out why it fails to install through the marketplace with this error:
Quote
Error
Installation failed, reason: to install plugin
But works fine when installed manually.
Title: Re: RS232 quad relay controller
Post by: shady on April 18, 2012, 10:53:28 am
I installed through Mios Apps and it seemed to install correctly and create the device.  The device created was nameless and I see it in the drop down list for assignment in the serial port config.  I double checked the device number and I seem to have it correctly assigned to the serial port.  I have restarted Luup and refreshed many times, but I still have an uncontrollable blank device. 

I recently reinstalled my monoprice HDMI switch and had some issue with the serial port failing to connect, but I don't see those error messages here.  My HDMI plugin also took a long time (days) to configure and fix itself.  Adding some of these serial devices just doesn't seem to be as straight forward as it should be.  I think I am patient enough and I try to wait for Vera to drop a working device in my UI, but you get to the point where you consider talking to Vera and/or going out in the backyard and chanting to the sky while waving a stick, hoping the Vera Gods will grant you a device. 

I think I'll try installing the files manually.

Edit: installing manually didn't seem to help
Title: Re: RS232 quad relay controller
Post by: guessed on April 18, 2012, 11:09:22 am
@Shady,
How are you powering all these USB-based devices, are they Bus-powered or on a Powered USB-Hub?  Not sure if this is your Vera2 or Vera3 unit, but the Vera3 units aren't capable of driving too much out of their USB Ports as the power supply is under-spec'd.

If it's a Vera 3, then you can either use a powered USB hub, or a power supply that can dole out more current.  I have the latter, and it works a lot better. 

The symptom of the low power will be failing USB devices, ones that don't always register and/or show up and/or work.
Title: Re: RS232 quad relay controller
Post by: shady on April 18, 2012, 11:30:22 am
@guessed

Thank you, I thought about the power problem, but I only have two USB to Serial cables plugged in and that is it, no hubs.  The HDMI switch and the Quad Relay board.  I could try a powered hub later today and see if that helps.

This early version of Vera3 has a builtin serial port, but it isn't active as far as I can tell.  I'd like it to be though.

Do you have any experience with why the serial adapter for the HDMI switch returned IO errors for a few days then started working w/o errors?  Maybe the USB port can barely handle one serial adapter?

Title: Re: RS232 quad relay controller
Post by: guessed on April 18, 2012, 11:53:54 am
Maybe the USB port can barely handle one serial adapter?
Right on the money...

USB Ports are spec'd to deliver 5v @500mA ea.  I wasn't able to get get them to power one Bus-powered USB Hub with a single USB-Serial attached to it...  Each of these was well below that line, ~150mA ea, and it wasn't able to provide stable power to them.  @CJ looked at the errors I was seeing, and traced them back to USB power issues.

Once I connected the Vera3 to a better 12v power rail everything came good again.  My guess is that the power supply provided isn't rated for the total load that it's expected to deliver (Vera 3 + 5v @1A total)

The Vera2, and it's power supply, was able to do this so you could consider hijacking it's wall-wart to see if that gets you further.... or just break open the closet-o-wall warts and find a bigger one.
Title: Re: RS232 quad relay controller
Post by: drag0n on April 18, 2012, 11:54:37 am
My VeraLite also had trouble powering 2 serial devices and a USB-UIRT, but with a powered USB  hub it can reliably control 3 serial devices and the USB-UIRT.

That being said, the empty device problem seems unrelated to the power issue. The plug-in should display a warning message after reload if a serial device is not configured.
Try a manual install using the xml files posted in post #6 above.
Title: Re: RS232 quad relay controller
Post by: strangely on April 18, 2012, 12:16:22 pm
I also tried to power a dual port WIZnet IP to serial adapter from my V3 USBs over the weekend during a rewiring/tidy up effort, and it wouldn't work! This IP/serial adapter has been fine when powered from by my DirecTV receivers USB port!

I'm going to re-try it from the V3 again as I've also gotten mine up and running with a dedicated 12V DC power supply/UPS since.
Title: Re: RS232 quad relay controller
Post by: shady on April 18, 2012, 05:08:59 pm
Thank you all, I have read the posts about USB power issues but didn't understand how bad it really was, plus having had different experiences with previous Vera's which successfully ran a serial adapter plus a couple USB sticks ( I know I am preaching to the choir here ).

@Drag0n, I did try to manually upload the files from post 6 and they uploaded OK and it restarted Luup OK, but it didn't change the device which still blank/unconfigured.  I will try adding a powered USB hub and report back tonight.
Title: Re: RS232 quad relay controller
Post by: shady on April 19, 2012, 11:37:14 am
Adding the powered USB hub didn't do anything to configure the device, I tried restarting Luup, etc.  I even tried uninstalling the device/plug-in and reinstalling, but ended up with the same unconfigured device.  So I uninstalled and uploaded both sets of files to Vera manually (projections and quadrelay) and manually created a device using the quadrelay files and  after I restarted Luup it seemed to configure properly.  i deleted the projector files as it turns out they weren't needed.  I think the plug-in still needs to be installed manually.

It creates a Projector Parent device and 2 child (Window) Blind devices.  The child devices don't expose controls, you have to go into setting on the device to use the controls.  This works, but it doesn't expose the device in SQ Remote as far as I can tell.  Any suggestions?

Title: Re: RS232 quad relay controller
Post by: drag0n on April 19, 2012, 05:49:38 pm
@shady:
Is the child devices type: urn:schemas-micasaverde-com:device:WindowCovering:1 ?
What's your Vera firmware version ?
Title: Re: RS232 quad relay controller
Post by: shady on April 20, 2012, 02:53:43 am
@shady:
Is the child devices type: urn:schemas-micasaverde-com:device:WindowCovering:1 ?
What's your Vera firmware version ?

Yes they are...now.  I posted here too soon Vera took a while before displaying the devices in the Windows device tab.  Everything is working great and the USB hub is doing its job.

I forgot that SQ Remote doesn't support window coverings in Vera with an up/stop/down control.  The type of control that SQ Remote does offer is open/close and then percentages of open (sliders and presets). 
Title: Re: RS232 quad relay controller
Post by: chris66 on June 06, 2012, 10:24:19 am
Hello, I can see in the relay description:"Turn on/off electrical appliances through RS-232, or over TCP/IP" so is there a RJ45 interface? Or the RJ45 must be connected through an RS-232 adaptator? Thanks.
Title: Re: RS232 quad relay controller
Post by: drag0n on June 06, 2012, 10:31:46 am
This quad relay is RS232 only. The seller offers another relay with IP control.
http://www.ebay.com/itm/Push-mail-trigger-relay-status-email-wifi-wireless-http-power-electrical-switch-/170792623808?pt=LH_DefaultDomain_0&hash=item27c4089ec0#ht_1925wt_1413
I haven't tried it but it should be possible to create a plugin for it.
Title: Re: RS232 quad relay controller
Post by: chris66 on June 06, 2012, 11:21:46 am
Thanks, seems promising!
Title: Re: RS232 quad relay controller
Post by: strangely on June 07, 2012, 12:04:29 am
You could also use this with a WIZnet device to convert IP to Serial.

http://www.embeddedworks.net/pdetail.php?mn=wire&prod=wire014
Title: Re: RS232 quad relay controller
Post by: dforster on June 11, 2012, 11:40:41 am
Hi,

Juts to be clear, do I need both your plugin AND the Somfy plugin for this to work?

Cheers

Dan
Title: Re: RS232 quad relay controller
Post by: drag0n on June 11, 2012, 01:20:50 pm
You only need to install the quad-relay plugin.
Title: Re: RS232 quad relay controller
Post by: dforster on June 15, 2012, 04:48:48 am
Hi,

I ordered the USB to RS232 leads - they came and plug into Vera and work with no drivers. I ordered the relay board as per your link, this came and all seems fine too. I have tried to load the plugin which seems to be OK, this gives me a new device with no name. I gave it a name and then link the RS232 port as per instructions - all OK. I then loose it as far as the Somfy instructions are concerned as nothing seems to be the same on my version of Vera (version: 1.5.346 - Vera 3). From the Somfy - item 4 onwards i cant see how to click the '+' sign etc... Could you possibly do a simple list for me as far as how to install on Vera 3?

Cheers

Dan
Title: Re: RS232 quad relay controller
Post by: drag0n on June 16, 2012, 02:37:12 pm
@dforster
Is the new device of device type urn:ProjectorScreen-com:device:blinds:1 ?
If so it should have created child devices (windowcovering type) for the relays.
If your new device is a generic device, than the plugin wasn't succesfuly installed. Try a manual install as suggested in the previous posts.
Title: Re: RS232 quad relay controller
Post by: dforster on June 18, 2012, 03:47:31 am
Hi dragOn,

I still am not having any joy. Is there any way you could remote into my unit and sort for me?

I tried doing a manual install, then creating a device to match as per the thread - but to no avail.

Cheers

Dan
Title: Re: RS232 quad relay controller
Post by: drag0n on June 18, 2012, 04:00:15 am
@ dforster
Click on the wrench icon of the device you've created
Select advanced.
Post here the contents of the following fields from the advanced tab:  device_type, device_file, impl_file
Title: Re: RS232 quad relay controller
Post by: dforster on June 19, 2012, 06:19:30 am
Hi,

Sorry about this, it makes me feel such a birk...

Please see attached grabs...

device_type    (as its obscured)   urn:ProjectorScreen-com:device:blinds:1

Cheers

Dan
Title: Re: RS232 quad relay controller
Post by: drag0n on June 19, 2012, 06:49:06 am
Dan - it seems that your device file field has D_quadrelay.xml instead of D_quadrelay1.xml
Fix the name and reload vera a couple of times.
Also, verify in Apps/Develop Apps/Luup files that D_quadrelay1.xml and I_quadrelay1.xml were properly uploaded.
Title: Re: RS232 quad relay controller
Post by: dforster on June 19, 2012, 12:56:54 pm
Hi,

IT WORKS - excellent - now I can move to Z-Wave from X10 completely - wonderful (these relays will control my heating and cooling system).

What excellent help - cant thank you enough.

I took the plugin out, uploaded the latest xml files (the early ones hang vera) - restarted and created a new device, associated with the RS232 and it sprung into life.

From a pleased man.

Dan ;-)
Title: Re: RS232 quad relay controller
Post by: TommyE on July 18, 2012, 01:19:23 pm
Hello

I'm wondering if it would be possible to use the relays for something else than blinds/screens?

I have installed the plugin, and it works great, except that I would love to have four screens with each screen representing the various relays with on/off next to it.

Also how can one change the graphics from a windows to eg. an on/off switch or a relay or whatever.


Regards
TommyE



Title: Re: RS232 quad relay controller
Post by: drag0n on July 19, 2012, 02:04:29 pm

I'm wondering if it would be possible to use the relays for something else than blinds/screens?
It's certainly possible to use the quad relay to turn on/off 4 separate devices, however it requires a significant rewrite of the plugin code.    You can give it a try...
Title: Re: RS232 quad relay controller
Post by: TommyE on July 19, 2012, 02:28:19 pm

I'm wondering if it would be possible to use the relays for something else than blinds/screens?
It's certainly possible to use the quad relay to turn on/off 4 separate devices, however it requires a significant rewrite of the plugin code.    You can give it a try...

Hehe, yepp I'm trying.

I first tried to look at your code, but having no experience with LUA I found the Somfy example on micaseverde.com instead.
The problem with that is that there is a lot of references to old stuff, UI4, that I've only read about. (Beeing a Vera owner on my 5. day now.)
I'm finding out new stuff as I go :)

Now I'm struggling abit with what I think is problems opening the serialport right. It is there somewhere, as your plugin worked nicely :)

Also I would love to read from the serialport to get the status from the relayboard, does your code do this, or do you rely on what is set thru Vera?


Regards
TommyE
Title: Re: RS232 quad relay controller
Post by: TommyE on July 24, 2012, 12:40:53 pm

I'm wondering if it would be possible to use the relays for something else than blinds/screens?
It's certainly possible to use the quad relay to turn on/off 4 separate devices, however it requires a significant rewrite of the plugin code.    You can give it a try...

Hello

I have now by created a plugin for the relay board.

It shows up as four on/off powerswitches. I can turn on or off individual relays, and the icons gets updated with a nice and shining light when on.

I have a question that I hope you maybe can lead me in the right direction for.

If I power off and on the relay module then the status information will be out of sync.

The relay module is capable of showing it status by sending the right commands, it also reports back directly after a command.

The question is, how can I read the status from the relay board at intervals defined.

Regards
TommyE
Title: Re: RS232 quad relay controller
Post by: zoot1612 on July 25, 2012, 08:41:27 pm
One way of doing it, not necessarily correct :)


All incoming data should be available from device here: -

I_quadrelay1.xml
Code: [Select]
<incoming>
<lua>incomingData(lul_data)</lua> --points to function incomingData--
</incoming>

In either I_quadrelay1.xml or L_quadrelay1.lua
Code: [Select]

local HADEVICE_SID = "urn:micasaverde-com:serviceId:HaDevice1"
local HAD_POLL = "Poll"
--------------------------------------------------------------------------------
function pollModule()

local poll = luup.variable_get(HADEVICE_SID,HAD_POLL,lul_device)
luup.call_timer("pollModule", 1, poll, "", "")

--put commands to poll device here--

end
--------------------------------------------------------------------------------
function incomingData(lul_data)

--Incoming data handler.
--Place code here to interrogate device and update status etc.

end
--------------------------------------------------------------------------------

--This section goes into device startup function--
if((luup.variable_get(HADEVICE_SID,HAD_POLL,lul_device))==nil ) then
luup.variable_set(HADEVICE_SID,HAD_POLL,"2m",lul_device)
end

luup.call_delay("pollModule", 15, "")

--------------------------------------------------------------------------------

cheers

Zoot
Title: Re: RS232 quad relay controller
Post by: cokeman on July 27, 2012, 08:03:20 am
Hello

I have now by created a plugin for the relay board.

It shows up as four on/off powerswitches. I can turn on or off individual relays, and the icons gets updated with a nice and shining light when on.

I have a question that I hope you maybe can lead me in the right direction for.

If I power off and on the relay module then the status information will be out of sync.

The relay module is capable of showing it status by sending the right commands, it also reports back directly after a command.

The question is, how can I read the status from the relay board at intervals defined.

Regards
TommyE

I'm looking forward to seeing your plugin on apps.mios.com :-D

/Regards

Cokeman
Title: Re: RS232 quad relay controller
Post by: xbmcnut on July 29, 2012, 09:43:03 pm
The attached files work for me with manual installation - with UI5, select APPS, develop apps, luup files, upload the 2 attached files and check Restart Luup after upload.
If it doesn't work for you, please be more specific regarding the error messages you get.
I still couldn't get the app to install through the marketplace. It's my first plugin, so I'm still figuring this out

Hi drag0n. Thanks for the great plugin. I purchased the quad relay and serial/USB adapter from eBay and updated the lupp files with the versions attached here. I see I now have a device called ProjectorScreen and two blinds; Blind #01 and Blind #02. However, when I click on either device and select anything (e.g. Open), I get a warning pop-up appear stating "No implementation". Am I missing something? I'm running 1.5.408.
Title: Re: RS232 quad relay controller
Post by: drag0n on July 30, 2012, 02:31:12 am
@xbmcnut:
Seems like the Impl_file wasn't properly uploaded / installed.
Try the manual install again.
If it doesn't help, post here a snapshot of your advanced tab (see posts #32-33 above)
Title: Re: RS232 quad relay controller
Post by: xbmcnut on July 30, 2012, 03:31:25 am
@drag0n,

Thanks for the prompt reply. When you say manual install, all I did was install through the App store then update the two files attached in this thread. Was that correct? Device_type = urn:ProjectorScreen-com:device:blinds:1 and screenshot shows other settings.

Title: Re: RS232 quad relay controller
Post by: xbmcnut on August 05, 2012, 06:50:41 am
@drag0n,

Thanks for the prompt reply. When you say manual install, all I did was install through the App store then update the two files attached in this thread. Was that correct? Device_type = urn:ProjectorScreen-com:device:blinds:1 and screenshot shows other settings.

Any thoughts?
Title: Re: RS232 quad relay controller
Post by: Brientim on August 05, 2012, 07:02:05 am
Hello,

Try using Up, Down and Stop. Are they active?
Title: Re: RS232 quad relay controller
Post by: xbmcnut on August 05, 2012, 06:38:09 pm
Hello,

Try using Up, Down and Stop. Are they active?

Ah... you are right, thank you. Those commands don't throw back a 'not implemented' message. Now just to see what happens at the relay end when I run those commands.
Title: Re: RS232 quad relay controller
Post by: Brientim on August 05, 2012, 07:12:32 pm
Hello,

I_quadrelay1.xml does not contain the called commands for Open, Close or Dimmer (slidder) so that was the reason behind the message.
Title: Re: RS232 quad relay controller
Post by: xbmcnut on August 07, 2012, 05:08:30 am
Hello,

I_quadrelay1.xml does not contain the called commands for Open, Close or Dimmer (slidder) so that was the reason behind the message.

Thanks Brientim,

It is working now. All four relays respond to the appropriate buttons pushes however there is no visual feedback that the relay is on in the GUI. Is this normal?
Title: Re: RS232 quad relay controller
Post by: xbmcnut on August 07, 2012, 05:11:03 am
Quote
Hello

I have now by created a plugin for the relay board.

It shows up as four on/off powerswitches. I can turn on or off individual relays, and the icons gets updated with a nice and shining light when on.

I have a question that I hope you maybe can lead me in the right direction for.

If I power off and on the relay module then the status information will be out of sync.

The relay module is capable of showing it status by sending the right commands, it also reports back directly after a command.

The question is, how can I read the status from the relay board at intervals defined.

Regards
TommyE

@TommE,

Any chance you could share your code so I can try it out and assist?
Title: Re: RS232 quad relay controller
Post by: Brientim on August 07, 2012, 05:32:22 am
It is working now. All four relays respond to the appropriate buttons pushes however there is no visual feedback that the relay is on in the GUI. Is this normal?

The app was created from another another which uses different files to perform the different functions. In this case the control for up, down and stop are not designed in the same way as the other controls that you would normally see and I only assume that because there is no way for the relay to identify if the blind is either open or closed, it would have been used by a scene which would have triggered the event up (or down) and then issued the stop command after a given time and therefore, there is no real need for the device to display this function.

Title: Re: RS232 quad relay controller
Post by: xbmcnut on August 07, 2012, 05:44:08 am
Thanks Brientim. That makes total sense. Looks like I'll have to start my LuuP training!  :P
Title: Re: RS232 quad relay controller
Post by: TommyE on August 29, 2012, 04:12:34 am
Hello

I have now by created a plugin for the relay board.

It shows up as four on/off powerswitches. I can turn on or off individual relays, and the icons gets updated with a nice and shining light when on.

I have a question that I hope you maybe can lead me in the right direction for.

If I power off and on the relay module then the status information will be out of sync.

The relay module is capable of showing it status by sending the right commands, it also reports back directly after a command.

The question is, how can I read the status from the relay board at intervals defined.

Regards
TommyE

I'm looking forward to seeing your plugin on apps.mios.com :-D

/Regards

Cokeman

Well I haven't put anything up on MyMios, but for those of you who still have an interest in the relay card.
Here are the two files needed to get it up and running as 4 separate relays.

I don't have much experience with Luup code so this is a mix'n'match from the Somfy relay plugin found on MyMios.

It works on my VeraLite.

Regards
Tommy
Title: Re: RS232 quad relay controller
Post by: xbmcnut on August 29, 2012, 04:14:46 am
@TommyE,

Thank you so much! I'll give it a try ASAP. Don't suppose you tried activating the relays with a smart phone?
Title: Re: RS232 quad relay controller
Post by: xbmcnut on August 29, 2012, 04:49:17 am
@TommyE,

Thank you! Works a treat. Simply uploaded your files and edited the main quad relay device adding two more ID's as shown. Really appreciate you uploading your files.
Title: Re: RS232 quad relay controller
Post by: TommyE on August 29, 2012, 11:08:26 am

I'm glad it worked out :)

I would have uploaded the files earlier, but as things wanted it......

What can be done to them, is to clean out references to screens and so on.

I'll see if I get the time to do that, and put it on MyMios one of those days.



TommyE



Title: Re: RS232 quad relay controller
Post by: xbmcnut on August 29, 2012, 06:41:48 pm
Don't suppose you've had any joy with getting feedback from the device in regards to the relay status? Is this even possible with the hardware?
Title: Re: RS232 quad relay controller
Post by: TommyE on August 31, 2012, 03:36:11 am
Yes it is possible with the hardware, there is separate commands for reading the status of the relays.

Problem is that I don't know much aboout Lua coding, and I really need to dig into it.

For the time beeing my little project of using the relays for driving the actuators for my waterbased underfloor heating works quite well, and I will monitor it closely thru the cold season coming up now.

Don't be surprised if I update it with status, but again don't hold your breath :)

Regards
Tommy


Title: Re: RS232 quad relay controller
Post by: xbmcnut on November 25, 2012, 05:19:16 pm
Yes it is possible with the hardware, there is separate commands for reading the status of the relays.

Problem is that I don't know much aboout Lua coding, and I really need to dig into it.

For the time beeing my little project of using the relays for driving the actuators for my waterbased underfloor heating works quite well, and I will monitor it closely thru the cold season coming up now.

Don't be surprised if I update it with status, but again don't hold your breath :)

Regards
Tommy

@ TommyE
Any joy with getting feedback from the quad relay module?
Title: Re: RS232 quad relay controller
Post by: Maco on December 27, 2012, 07:23:03 am
Yes it is possible with the hardware, there is separate commands for reading the status of the relays.

Problem is that I don't know much aboout Lua coding, and I really need to dig into it.

For the time beeing my little project of using the relays for driving the actuators for my waterbased underfloor heating works quite well, and I will monitor it closely thru the cold season coming up now.

Don't be surprised if I update it with status, but again don't hold your breath :)

Regards
Tommy

Tommy,

I am also looking fordward for your learnings and experience. I plan to use this relay to control some of my external lights.

Thank you !
Title: Re: RS232 quad relay controller
Post by: Maco on December 30, 2012, 04:00:10 pm
I have one more question/idea looking at the seller of this quad-relay product:
There is 8-output controller available:
http://www.ebay.com/itm/RS232-oct-power-mosfet-controller-8-way-DC-1A-module-http-web-TCPIP-network-/170941238738?_trksid=p2046732.m2060&_trkparms=aid%3D111000%26algo%3DREC.CURRENT%26ao%3D1%26asc%3D27%26meid%3D4528766664005581407%26pid%3D100040%26prg%3D1011%26rk%3D3%26sd%3D170893392585%26
which I can think of using to controll my several devices (entry gate, garage door, entry door, ...).

Do you think this device can be controlled by the same plug-in with some slight modifications ?
Title: Re: RS232 quad relay controller
Post by: TommyE on January 06, 2013, 01:33:09 pm
I have one more question/idea looking at the seller of this quad-relay product:
There is 8-output controller available:
http://www.ebay.com/itm/RS232-oct-power-mosfet-controller-8-way-DC-1A-module-http-web-TCPIP-network-/170941238738?_trksid=p2046732.m2060&_trkparms=aid%3D111000%26algo%3DREC.CURRENT%26ao%3D1%26asc%3D27%26meid%3D4528766664005581407%26pid%3D100040%26prg%3D1011%26rk%3D3%26sd%3D170893392585%26
which I can think of using to controll my several devices (entry gate, garage door, entry door, ...).

Do you think this device can be controlled by the same plug-in with some slight modifications ?

Hello

Yes, I do believe it will be easy to modify the plugin to support that card.

If you buy, send me the docs. and I will look into it.

TommyE
Title: Re: RS232 quad relay controller
Post by: Maco on January 06, 2013, 02:26:28 pm
Thank you TommyE !

I have contacted the seller to ask the question how different control of this 8-output borad is different from quad relay controller and here is the answer I have got: "The command is similar. The command for the 1st four ways are exactly the same" so this is very promising.
Title: Re: RS232 quad relay controller
Post by: TommyE on January 07, 2013, 08:32:35 am
Thank you TommyE !

I have contacted the seller to ask the question how different control of this 8-output borad is different from quad relay controller and here is the answer I have got: "The command is similar. The command for the 1st four ways are exactly the same" so this is very promising.

Ok, but looking at the specs. I have for my relay I can't really say I understand what the commands for the last four relays will be.
If you can get the documentation I will modify my files to support 8 relays.

TommyE


Title: Re: RS232 quad relay controller
Post by: Maco on January 08, 2013, 01:07:08 pm
TommyE,

Thank you in advance.

I attach documentation. Hope this is "natural" extention of quad relay board.

Maco
Title: Re: RS232 quad relay controller
Post by: Maco on January 08, 2013, 01:08:37 pm
Additionally I was wondering if this shoudl be given new topc/thread as this is not anymore quact relay but oct-realy controller... ::)
Title: Re: RS232 quad relay controller
Post by: TommyE on January 09, 2013, 07:19:57 am
Additionally I was wondering if this shoudl be given new topc/thread as this is not anymore quact relay but oct-realy controller... ::)

Sure I'll make one, when I the modified code is finished :)

TommyE

Title: Re: RS232 quad relay controller
Post by: Maco on January 09, 2013, 08:23:57 am
TommyE,

I cannot reply for your message in Forum. Getting this message:
MiCasaVerde An Error Has Occurred! You are not allowed to access this section

You can mail me on my e-mail which is in my profile (I have made it open now). This is the e-mail: maciek@szalega.com

Maco
Title: Re: RS232 quad relay controller
Post by: spudjr on February 27, 2013, 01:51:41 pm
Since I have the Vera Lite there is no serial port. Has anyone tried this with the IPSerial Plugin. Plan on using a Digi serial to ip converter. Thanks.
Title: Re: RS232 quad relay controller
Post by: Brientim on February 27, 2013, 01:56:12 pm
There are several members user ser2net on varies platforms; including, raspberry pi. See http://forum.micasaverde.com/index.php?topic=12947.0
Title: Re: RS232 quad relay controller
Post by: dlbyers on February 27, 2013, 02:19:35 pm
I went to Radio Shack and bought an over-priced serial to usb converter/cable, but I haven't tried it out yet...  Will that not work in this case?
Title: Re: RS232 quad relay controller
Post by: rossyb on April 30, 2013, 05:40:20 pm
Hi

Sorry to jump in here but I have been looking for ethernet controlled relay boards for a while from my irrigation and ended up buying this one http://www.robot-electronics.co.uk/htm/eth_rly16tech.htm which can deal with higher voltages and currents

It was simple to install on my network and works perfectly.

I would love to see a Vera plugin for it but have not got a clue where to start.

Would any of the work on the quad relay controller be a base to start from?

Thanks Rosss
Title: Re: RS232 quad relay controller
Post by: Wave on September 01, 2013, 11:14:29 am
who can tell with what exactly the device works plug-in? what version of firmware should I use? someone has screenshots of the interface plug-in?
Title: Re: RS232 quad relay controller
Post by: tommysharp on April 06, 2014, 03:59:18 pm
Would be great to know of some good USB-Serial cables that would work with a vera lite and this 4 relay board?
Title: Re: RS232 quad relay controller
Post by: knewmania on April 07, 2014, 12:35:30 am
Would be great to know of some good USB-Serial cables that would work with a vera lite and this 4 relay board?

There is a list on the Wiki:

http://wiki.micasaverde.com/index.php/USBSerial_Supported_Hardware

This the one I am using:

http://www.amazon.com/gp/product/B006PIU2KO/ref=oh_details_o07_s00_i00?ie=UTF8&psc=1


Title: Re: RS232 quad relay controller
Post by: yatagx on March 20, 2017, 12:04:04 am
the link to purchase the relay board is not longer working, 5 year has passed since the 1st post, can anyone tell me which is the correct hardware i need to buy for this plugin?
Title: Re: RS232 quad relay controller
Post by: Maco on March 20, 2017, 04:14:07 am
I am sorry, I am afraid I cannot help.
I see that this e-bay seller does not sell anything any more.

The only idea I would have is to ask this seller where this board can be purchased.

A am attaching the picture - maybe this helps a bit.
Title: Re: RS232 quad relay controller
Post by: yatagx on March 20, 2017, 07:40:42 pm
i cannot find that exact model. however i found this one in ebay, do you think it might do the work???

Title: Re: RS232 quad relay controller
Post by: yatagx on March 20, 2017, 08:52:40 pm
I am sorry, I am afraid I cannot help.
I see that this e-bay seller does not sell anything any more.

The only idea I would have is to ask this seller where this board can be purchased.

A am attaching the picture - maybe this helps a bit.


this is the ebay seller response:
Sorry, I quit this business

so it seem this plugin is dead now  :'(
Title: Re: RS232 quad relay controller
Post by: Maco on March 21, 2017, 02:45:12 am
i cannot find that exact model. however i found this one in ebay, do you think it might do the work???
I am afraid I cannot tell if this will work.

I would search for other type of Vera controlled switch with working plugin.

Very Good Luck ! and if you find anything it would be nice from you to post info here. :)
Title: Re: RS232 quad relay controller
Post by: shallowearth on March 21, 2017, 09:15:53 am
The Itach flex has a relay cable that you can use to configure different types of relays (up to 4 single pole relays, or 2 double, or 1 quad)

You can control the relays with Http calls from a scene by using luup code i believe, no plug in is needed in that case.

I use the flex with their serial out cable to control my audio equipment without a plug in, just a little LUA code in my scenes to send the commands.