Announcement

Collapse
No announcement yet.

Device string is missing

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

    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

    #2
    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.

    Comment


      #3
      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).
      Mike____________________________________________________________ __________________
      HS3 Pro Edition 3.0.0.548, NUC i3

      HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

      Comment


        #4
        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()
        HS 4.2.8.0: 2134 Devices 1252 Events
        Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

        Comment


          #5
          Sparkman, I will do that, but please teach me, what is the purpose of the string field?

          Comment


            #6
            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.

            Comment


              #7
              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.
              HS 4.2.8.0: 2134 Devices 1252 Events
              Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

              Comment


                #8
                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.

                Comment


                  #9
                  Try this:
                  hs.DeviceVSP_GetStatus(nnnn,hs.DeviceValue(nnnn),ePairStatus Control.Status)
                  Mike____________________________________________________________ __________________
                  HS3 Pro Edition 3.0.0.548, NUC i3

                  HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

                  Comment


                    #10
                    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)

                    Comment


                      #11
                      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()
                      HS 4.2.8.0: 2134 Devices 1252 Events
                      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                      Comment


                        #12
                        Excellent, thank you.

                        Comment

                        Working...
                        X