Cynical Network: Connection to Cytech Comfort

Posted on
Mon Dec 23, 2013 12:29 pm
HenleyBranch offline
Posts: 10
Joined: Mar 18, 2013

Cynical Network: Connection to Cytech Comfort

Perry - Thanks so much for producing your Network plug-in.

A little about me: I have two home control systems running, one based on Cytech's Comfort for security and security-related X10 control of lights, and another based on Perceptive Automation Indigo running on a Mac server as part of our home network of Macs, controlling iTunes library, multi-device iOS control of X10 lights, scene setting etc. Both very reliable independently, I am trying to connect them. Your plug-in seems ideal, as Comfort communicates using its serial protocol through TCP/IP.

I followed your instructions, and have connected to Comfort (green circle 'connected' in Devices in Indigo). So far, so good. However, I seem not to be able to get an action to communicate with Comfort working, as per your Tivo example.

It seems that Comfort needs a log-in, essentially the security code for the alarm, before it will respond. I have made Send Text action to send it in the correct form as set out in the protocol document http://www.cytech.biz/serial_interface_protocol.html?category_id=99 on page 3, but no joy. Do you have any suggestions?

Do you have any recommendations on the best way to monitoring network traffic with the Network plug-in? I presume it isn't showing up entirely in the Indigo Log Window.

It feels like I am really close to getting these two things connected - your plug-in connects Indigo to Comfort and Cytech have confirmed to me that the serial protocol document is the protocol Comfort uses over TCP/IP.

Any assistance gratefully received!

Henley

Posted on
Tue Dec 24, 2013 4:23 am
HenleyBranch offline
Posts: 10
Joined: Mar 18, 2013

Re: Cynical Network: Connection to Cytech Comfort

I got this back from Cytech Support:

"After connection you need to log in by sending the binary character 03 (which is the start of line character) followed by LI1234 assuming 1234 is your user code and return. The trick is in sending binary 03 - "/03" before each command.

Now you can enter the commands in the serial protocol."

I have got this working in Clear Terminal, but am still struggling with Cynical Network. I created a send text action "/03 LI1234", but no response.

Any suggestions gratefully received.

Posted on
Tue Dec 24, 2013 10:50 am
HenleyBranch offline
Posts: 10
Joined: Mar 18, 2013

Re: Cynical Network: Connection to Cytech Comfort

Just a note to answer my own post: I have got Indigo connected to Cytech Comfort using the Cynical Network plugin.

If anyone else wants to do this, you need to create an Indigo action to connect and login to Comfort.

This needs to be the following: "/03LIxxxx" where "xxxx" is your user code.

After that create actions to listen to the codes published in the protocol on the above link.

Thanks once again Perry for creating this. Magic stuff.

Henley

Posted on
Sat Feb 01, 2014 6:52 pm
bullsim offline
Posts: 10
Joined: Oct 17, 2013

Re: Cynical Network: Connection to Cytech Comfort

I can't seam to get this to work. When you say put this in do you mean with quotes? I have tried an action group with the connect and this and it doesn't work. Any chance you could elaborate? I am getting frustrated with comfort interface and I am sure I am just being dense!

cheers

Simon

Posted on
Sat Feb 01, 2014 11:13 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Cynical Network: Connection to Cytech Comfort

If the issue is getting a character with value 3 into an outgoing message, you can simply use
Code: Select all
\x03
. That's a backslash character. So try \x03LI1234. Or use a plugin formula:
Code: Select all
="\x03LI" + passcode

where passcode is an Indigo variable where you put your code.

Cheers
-- perry

Posted on
Mon Feb 03, 2014 5:00 pm
bullsim offline
Posts: 10
Joined: Oct 17, 2013

Re: Cynical Network: Connection to Cytech Comfort

thanks! I have it working now! I am so happy! :)

Posted on
Sat Dec 23, 2017 6:07 am
HenleyBranch offline
Posts: 10
Joined: Mar 18, 2013

Re: Cynical Network: Connection to Cytech Comfort

Hi there Perry

First of all, thank you so much for writing your plug-ins. My Denon amp is playing festive tunes all triggered by your Denon plug in - fab stuff. It's that time of year when I get a few hours to sit down and develop the HA integration thing a bit further. I am back to integrating my Cytech Comfort system with Indigo. Indigo is more versatile but all of my lighting / sensors / security / HVAC is very stably controlled by Comfort.

