No announcement yet.

Communicating Device values in speak and email

  • Filter
  • Time
  • Show
Clear All
new posts

  • Communicating Device values in speak and email

    Thank you in advance,

    I would like to send and speak device values from mcsSprinklers in HS speak and email communications as well as web pages.....

    For example ( I realize... this is a reference to show what I am trying to do;

    Sending $$DVR:66: last zone on value. And then sending $$DVR:69: temperature - from the device values of S66 and S69 from the General Status page. I understood them to be CAPI values that with the "correct reference" and "device value" I could use the variable in forms in HS3. With my example and use of the above, I get a spoken and email of -1 as the variable, so I am not defining the correct term or value.

    Replacement values;

    Would you clarify how I can access the application values for my purposes?


    HS3 Standard Edition

  • #2
    Generally mcsSprinklers uses device code rather than reference. The default house code is S, but whatever you are using will show on GeneralStatus. This means you substitution variable will be $$DVCS66)


    • #3
      Thanks, I will try this in my communications. Program is working nicely.
      HS3 Standard Edition


      • #4
        When I use the General Status values - $$DVC:#VALUE:

        I get an output in email of 0 value on R1-16 - $$DVC:R1: or $$DVC:R16: (they show % of moisture calculated)
        See attached screen shot 1.

        Other DVC in my email event, such as S69 show a real value. FYI, the current temperature as collected. 86
        Values for DVC S84 and others show 0 value. See attached screen shot 2.

        What is the issue on getting the values then?

        HS3 Standard Edition


        • #5
          In HS2 a device had status, value and string. In HS3 a device has value, string and PED. In HS2 one turned a valve on and off by changing DeviceStatus to on or off. HS3 uses DeviceValue to perform the control so DeviceValue is changed to the numeric equivalent values for on and off.

          mcsSprinklers put what was in HS2 DeviceValue in PED and what was in HS2 DeviceStatus is now in HS3 DeviceValue. Moisture content for the zones is now in the HS3 PED. The DeviceString is what you see on GeneralStatus and in HS3 Device Management. The DeviceString has HTML formatting to show nicely on browser pages, but speaking HTML and probably emailing HTML is not what you want.

          There is no replacement value for PED entries. Scripting is needed to send email and speak and in the script the data from the PED as named item "value". This can be done using mcsSprinklers scripting function "DeviceValue(DC)" where DC is the device code or it can be done using HS3 scripting for the PED object..

          mcsSprinklers scripting also provides the RemoveHTML function that will strip the HTML. This would be used in conjunction with the DeviceString. For example (untested example) using Device with reference 123.

          Sub Main(parm as object)
                 Dim DesiredTextForSpeaking as String = hs.PluginFunction("mcsSprinklersP","","RemoveHTML",hs.DeviceString(123))
                 hs.speak (DesiredTextForSpeaking)
          end Sub


          • #6
            Thank you,

            I will review and see how the remove HTML could work for me in speak and emails.
            I am looking for method to get speech and email for specific activities, and events as is email for next days watering and times to completion. Or summary of upcoming watering plan of action.
            Getting there -
            The Zones Summary;
            Zone has 0 minutes left. Reported at 2:54 PM .
            Lowest Zone reported 77 % moisture.


            Update, the information in Run List is also the information I am trying to communicate in speak and or email for upcoming events.
            Is this available using $$VC:VALUE , I do not see a device code I can use? From your hs.DeviceString(123)) reference,

            I am not clear how this would be scripted or used in the ;

            Sub Main(parm as object)

            Dim DesiredTextForSpeaking as String = hs.PluginFunction("mcsSprinklersP","","RemoveHTML",hs.Device String(123))
            hs.speak (DesiredTextForSpeaking)

            end Sub

            example? Is this information available for my use?

            HS3 Standard Edition