Announcement

Collapse
No announcement yet.

Communicating Device values in speak and email

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Richard
    replied
    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?


    Thanks.
    Richard

    Leave a comment:


  • Michael McSharry
    replied
    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.

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

    Leave a comment:


  • Richard
    replied
    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?

    Leave a comment:


  • Richard
    replied
    Thanks, I will try this in my communications. Program is working nicely.

    Leave a comment:


  • Michael McSharry
    replied
    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)

    Leave a comment:


  • Richard
    started a topic Communicating Device values in speak and email

    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;
    https://help.homeseer.com/help/HS3/s...ment_variables

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

    Richard

Working...
X