A while ago now I got a connection going using your Network plug-in, which allowed Indigo to react to events through monitoring the RS232 of the Universal Connection Module (UCM) of the Comfort system using 'recognised input' of your Network plugin. The next step is to get true two-way connectivity going, which should be possible with your plug-in, but I am not sure I every really achieved previously. I have set myself the challenge over the holidays!

I have Indigo successfully connected to Comfort using your plug-in, so my question is, based on the published protocol http://www.cytech.biz/download_files.php?item_id=780 (extracts below) what do you think should be in the 'send text' action to get Indigo to trigger Comfort events? The key seems to be to get the STX and Carriage Return defined properly. I have tried various tests to turn on a light in the room I am in (I can trigger using a response within Comfort so I know that works) using what I thought was the correct format but without success. Any advice very gratefully received.

The published protocol says this:

Message Format
9600 bits per second, no parity, 1 stop bit, no flow control
Each message is preceded by a STX character which is defined as 03 hexadecimal and terminated by 0D hex (Carriage Return character)
The command consists of 2 characters followed by a variable number of characters
E.g. to switch on Output 21, the following command is used
<STX>O!1501<CR>
The UCM will reply
<STX>OP1501<CR>

Logging in
Before the UCM can accept and commands or send status, it needs a valid login. This is done using the LI login command LIxxxxxx where xxxxxx is a 4 to 6 digit numerical code. If the code is valid, UCM reports LUnn where nn is a user number 1 to 16 or 254 for Engineer. If invalid LU00 is seen. E.g. LU09 means Login by User 9.
Once the UCM is logged in commands are accepted and events are reported by the UCM

Getting Started
Any RS232 terminal monitor program can be used to test the communications with the UCM, including Hyperterminal, which is included in Windows
To set up Hyperterminal, Run Hyperterminal, set the Properties to
Connect Using: Direct to COM port (whichever port the UCM is connected to)
Configure:
 Bits per second 9600  Data Bits 8
 Parity None  Stop Bits 1
 Flow Control None
Go to the Settings Tab
Set Emulation to “Auto detect” Press ASCII SETUP
Check the boxes for
ASCII SENDING
Send Line Ends with Line Feeds Echo Typed characters locally
Line Delay and Character delay = 0
ASCII RECEIVING
APPEND Line Feeds to incoming Line ends Wrap Lines that exceed terminal width
In the Menu Bar, select View, Font
Select the Terminal Font, regular, font size 9 and press OK Save the session with a file name e.g. ucm.ht
The STX character for the UCM is <CONTROL> C. (This is hexadecimal 03, which is not the standard character for STX). This appears as a Heart symbol ©
Type <CONTROL>C UP000004, all in capitals which appears as
©UP000004
Which means Upload 4 bytes from the COPY EEPROM starting from 0000 address.
If the COPY EEPROM is installed you will see a reply something like
©DP000004BBAA120184
DP means download from the COPY EEPROM, the next byte is 04, which is the no of bytes to follow. The next 4 bytes are data from the EEPROM address and followed by a checksum byte

____

Any suggestions?

Many thanks

Henley

Posted on
Sat Dec 23, 2017 11:02 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Cynical Network: Connection to Cytech Comfort

Looking at the protocol spec, it looks like every line starts with a x03 byte and ends with newline. So set the device's line ending to Newline, and start every line you're sending with \x03 (backslash x zero three). For example, a LI command might be \x03LI123456. Every line you're receiving will also start with a 03 byte, but it sounds like you're already handling that right. The good news is that if you have working triggers, you've already worked out the serial parameters and basic framing.

I don't have your device, so I can't experiment with it. The protocol doc suggests playing around with a terminal emulator. You can try to use the nc(1) tool (open Terminal, say man nc) if you're comfortable with unix commands; the \x03 character can be typed by holding down the control key and hitting "c".

Good luck!
-- perry

Posted on
Sun Dec 24, 2017 5:02 am
HenleyBranch offline
Posts: 10
Joined: Mar 18, 2013

Re: Cynical Network: Connection to Cytech Comfort

Thanks for the prompt response, Perry.

That did it! My error was simply in setting the plug-in's line ending to 'Carriage Return' not NL/CR Windows - your reference to Newline prompted me to try this, and it worked.

Thanks so much. I shall enjoy linking up the technology over the festive break.

Have a good Christmas, and thanks once again for giving your expertise to this community. Sincerely appreciated.

Henley

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron