Office: 503-443-2000 | Fax: 503-968-1877 | Email:
Nu Tech Software Solutions is an Information Technology Services and Software Development company.
We focus on highly available applications for both the Internet and Enterprise. Expertise in both the Microsoft and Linux/LAMP environments.
If you need a Content Management System (CMS) we can do it! We are experienced with both Joomla! and Drupal!
Contact us at: Phone: (503) 443-2000, Email:

Home
About Us
Products
Services
Case Studies
Support
Contact Us
Online Store
Forums
View Cart
Portal
Site Map
FAQ
 Home arrow Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Does the AD2USB currently work for OSX? (1 viewing) (1) Guest
Discuss our ADEMCO Emulator hardware.
Go to bottom Favoured: 0
TOPIC: Does the AD2USB currently work for OSX?
#278
Re:Does the AD2USB currently work for OSX? 2 Months, 4 Weeks ago Karma: 6  
hamw wrote:
Sean,
...Could you give an example of the serial string that comes from the AD2USB for "alarm set- stay" or whatever? Do you have any familiarity with AppleScript and how one would actually implement a parser, that could then execute a trigger action in Indigo?

The following message is what I see after sending the Arm-Stay sequence to my panel:
Code:

[010100011000--------],060,[f70000ff106002002c020000000000],"ARMED ***AWAY***May Exit Now  60"

Sean's last post should point you towards the information you need to understand this message.

Regarding AppleScript. The issue is not as simple as just writing something in AppleScript, you need to know how to write AppleScripts that can be used by Serial-Bridge. I am sure that the only place you will find that kind of help will be on the Indigo Serial-Bridge forum. In the past there have been several discussions about using Serial-Bridge to parse a wide range of input formats. I have attached the sample script that is distributed with Serial-Bridge.
berkinet (User)
Expert Boarder
Posts: 90
graphgraph
User Offline Click here to see the profile of this user
Location: SF Bay Area
Logged Logged  
 
The administrator has disabled public write access.  
#279
Re:Does the AD2USB currently work for OSX? 2 Months, 4 Weeks ago Karma: 1  
Since the information appears to come over in human readable text at the end of the string, shouldn't it be possible to drop the first sections of comma-delimited strings and simply paste the human readable text into the variable in indigo? Seems like that is all that is necessary to see what's going on?
hamw (User)
Senior Boarder
Posts: 40
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#281
Re:Does the AD2USB currently work for OSX? 2 Months, 4 Weeks ago Karma: 2  
What ever works for you I made it possible to look at the raw string and search for patterns like "ARMED" or you can look at a single fixed location value for a 0 or a 1

pseudo code
Code:


if not armed
   if ad2usbmessage.Substring(2,1) = '1'
     Announce "ARMED"
     armed = true
   end
end

if armed
   if ad2usbmessage.Substring(2,1) = '0'
     Announce "DISARMED"
     armed = false
   end
end

mathewss (Admin)
Admin
Posts: 152
graph
User Online Now Click here to see the profile of this user
Gender: Male
Logged Logged  
 
Last Edit: 2010/06/11 21:11 By mathewss.
 
struct SoftwareProfessional {
double salary;
long lunches;
float jobs;
char unstable;
void work;
short tempers;
};
 
The administrator has disabled public write access.  
#285
Re:Does the AD2USB currently work for OSX? 2 Months, 3 Weeks ago Karma: 1  
Could someone please post some working serial bridge code to send to the unit? I have it hooked up and the Ademco panel did communicate one way to the serial bridge log:

16Jun, 2010 9:39:59 PM
Sample one byte = 91
Sample first byte = 48
Sample second byte = 48
Sample third byte = 48
Sample five character string = 00001
Sample rest of string = 1000--------],018,[f70400000018000c28020000000000],"****DISARMED**** ZONES FAULTED

However I don't seem to be able to send a command successfully. I have not issued any codes to try to set an address as I got communication off the bat. My communication settings are 19200, 8, n, 1. Am I missing something here?

Trying to arm the alarm using +3:

tell application "Serial Bridge"
    set connectionName to "AD2USB"
    
    send to source connectionName string "+3"
end tell


Shows this in Serial Bridge log:

