Announcement

Collapse
No announcement yet.

Environment Canada Weather plugin - HS3

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

    #16
    perfect. Thanks

    Comment


      #17
      speaking a few items

      Hi Chris,

      Thank you for this plug in !

      version is 3.0.0.4 on win8.1 laptop

      Just a question regarding speaking of device status ?

      I am trying to include a few items in my "good morning" announcements from your weather plugin.

      Action is speak something:
      $$dsa:nwkt_Current_summary:

      The speech says for example "dash 2 deg C"
      instead of "minus two degrees celcius"

      Any idea of how to fix this ?

      Thanks in advance,
      Neil
      Newmarket Ontario

      Comment


        #18
        You could alter what is being sent to the TTS engine with a script:

        Public Sub Main(ByVal param As Object)
        Dim ref As Integer = hs.GetDeviceRef("nwkt_Current_summary")
        Dim currentConditions As String = hs.DeviceString(ref)
        Dim whatToSay As String = currentConditions.Replace("-", "minus")
        hs.Speak(whatToSay)
        End Sub

        This will replace "-" with "minus".

        The script above would need to be placed in the scripts folder with a file extension '.vb'. You could then call it from your event.

        Comment


          #19
          A little too complicated for me !

          The visual option will be fine !

          Thanks
          Neil
          Newmarket Ontario

          Comment


            #20
            Chris,

            The warning device values don't seem to be set to 100 when there is a warning, thus the status graphic does not change.

            Comment


              #21
              Hi Spud, looks like I broke this when I moved to the child devices. The device addresses changed and the code is looking for the old names.

              Try this:

              3.0.0.12

              Chris
              Last edited by chrisgo; November 19, 2014, 12:51 PM.

              Comment


                #22
                Is there a way to create an event that would speak current temperature and today's forecast.

                Comment


                  #23
                  A script like this? Replace with your device addresses in the "hs.GetDeviceRef" lines.

                  Public Sub Main(ByVal param As Object)

                  Dim currTempRef As Integer = hs.GetDeviceRef("yyc-Current_summary_temperature")
                  Dim currTemp As String = hs.DeviceString(currTempRef)
                  currTemp = currTemp.Replace("°C", " degrees C")

                  Dim todayForecastRef As Integer = hs.GetDeviceRef("yyc-Forecast1_summary")
                  Dim todayForcast As String = hs.DeviceString(todayForecastRef)

                  Dim whatToSay As String
                  whatToSay = "Current temperature, " + currTemp + ", " + "Today's forecast, " + todayForcast

                  hs.Speak(whatToSay)

                  End Sub

                  Comment


                    #24
                    I use this (dta commands) under the "speak something option" and just select the devices you want spoken.

                    Don't forget last colon or it won't work !

                    good morning folks. $date. next waste day is regular waste. $$dta:nwkt-Current_title: $$dta:nwkt-Forecast1_summary:
                    Neil
                    Newmarket Ontario

                    Comment


                      #25
                      Originally posted by nsisman View Post
                      I use this (dta commands) under the "speak something option" and just select the devices you want spoken.

                      Don't forget last colon or it won't work !

                      good morning folks. $date. next waste day is regular waste. $$dta:nwkt-Current_title: $$dta:nwkt-Forecast1_summary:
                      Thanks that works great.

                      Comment


                        #26
                        Chrisgo,

                        Looks like the rss feed supplier (govt Canada) is changing their device names periodically by inserting a dash - one time and then an underscore _ next time.

                        When they change it (like this morning) then it creates a "device not found" error when using dsa:nwkt-Current_summary or dta:nwkt-Current_summary in event actions.

                        My report comes from https://meteo.gc.ca/rss/city/on-25_e.xml
                        using your verson .11

                        Could you take a look to see if there might be a fix ?

                        Other than this little glitch the script works great and has been busy with weather warnings all week !
                        Neil
                        Newmarket Ontario

                        Comment


                          #27
                          The device names are hard coded in the plugin.

                          The device address is set to the prefix you configure in the config page. The device code describes the device (eg Current_summary).

                          HS3 combines the address and code with a "-" so if your prefix is nwkt then your current summary would be "nwkt-Current_summary".

                          Is your HS3 device address/code changing? Would it be possible to send me a screenshot showing the differences? Easiest place to screenshot would be the configuration tab of the device.

                          Comment


                            #28
                            Chrisgo,


                            I don't have the devices for last week any more but they all came in formatted like this

                            nwkt-Current-summary instead of nwkt-Current_summary


                            They show up just fine in the device management page but just mess up the speaking when speaking by device codes.

                            I only use current weather, forecast1, and weather warnings in my "good morning" event.

                            If it happens again I will check them all.
                            Neil
                            Newmarket Ontario

                            Comment


                              #29
                              Odd, I don't use "-" in the code for the devices. Please let me know if this happens again and I will try and replicate the issue.

                              Comment


                                #30
                                Looks like EC changed something in the XML file. I've been seeing this error in the logs and there are no updates:

                                error in feed: http://weather.gc.ca/rss/city/on-143_e.xml - Reference to undeclared entity 'eacute'. http://weather.gc.ca/rss/city/on-143_e.xml Line 4, position 64.

                                Comment

                                Working...
                                X