Announcement

Collapse
No announcement yet.

Speak not substituting wind direction

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

    Speak not substituting wind direction

    Hi Jeff,

    Did not want to loose track of this issue.

    Ever since .70, when the speech happens, the wind direction is not substituting out the words for what comes from weather source.

    My 2 day spoken this morning:

    Good morning. Today. Thunderstorms. High 83. wind's E at 5 to 10 miles per hour. Chance of rain 90%. Tonight. Mostly cloudy skies early, then partly cloudy after midnight. A stray shower or thunderstorm is possible. Low 71. wind's E at 5 to 10 miles per hour. Wednesday. Scattered thunderstorms, especially in the afternoon. High 87. wind's ESE at 10 to 15 miles per hour. Chance of rain 60%. Wednesday night. Scattered clouds with the possibility of an isolated thunderstorm developing overnight. Low 73. wind's SE at 5 to 10 miles per hour. Chance of rain 30%. Sunset is at 8 25 PM. Have a great day.

    the ESE is not substituted with East Southeast when speech happens nor is SE with Southeast. The speech says E S E and S E.

    I use BLSpeech and go in and create all of them except E, N, S, W in there, but is worked prior to .70 without adding anything to BLSpeech.

    Thanks,

    Michael
    HS3Pro & HS4Pro on Win2012R2
    Aeotec, Cooper, Cree, GE/Jasco, Intermatic, LIFX, Fortrezz, OSRAM, RCS, Trane, Zooz
    BLBackup, BLGData, BLRussound, BLSpeech, HSTouch, InvisaLink, HSBuddy, IFTTT, JowiHue, NetCAM, PHLocation, Pushover 3P, Random, rnbWeather, UltraLighting3, weatherXML, ZigBee, Z-Wave

    #2
    I am having same issue. I tried to explain this here
    https://board.homeseer.com/showthread.php?t=189707
    but you said it much better. I don't use Blspeech but my own script using Sonos plugin.

    Comment


      #3
      Something like this:

      Code:
      Sub Main(Parm As Object)
          
      Dim forecast as string
      
      forecast = hs.devicestring(679)
      
      forecast=forecast.Replace(" E ", " East ")
      forecast=forecast.Replace(" ENE ", " East Northeast ")
      forecast=forecast.Replace(" ESE ", " South Southeast")
      forecast=forecast.Replace(" N ", " North ")
      forecast=forecast.Replace(" NNE ", " North Northeast ")
      forecast=forecast.Replace(" NNW ", " North Northwest ")
      forecast=forecast.Replace(" NE ", " North East ")
      forecast=forecast.Replace(" NW ", " North West ")
      forecast=forecast.Replace(" S ", " South ")
      forecast=forecast.Replace(" SSE ", " South Southeast ")
      forecast=forecast.Replace(" SSW ", " South Southwest ")
      forecast=forecast.Replace(" SE ", " South East ")
      forecast=forecast.Replace(" SW ", " South West ")
      forecast=forecast.Replace(" W ", " West ")
      forecast=forecast.Replace(" WNW ", " West Northwest ")
      forecast=forecast.Replace(" WSW ", " West Southwest ")
      
      hs.setdevicestring(679, forecast, True)
      
      End Sub

      Comment


        #4
        This is where it starts getting to be a mess.

        If the text is this "Wind will be slight from the N." it will get skipped.
        Or this "Winds from the N, becoming calm ..." This gets skipped.
        Or this "N winds will bring colder temperatures." This gets skipped.

        This is why I don't want to hard code this in. It becomes an ever growing list of exceptions.
        I have a book about regular expressions. I don't use them enough to be good at them, but will try to find you some regular expressions that would cover the usage where there is not a space before and after the wind direction.
        --
        Jeff Farmer
        HS 3, HSPhone
        My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
        Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

        Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

        Comment


          #5
          I have a regular expressions book as well, perhaps the same one??

          So far this simple replacement script works for me. Weather Underground forecast is consistently "...wind's (direction) at (x) mph... "

          Comment


            #6
            I found a way in a regex. If you use "\bS\b" it finds all instances of S that have anything except another letter next to it.

            Forecast = Regex.Replace(Forecast, "\bS\b", "South", RegexOptions.None)

            You have to import System.Text.RegularExpressions

            I'm going to do some testing with this and if it works like I think it does, I don't mind adding that into the data import.


            --
            Jeff Farmer
            HS 3, HSPhone
            My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
            Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

            Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

            Comment


              #7
              Originally posted by CFGuy View Post

              ...if it works like I think it does, I don't mind adding that into the data import.
              This would be fantastic.

              Comment


                #8
                Originally posted by CFGuy View Post

                I'm going to do some testing with this and if it works like I think it does, I don't mind adding that into the data import.
                Great News. Then what is the Custom "Display/Speak As" setup for?

                .
                Attached Files
                HS3Pro & HS4Pro on Win2012R2
                Aeotec, Cooper, Cree, GE/Jasco, Intermatic, LIFX, Fortrezz, OSRAM, RCS, Trane, Zooz
                BLBackup, BLGData, BLRussound, BLSpeech, HSTouch, InvisaLink, HSBuddy, IFTTT, JowiHue, NetCAM, PHLocation, Pushover 3P, Random, rnbWeather, UltraLighting3, weatherXML, ZigBee, Z-Wave

                Comment


                  #9
                  This was designed for non English speaking users. Early on, some of the providers only gave the individual data for wind direction in the abbreviated form. E, W, SW, etc.
                  I would replace the abbreviation with East, West, etc. It was easy to do when the abbr was the only thing in the text. So to allow for converting to a different language, I would display the English word West and in the textbox the user could enter their word for west.
                  I would then use the custom text in the devices for each direction.
                  There is also custom text for a few other things like conditions and barometer direction.

                  Or if you wanted to just be goofy, you could put 'South ya all' as a replacement for the word South.
                  --
                  Jeff Farmer
                  HS 3, HSPhone
                  My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                  Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                  Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                  Comment

                  Working...
                  X