Announcement

Collapse
No announcement yet.

Problem with using hs.Devicestring

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

  • Problem with using hs.Devicestring

    I'm not sure where to post this, so I will start here.

    I am trying to display conditions from the plugin on a betbrite sign. Devicevalue works fine when used to get temp and so on from UltraWeatherBug, but when using hs.Devicestring to retrive conditions or anything with weather text that is contained in a device I get extra characters in front of the text being displayed on the sign. I don't have this if I am just feeding my own text to the sign.

    Does anyone know why I have those extra charcters and how to fix that? I'm not to great at scripting.

    Thanks

  • #2
    Never tried it but I think BLTouchString can be used to filter out HTML code in devicestring: http://bladeplugins.no-ip.org/Downlo...#BLTouchString
    Jon

    Comment


    • #3
      Originally posted by Larryguy50 View Post
      I'm not sure where to post this, so I will start here.

      I am trying to display conditions from the plugin on a betbrite sign. Devicevalue works fine when used to get temp and so on from UltraWeatherBug, but when using hs.Devicestring to retrive conditions or anything with weather text that is contained in a device I get extra characters in front of the text being displayed on the sign. I don't have this if I am just feeding my own text to the sign.

      Does anyone know why I have those extra charcters and how to fix that? I'm not to great at scripting.

      Thanks
      Are you updating the betbrite sign via script?
      Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

      Comment


      • #4
        As Jon00 says BLTouchString does a fine job of this, I had the same problem with the condition of the UltraWeatherBug device string. I used this script to put the condition in a virtual device and used that to send where needed.

        PHP Code:
        ' Strips out some weird charaters so the weather condition from ultraweatherbug speaks correctly.

        Public Sub Main(ByVal Parms As Object) 

             hs.SetDeviceString ("Z53",hs.Plugin("BLTouchString").GetFormattedDeviceString("(26"),TRUE)
         
        End Sub 
        Marty
        ------
        XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
        Playing with HS3 a bit but it's just play at this point.

        Comment


        • #5
          Yes, I am using a script I found to send the device info to the sign. I tried to reference the same device to a touch screen object and it reads it correctly. Maybe I will have to use the BLTouch String as others suggested.

          Comment


          • #6
            Originally posted by Larryguy50 View Post
            Yes, I am using a script I found to send the device info to the sign. I tried to reference the same device to a touch screen object and it reads it correctly. Maybe I will have to use the BLTouch String as others suggested.
            Are you using SnevlBB or LEDAM for the interface to the BetaBrite? If it is SnevlBB I can help you out. I've never had LEDAM and so am not qualified to do much help.

            It sounds like you just need a way to extract the visible text from the HTML in the device string.

            Steve

            Comment


            • #7
              I am using LEDAM. Another question...SnevlBB is all script base? No event triggers-commands?

              Comment


              • #8
                Originally posted by Larryguy50 View Post
                I am using LEDAM. Another question...SnevlBB is all script base? No event triggers-commands?
                Larry,

                It is script based, so it is probably a little more work than just picking an action from an event. I do provide a bunch of starter scripts that will do most of what you would want to do.

                Send me an email at snevl at msn dot com and I'll be happy to help you customize SnevlBB for what you want, if you want to try to use SnevlBB.

                Steve

                Comment


                • #9
                  You can also simply disable the images you are trying to remove by setting UltraWeatherBug > Options > HomeSeer Device Options > Device Image = No.

                  Regards,
                  Ultrajones
                  Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                  Comment


                  • #10
                    that still leave a " " charature in there that hs reads
                    detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

                    Comment


                    • #11
                      UltraWeatherBug HSPI version 1.0.4587.29312 removes the leading HTML encoded space.

                      Regards,
                      Ultrajones
                      Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                      Comment

                      Working...
                      X