Home AMX User Forum AMX General Discussion

Common Alert Protocol?

Does anyone have any experience with the Common Alert Protocol with AMX? The Common Alert Protocol makes it possible for any system to "watch" or "listen" for an emergency alert from another system and then act on it. Trying to find out if an AMX controller can "listen" to that protocol for an emergency alert and then perform a specific function. (Turn on projector and then switch sources) This is for a Higher Ed environment that is trying to put security measures in place in case of an emergency.

Thanks in advance!
Kris Koch
New AMX Programmer

Comments

  • rrdbstudiosrrdbstudios Posts: 160
    I have no expierence doing this, but upon looking it up quickly.. it shouldnt be a problem..

    for instance, the NOAA website says it updates every 3-4 minutes, have you application establish a conneciton with the site (or whatever server youre using) and check for updates. If there is an update, the xml file associated with it can then be parsed and you can do whatever actions you deem based on your predefined variables.

    For example, I just looked up my state: MD
    http://alerts.weather.gov/cap/md.php?x=1
    There is 1 warning currently, it handles multiple counties; if I were to base this off my own county, it woudlnt have brought up anything. But going off the entire state. The XML file supplied:
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>
    <?xml-stylesheet href='http://alerts.weather.gov/cap/capatomproduct.xsl' type='text/xsl'?>
    
    <!--
    This atom/xml feed is an index to active advisories, watches and warnings 
    issued by the National Weather Service.  This index file is not the complete 
    Common Alerting Protocol (CAP) alert message.  To obtain the complete CAP 
    alert, please follow the links for each entry in this index.  Also note the 
    CAP message uses a style sheet to convey the information in a human readable 
    format.  Please view the source of the CAP message to see the complete data 
    set.  Not all information in the CAP message is contained in this index of 
    active alerts.
    -->
    
    <alert xmlns = 'urn:oasis:names:tc:emergency:cap:1.1'>
    
    <!-- http-date = Fri, 22 Mar 2013 01:37:00 GMT -->
    <identifier>NOAA-NWS-ALERTS-MD124EF4B332C4.SpecialWeatherStatement.124EF4B483E0MD.PHISPSPHI.81d00edf0176dda1816b0d807c4f0474</identifier>
    <sender>w-nws.webmaster@noaa.gov</sender>
    <sent>2013-03-22T09:37:00-04:00</sent>
    <status>Actual</status>
    <msgType>Alert</msgType>
    <scope>Public</scope>
    <note>Alert for Caroline; Cecil; Kent; Queen Anne&apos;s (Maryland) Issued by the National Weather Service</note>
    <info>
    <category>Met</category>
    <event>Special Weather Statement</event>
    <urgency>Expected</urgency>
    <severity>Minor</severity>
    <certainty>Observed</certainty>
    <eventCode>
    <valueName>SAME</valueName>
    <value></value>
    </eventCode>
    <effective>2013-03-22T09:37:00-04:00</effective>
    <expires>2013-03-22T18:00:00-04:00</expires>
    <senderName>NWS Philadelphia - Mount Holly (New Jersey, Delaware, Southeastern Pennsylvania)</senderName>
    <headline>Special Weather Statement issued March 22 at 9:37AM EDT  by NWS Philadelphia - Mount Holly</headline>
    <description>GUSTY WEST TO NORTHWEST WINDS WITH GUSTS AROUND 30 MPH AND
    RELATIVE HUMIDITY VALUES EXPECTED TO DROP AROUND 30 PERCENT WILL
    CAUSE INCREASING FIRE WEATHER CONCERNS THROUGH EARLY EVENING.
    PLEASE BE CAREFUL AROUND OPEN FLAMES AND MAKE SURE TO PROPERLY
    DISCARD SMOKING MATERIALS. SIMILIAR FIRE WEATHER CONCERNS ARE
    POSSIBLE SATURDAY.</description>
    <instruction></instruction>
    <parameter>
    <valueName>WMOHEADER</valueName>
    <value></value>
    </parameter>
    <parameter>
    <valueName>UGC</valueName>
    <value>DEZ001>003-MDZ008-012-015-020-NJZ010-012-013-015>023-027</value>
    </parameter>
    <parameter>
    <valueName>VTEC</valueName>
    <value></value>
    </parameter>
    <parameter>
    <valueName>TIME...MOT...LOC</valueName>
    <value></value>
    </parameter>
    <area>
    <areaDesc>Caroline; Cecil; Kent; Queen Anne&apos;s</areaDesc>
    <polygon></polygon>
    <geocode>
    <valueName>FIPS6</valueName>
    <value>024011</value>
    </geocode>
    <geocode>
    <valueName>FIPS6</valueName>
    <value>024015</value>
    </geocode>
    <geocode>
    <valueName>FIPS6</valueName>
    <value>024029</value>
    </geocode>
    <geocode>
    <valueName>FIPS6</valueName>
    <value>024035</value>
    </geocode>
    <geocode>
    <valueName>UGC</valueName>
    <value>MDZ008</value>
    </geocode>
    <geocode>
    <valueName>UGC</valueName>
    <value>MDZ012</value>
    </geocode>
    <geocode>
    <valueName>UGC</valueName>
    <value>MDZ015</value>
    </geocode>
    <geocode>
    <valueName>UGC</valueName>
    <value>MDZ020</value>
    </geocode>
    </area>
    </info>
    </alert>
    

    -You've got an alert time/date and when it expires.
    -Who sent it and so on..

    you may want to check out page 73-78 of the netlinx programming language guide on encoding and decoding keywords... it would probably help clarify how to handle this with the xml file and use the information accordingly.

    -Paul
  • Has anyone figured out how to send COP alerts in Netlinx via POST & XML? I can get it to work without a problem in PHP using curl_setopt_array, but in Netlinx i just keep getting HTTP/1.1 400 Bad Request$0D$0AContent-Type: text/html; charset=us-ascii$0D$0AServer: Microsoft-HTTPAPI/2.0$0D$0ADate: Sat, 02 Mar 2019 01:50:54 GMT$0D$0AConnection: close$0D$0AContent-Length: 311$0D$0A$0D$0A<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.o

    No matter how I format the headers any thoughts or help would be greatly appreciated.

Sign In or Register to comment.