Facility Control

 View Only
  • 1.  Programming device names

    Posted 05-16-2019 22:18

    I have two ultritouch panels, which both have the same template file uploaded to them. However, I would like each template to reflect the name of the panel it's on dynamically, so that it populates when opened on the Ultritouch. I know I can grab the device name via the config settings of the device, but what's the magic code trick to get it to pull the device name when on the panel itself?



  • 2.  RE: Programming device names

    Posted 05-21-2019 13:29

    Hi Rob.

    To answer your question correctly, I just want to confirm which pieces of hardware we are talking about and what the goals are.

    When you are talking about a template, are you talking about a CustomPanel (*.grid) or are you talking about an Ultrix/Ultricore Router Panel (configured by templates served-up by the Ultrix/Ultricore itself)?

    When you mention wanting the template to reflect the name of the panel it's on dynamically - do you mean you want to show the name that you assigned to that particular Ultritouch?

     

    Are there any other pieces of information that you want to have change dynamically or just the display name?

    If you can confirm these things or correct me if I have missed something, I'll be happy to provide you with a solution.

     

    Cheers.

    James


    #DashBoard


  • 3.  RE: Programming device names

    Posted 05-21-2019 17:45

    James, thanks for getting back to me. You’re pretty much right on - it’s a .grid on two different ultritouch panels. I’d like to have one .grid template on both, but each of them should be receiving their label parameter from the name of the panel it’s on. IP address would be neat too.

    I realize these are easy to view in the config menus on the panel, but it’s handy to have them visible at a glance.


    #DashBoard


  • 4.  RE: Programming device names

    Posted 05-21-2019 22:00

    Hi Rob.

    I would recommend starting with a specific Ultritouch and adding it as a "Device" to your CustomPanel:

     

    Make sure you give the new context an ID and select "Configure"

     

    Select your Ultritouch from the tree:

    Once selected, choose "Apply/Close" and refresh the panel (F5)

     

    Select the "Add Parameter to Panel" option from the toolbar, draw where you want to name to go, and search for "FF01" (the Device Display Name)

     

    Double-click on the text field and change the widget hint from "Text Entry" to "Label"

     

    Add additional parameters as you desire.

     

    Once you're done, we are going to point it at Ultritouch's internal device instead of a specific device. This requires a bit of a trick in the source code.  You'll need to replace the Ultritouch's unique identifier with Ultritouch's internal idenfitier - it's this part of the context ID:

     

    You'll want to replace everything in the "objectid" attribute before the "<br>Slot 0<br>Ultritouch Device" with "db-ultritouch-frame".  Once you do this, the parameters will disappear from the panel until you upload it to Ultritouch.

     

    Here is the example panel I was working from:

    <abs contexttype="opengear" gridaspect="false" gridheight="203" gridwidth="1304" touch="true" virtualheight="203" virtualwidth="1304">
    <meta>
    <context contexttype="opengear" id="ultritouch-context" objectid="db-ultritouch-frame&lt;br&gt;Slot 0&lt;br&gt;Ultritouch Device" objecttype="Ultritouch Device"/>
    </meta>
    <param contextid="ultritouch-context" expand="true" height="56" left="4" oid="0xFF01" showlabel="false" style="font:bold;size:Bigger;" top="3" widget="label" width="343"/>
    <param contextid="ultritouch-context" expand="true" height="33" mid="256" oid="network.ip" right="3" showlabel="false" style="bg#dark;bdr:etched;fg#FFFFFF;" top="2" width="192"/>
    </abs>

     

    Hope this helps.

     

    James

     

     


    #DashBoard


  • 5.  RE: Programming device names

    Posted 05-21-2019 23:30

    Neat trick, thanks! I got it to work. I'll try adding IP addresses tomorrow.


    #DashBoard