We have moved at community.getvera.com

Author Topic: Multiple devices to on one serial port  (Read 8202 times)

Offline mhang

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Multiple devices to on one serial port
« on: March 16, 2011, 06:57:09 am »
Ffinally was able to get Vera to talk to one of my Lutron RadioRA dimmer lighting via  Vera-> Global Cache -> RA-RS232 interface. I am stuck with trying to get the 2nd  ( and more) since I am not sure where/how to assign the same serial port already used on the first dimmer device.   I was just creating more devices manually using the same D_xx, I_xx files with a different altid (dimmer id  uses in the api call). Maybe I am approaching the implementation of multiple dimmers incorrectly? Maybe one master device with n children? Thx.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Multiple devices to on one serial port
« Reply #1 on: March 16, 2011, 08:32:32 am »
You need to use one parent Device, representing your Lutron controller, that has multiple children.  The Parent will be associated with the Serial port, and it will need to create, and manage, the interaction with the Children (representing the Lights, etc, on the Lutron device)

The Weather plugin does this sort of co-ordination, except it's using a Web request to get the data, and there are a "fixed" number of Children.

The Paradox and GE Alarm Panels do the same sort of thing, with Serial ports, so they're the best "complex" plugin to look at in terms of code examples.

Each of these is listed with full source on code.mios.com


When you do this, the parent device will "handle" all the children, receiving IO from the RA-RS232, and working out how to find the child and set the right status on it (for lighting, being changed directly at the light switch) as well as how to send changes to it (over RS232) when an "Action" occurs in MiOS.

Offline mhang

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Multiple devices to on one serial port
« Reply #2 on: March 17, 2011, 07:09:35 pm »
Thanks for the advice. It's  working now. I will continue to polish up the code, but I was able to do basic dimming/switching on all my lights/switches. It was less work than I expected since I am able to use the existing DimmableLight.

Too bad, I have an older Lutron RadioRa system which does not have the ability to poll for dimmer level status if someone manually used the wall dimmer. It has only ability to poll for On/Off.  

Overall, I am pretty happy with Vera  and its ability to allow for easy extension.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Multiple devices to on one serial port
« Reply #3 on: March 20, 2011, 05:14:49 pm »
You may want to post/attach your code so that others may benefit from your research (or make suggestions to improve etc)

Offline cwca02

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: Multiple devices to on one serial port
« Reply #4 on: March 21, 2011, 12:36:53 am »
Hi, I also have the Radio Ra system and would like to continue using it.  I'd like to do it directly through the vera box however.  It would be great if you could post your code so I could have a look at it and see what I'm up against. 

Thanks,
Craig

Offline mhang

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Multiple devices to on one serial port
« Reply #5 on: March 21, 2011, 11:46:35 am »
Thanks to various members to make this first stage of the plugin possible.  I am pretty new to Vera, so there are still alot to understand to make the code more robust.  I guess you can call this a pre alpha since it took me a few nights to do this and only tested so far over the weekend.  I welcome any feedback and will make this plugin available to code.mios.com once it's robust enough.  

@craig - please take a look and give it a try, ping me if you need help with any setup and/or questions.

@guess/others. This coming weekend, I would  like to introduce feedback/confirmation once the cmd has been excuted. Not sure where/what to set. I would image it's some job status I can set that "all devices" have? Though I have yet seen to seen any failure so far, but I like the idea of seeing a positive/negative feedback.


-Mike
« Last Edit: March 21, 2011, 01:33:31 pm by mhang »

Offline cwca02

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: Multiple devices to on one serial port
« Reply #6 on: March 24, 2011, 02:27:21 am »
Hi Sorry for the delayed response.  I still have not decided to buy the Vera yet.  I suppose I'll do it and then I'll give your plugin a try.  Thanks for posting that code.  I'm not an experienced user unfortunately but I have used plenty of other home automation products over the years.  I'll let you know how it goes.

Thanks again!

Offline cwca02

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: Multiple devices to on one serial port
« Reply #7 on: May 18, 2011, 04:20:40 am »
Hi Mike, I did finally buy the Vera 2 and have been playing around with it to do basic things and have been pretty successful.  I also purchased a GC-100 and am ready to get things working with my Radio Ra system.

I don't understand how to use your plugin however?  Sorry to be so green but can you tell me what to do?  I have downloaded the files but I don't know what to do with them now?

Any assistance you might offer would be appreciated.  Thanks!

Craig

Offline shady

  • Hero Member
  • *****
  • Posts: 1331
  • Karma: +11/-0
  • This monkey knows his Window Coverings!
Re: Multiple devices to on one serial port
« Reply #8 on: May 18, 2011, 05:51:39 pm »
First you'd want to upload them to Vera using the Luup Files Tab in Mios Deverlopers at the top of the UI.  At the bottom of that tab you'll see fields to browse for and upload files, make sure you check the restart luup engine checkbox before uploading then close and be sure to click save in the upper right corner of the UI.  Then you would create a device using the create device tab also in Mios Developers.  Name the Device, (RadioRa or other) and put the filenames of both the D & I files in the appropriate fields and close and click save in the UI again.  Your USB serial adapter should be recognized and found in the serial adapter tab of Mios Developers and in the dropdown box at the bottom you'll want to select the name of the device you just created (RadioRa).  Then close and click save in the UI again.  IT may take several minutes, but device should populate in the UI and your serial adpater should be linked to that device.

From there I am not sure, but that should get you pretty close to controlling things via RadioRa (sorry if any names are off, I am going by memory).
Vera3 1.5.346, Schlage (3)DB (2)Lever, Kwikset (1)Lever, RCS TZ43 Thermo, (2) Vizia RZI06-1LX 600W Dimmers, (17) Monster (Leviton) Dimmers (6) Monster (Leviton) IWC Scene Controllers (1) Etherrain-8, (3) HSM 100's (1)GE 3-Way set

Offline cwca02

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: Multiple devices to on one serial port
« Reply #9 on: May 20, 2011, 02:18:03 am »
Thanks Shady!  Will try it tonight

Offline mhang

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Multiple devices to on one serial port
« Reply #10 on: May 21, 2011, 03:06:11 am »
It's actually been while since I touched Vera, it's been pretty solid for the last 2 months.

I recall spending quite a bit of time with just configuration/connectivity, thus test every connection point  manually first. These are what I recall off my head.
RA Systems --> RA-RS232 --> GC-100 --> Vera2

I strongly recommend that you download the iTest from GlobalCache to test connectivities. You can also use this tool to send RA commands such as "BP,16,ON" to see if you can on all your lights.

After that you can follow shady's instructions. Just additional note that you need to change all the IDs setup during your RS-RS232 for your dimmers/switch in the variables, "DimmerIds" and "SwitchIds".

Feel free to ping me if you have questions. Work has been pretty crazy, thus I may not be as responsive as I would like to.

Offline whited

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: Multiple devices to on one serial port
« Reply #11 on: January 24, 2015, 03:35:13 pm »
Has anyone been able to run this app with UI5?  ???

Offline jamenjay

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Multiple devices to on one serial port
« Reply #12 on: June 09, 2015, 10:26:25 pm »
Just thought I would mention.... I have vera edge with USB hub running RadioRA and Russound no problem

Im going to look at including master controller to radiora rs232 device in hopes of some local adjustment feedback ..... probably a week or two before I really get to it