16Jun, 2010 11:13:12 PM
Sent 2B 33

and does nothing and returns nothing. Of note, the green light on the AD2USB is steady.

I also tried to send "*" to check faulted zones. No return of data.
hamw (User)
Senior Boarder
Posts: 40
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#286
Re:Does the AD2USB currently work for OSX? 2 Months, 3 Weeks ago Karma: 6  
hamw wrote:
Could someone please post some working serial bridge code to send to the unit?
... ...
Trying to arm the alarm using +3:

tell application "Serial Bridge"
    set connectionName to "AD2USB"
    
    send to source connectionName string "+3"
end tell

Hamw, I might be wrong, but I seriously doubt you will find anyone on this forum with Serial Bridge expertise.

However, before you even get to Serial Bridge, I suggest you just try to connect to your ad2usb from the Terminal. To do this open Terminal and then look for your ad2usb. Use this command:
ls -l /dev/cu.usbserial-*
You will get back something like:
crw-rw-rw- 1 root wheel 11, 1 Jun 16 20:44 /dev/cu.usbserial-A60089Rb

That is the device name for your ad2usb that you will use to connect to it in a live session.

Next, enter:
sudo cu -l cu.usbserial-A60089Rb
Of course, substitute the address of your ad2usb

When you are connected, press ! and answer the questions, you will probably want to accept all the defaults EXCEPT for the address, there you will enter the address you have enabled for the ad2usb. This step is important, if the ad2usb is not configured for an enabled address you will be able to receive, but not send commands.

Once you have configured the ad2usb you will start to see a stream of messages. You can send commands from your keyboard by just pressing the appropriate keys on your keyboard. For example to disarm the system send xxxx1, where xxxx is your code. You do not need to press return.
Press ~. (tilde period) to exit cu.

Now that you are sure you can send and receive commands, you can start to try using Serial Bridge. You should be able to get help on the Indigo Serial Bridge forum, just post some good examples of the input you get in Serial Bridge.

By the way, you were sending "+3" to arm the system, you need to send xxxx3 as in the cu example above.
berkinet (User)
Expert Boarder
Posts: 90
graphgraph
User Offline Click here to see the profile of this user
Location: SF Bay Area
Logged Logged  
 
The administrator has disabled public write access.  
#287
Re:Does the AD2USB currently work for OSX? 2 Months, 3 Weeks ago Karma: 1  
Thanks, this was very helpful. When executing the terminal commands I got back this:

[000000011000--------],018,[f7040000001800002802000000]"
[100000011000--------],014,[f728020000000000],"****DISARMED**** READY TO ARM "
[000000011000--------],018,[f70400000018000c0000],"****DISARMED**** ZONES FAULTED "
!>Keypad Address (18) :
!>Code (0000) :
!>Zone Expanders Y/N Max allowed: 01
!>module #01 ZN 09-16 (N) :
!>module #02 ZN 17-24 (N) :
!>module #03 ZN 25-32 (N) :
!>module #04 ZN 33-40 (N) :
!>module #05 ZN 41-48 (N) :
!Reading configuration.
!UART init.
[100000011000--------],014,[f7030000001400000000],"****DISARMED**** READY TO ARM "
!RFX:0911107,84


I have a large system but don't know how many modules I have. I answered the default (I assume it is simply hitting return) to N for each of these. This hasn't disabled anything, I hope....

Anyway, I entered xxxx3 for Arm Stay, and nothing happened.

[000000011000--------],018,[f7040018000028020000000000],"FAULT 018 BACK GARAGE DOOR "
!Sending......done (<---pressing xxxx3 here)
[100000011000--------],014,[f703000000020000000000],"****DISARMED**** READY TO ARM "
[000000011000--------],018,[f70400000018000c28020000000000],"****DISARMED**** ZONES FAULTED "

I had some work done on our garage and the door reed sensor is not hooked up. Guess I need to replace it or short for now. Any ideas as to why I can apparently send from terminal but AD2usb won't execute?
hamw (User)
Senior Boarder
Posts: 40
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
Go to top





Lost Password?
No account yet?
Register
©2010 Nu Tech Software Solutions, Inc. | Terms and Conditions | Service Level Agreement | Acceptable Use Policies | Contact Us