From: Dan B. <dbe...@ph...> - 2013-11-30 04:52:08
|
I am not a perl programmer, but I am sure I could muddle my way through modifying an existing plugin to suit my needs. See other comments below. On Fri, 2013-11-29 at 18:26 -0500, Rick Bolen(gm) wrote: > > > My next hurdle is my RCS > > Thermostat. I have purchased a cheap USB to RS485 adapter which I have > > running on /dev/ttyUSB0, but in my looking on the net I am not seeing any > > information on how to set up the thermostat in MH. > > It's been a long time since I originally setup my RCS TR18?, but I > recall that the RS485 needs to support a certain "mode" in order to work > with the TR ( I can't recall the "mode" name currently). > > I've had issues with physical serial ports being able to "parasitically" > power my RS485 module, so "heads up" if that's what you're attempting. I am going to use a USB to RS485 adapter that I bought off of ebay. I am guessing it is powered by the serial port. I haven't had too much trouble in my workings with serial communications. RS485 communication is an addressable serial transmission specification. The RCS communications protocol specifies that a node or address number must precede the data being transmitted. When data is received from a node, the master controller can determine which device sent the transmission by the node number sent with the data. I am not sure what the "mode" is that you are talking about. > > > Do I create an RCS.mht > > file? > > Just a <something.pl> file. Mine's attached. > > I've wrestled with timing for serial comm on every mobo I've used. I've > hacked into the RCSs.pm (attached) for various things, including a > global "temp" value that I print on the ia5 web page footer. I have not really looked into the RCSs.pm file to see how it works as of yet, but from what I remember from building the plugin for OSA, it was simply that you sent a 2 letter command to the thermostat control module, and it sent back a response with the data requested. I don't see that there should be any timing issues. The timing is all in the baud rate of the transmission. What you may be struggling with is waiting for the serial port to return data back from the tstat and acting on the data in an interrupt or event based manner. > > I'm currently wrestling with, what I consider to be, timing issues with > my current mobo. Interestingly, the ia5 interface seems to control the > tstat, but my script file doesn't. I get garbage back in the first ~5 > bytes of my "read". I haven't explored this deeply, but I'm about to > because I need the tstat to work more reliably in these cold months. > I've had it working well in the past. > > > Also, once I get my 1-wire running, I have an outdoor temp sensor. In my > > current Open Source Automation (OSA) setup that I am migrating from, I have > > a plugin that I wrote for the thermostat in C#. One of the things I wrote > > in was the ability to pull the outside temp from an external sensor or > > source, in my case it was my 1-wire sensor, so it will display on my WDU at > > the top. Is this functionality currently in the MH plugin, or am I going to > > have to code that in myself? > > Not sure about this. I always wanted to add some heuristic control to > the tstat based on outdoor conditions, but I've never gotten that far. When I wrote the OSA plugin, it was just a matter of sending the string "A=1 O=00 OT=75" where A=1 is the address of the 1st node on the RS485 chain (the tstat controller), O=00 says that the originator is 00 or the master controller, and then OT=75 tells the tstat to display an Outside Temp of 75 degrees. In the OSA plugin I had it set so that you could take the temp reading from a property value from another plugin such as a 1-wire temp sensor or the weather plugin. I guess in my question, I was just wondering if that functionality currently existed in the MH plugin. > > Good luck, > > Rick |