Announcement

Collapse
No announcement yet.

Device string is missing

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

  • alphatech
    replied
    Excellent, thank you.

    Leave a comment:


  • sparkman
    replied
    Originally posted by alphatech View Post
    Learning a lot from all of you. I used your
    Code:
    Dim CSValue As String = hs.CAPIGetStatus(xxxx).Value.ToString()
    but it is not returning the string, it is returning 0. How do I get to return the string. Like connected, disconnected and etc.
    Sorry, pasted the wrong one. It's this:

    Code:
    Dim CSStatus As String = hs.CAPIGetStatus(NotificationDev).Status.ToString()

    Leave a comment:


  • alphatech
    replied
    I may type something wrong, I get errors in the log
    Compiling script C:\HomeSeer3\scripts\MySQLTeslaCost.vb: 'ePairStatus' is not declared. It may be inaccessible due to its protection level.
    Mar-19 9:29:48 AM Error Compiling script C:\HomeSeer3\scripts\MySQLTeslaCost.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
    Code:
    dim csvalue as string = hs.DeviceVSP_GetStatus(nnnn,hs.DeviceValue(nnnn),ePairStatus Control.Status)

    Leave a comment:


  • Uncle Michael
    replied
    Try this:
    hs.DeviceVSP_GetStatus(nnnn,hs.DeviceValue(nnnn),ePairStatus Control.Status)

    Leave a comment:


  • alphatech
    replied
    Learning a lot from all of you. I used your
    Code:
     
     Dim CSValue As String = hs.CAPIGetStatus(xxxx).Value.ToString()
    but it is not returning the string, it is returning 0. How do I get to return the string. Like connected, disconnected and etc.

    Leave a comment:


  • sparkman
    replied
    Like shill said, it is mainly a legacy thing, so it is not needed for most devices. The only time it should be used is for things like weather forecasts, song titles, etc. that can’t be pre-defined by a status-value pair.

    Leave a comment:


  • shill
    replied
    It's kind of a legacy thing, really - back when the icons weren't included in the config and we had to set the string with html in order to show icons and descriptions (back to HS v1!). With the Status Graphics concept, that's no longer required, so the system simply deals in "Value" and the rest sorts itself out.

    Leave a comment:


  • alphatech
    replied
    Sparkman, I will do that, but please teach me, what is the purpose of the string field?

    Leave a comment:


  • sparkman
    replied
    In your script that you are writing, you can grab the Value using scripting commands. No need for any plugin changes. The command to use is:

    Code:
    Dim CSStatus As String = hs.CAPIGetStatus(NotificationDev).Status.ToString()

    Leave a comment:


  • Uncle Michael
    replied
    Do you want the device string or the text conversion of the device status (from the status graphics tab)? You can access the status text using a replacement variable, like $$DSR(nnnn).

    Leave a comment:


  • shill
    replied
    Hmmm... I need to clean up my Device Type String since I can't tell for certain what device this even is! I assume it's the "Charging State" device? That device should have 9 entries on the Status Graphics tab. Can you post a screenshot of that, please?

    EDIT: Actually it appears to be working fine, since it says in the "Value" line that 0 = "Disconnected", therefore that's what should be shown in the DeviceString.

    Leave a comment:


  • alphatech
    started a topic Device string is missing

    Device string is missing

    Can you please add the string to the device, I'm writing a little script and I would like to take the string from it and put into MYSQL table.

    Thanks
    Attached Files
Working...
X