Page 1 of 1

Changing push email alert from °C to °F

Posted: Tue Dec 02, 2014 3:29 pm
by Ladd
I finally figured out the correct information to put into the email section on the "Push Services" tab so that now Meteobridge can successfully send email. On the "Subj # Body:" line, I am using the code listed below, and receive a nicely formatted email.

Would someone please tell me what setting to change in Meteobridge, or what instances of text in the code below I can change to receive the email listing °F instead of °C. Or both scales, if that is easier.

I tried changing "° C" to "° F" which in the resulting email changed the C to an F, but didn't change the temperature itself from a °C temp to a °F temp.

Ladd
Screen Shot 2014-12-02 at 8.26.50 AM.png
Screen Shot 2014-12-02 at 8.26.50 AM.png (47.83 KiB) Viewed 3296 times
-----------------------------------------------------------------------------

weather at [hh]:[mm]\nContent-Type: text/html#<html> <style type='text/css'> #table-2 { border: 1px solid #e3e3e3; background-color: #f2f2f2; width: 500px; border-radius: 6px; -webkit-border-radius: 6px; -moz-border-radius: 6px; } #table-2 td, #table-2 th { padding: 5px; color: #333; } #table-2 thead { font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; padding: .2em 0 .2em .5em; text-align: left; color: #4B4B4B; background-color: #C8C8C8; background-image: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#e3e3e3), color-stop(.6,#B3B3B3)); background-image: -moz-linear-gradient(top, #D6D6D6, #B0B0B0, #B3B3B3 90%); border-bottom: solid 1px #999; } #table-2 th { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 17px; line-height: 20px; font-style: normal; font-weight: normal; text-align: left; text-shadow: white 1px 1px 1px; } #table-2 td { line-height: 20px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; border-bottom: 1px solid #fff; border-top: 1px solid #fff; } #table-2 td:hover { background-color: #fff; } </style> <body> <table id='table-2'> <thead><tr><th>Sensor</th> <th>Current</th> <th>Today (min)</th> <th>Today (max)</th></tr></thead> <tbody> <tr><td>Outdoor Temperature</td> <td>[th0temp-act.1:--]&deg; C</td> <td>[th0temp-dmin.1:--]&deg; C</td> <td>[th0temp-dmax.1:--]&deg; C</td></tr> <tr><td>Outdoor Humidity</td> <td>[th0hum-act.0:--] %</td> <td>[th0hum-dmin.0:--] %</td> <td>[th0hum-dmax.0:--] %</td></tr> <tr><td>Outdoor Dew Point</td> <td>[th0dew-act.1:--]&deg; C</td> <td>[th0dew-dmin.1:--]&deg; C</td> <td>[th0dew-dmax.1:--]&deg; C</td></tr> <tr><td>Wind Chill Temperature</td> <td>[wind0chill-act.1:--]&deg; C</td> <td>[wind0chill-dmin.1:--]&deg; C</td> <td>[wind0chill-dmax.1:--]&deg; C</td></tr> <tr><td>Air Pressure</td> <td>[thb0seapress-act.1:--] hPa</td> <td>[thb0seapress-dmin.1:--] hPa</td> <td>[thb0seapress-dmax.1:--] hPa</td></tr> <tr><td>Wind Direction</td> <td>[wind0dir-act.0:--]&deg;</td> <td></td><td></td></tr> <tr><td>Wind Speed (averaged)</td> <td>[wind0avgwind-act.1:--] m/s</td> <td>[wind0avgwind-dmin.1:--] m/s</td> <td>[wind0avgwind-dmax.1:--] m/s</td></tr> <tr><td>Gust Speed</td> <td>[wind0wind-max5.1:--] m/s</td> <td>[wind0wind-dmin.1:--] m/s</td> <td>[wind0wind-dmax.1:--] m/s</td></tr> <tr><td>Rain</td> <td>rate: [rain0rate-act.1:--] mm/h</td> <td>sum: [rain0total-sumday.1:--] mm</td> <td></td></tr> <tr><td>Solar Radiation</td> <td>[sol0rad-act.0:--] W/qm</td> <td>[sol0rad-dmin.0:--] W/qm</td> <td>[sol0rad-dmax.0:--] W/qm</td></tr> <tr><td>UV Index</td> <td>[uv0index-act.1:--] uvi</td> <td>[uv0index-dmin.1:--] uvi</td> <td>[uv0index-dmax.1:--] uvi</td></tr> </tbody> </table> </body> <html>

Re: Changing push email alert from °C to °F

Posted: Tue Dec 02, 2014 4:26 pm
by wvdkuil
It is described in detail on this page:
WiKi http://meteobridge.com/wiki/index.php/Templates

Example, if you have now:
[th0temp-act.1:--] it will report in default metric = Centigrade
[th0temp-act=F.1:--] is using the converter, it will report in recalculated C => Fahrenheit.

Succes, Wim

Re: Changing push email alert from °C to °F

Posted: Tue Dec 02, 2014 4:36 pm
by Ladd
Ahh, templates. I haven't even looked at those pages yet, not feeling I was not knowledgeable enough to even consider messing with them. But, of course, my question about changing °C to °F falls into that area.

Thanks for the tip!

Ladd

Re: Changing push email alert from °C to °F

Posted: Tue Dec 02, 2014 5:49 pm
by Ladd
OK, I finally got everything switched over to how we foolishly list data on this side of the pond. °C to °F, hPa to in, m/s to mph and mm/h to in/hr.

Perhaps there aren't that many Meteobridge users here in the U.S., but I'm a bit surprised that there isn't a check box in Meteobridge for selecting between the two systems or at least a "if you want to switch over to what's used in the U.S., paste this text into the 'Subj # Body:' line". It would have save over an hour of work figuring out what was going on and how to modify it. Of course, I know a bit more about how to do this now, so I guess it equals out.

So, for the next folks who don't what to figure this out, here's the text one can paste into "Subj # Body:" line on the "Push Services" tab so that email push alerts are formatted into U.S. format:

weather at [hh]:[mm]\nContent-Type: text/html#<html> <style type='text/css'> #table-2 { border: 1px solid #e3e3e3; background-color: #f2f2f2; width: 500px; border-radius: 6px; -webkit-border-radius: 6px; -moz-border-radius: 6px; } #table-2 td, #table-2 th { padding: 5px; color: #333; } #table-2 thead { font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; padding: .2em 0 .2em .5em; text-align: left; color: #4B4B4B; background-color: #C8C8C8; background-image: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#e3e3e3), color-stop(.6,#B3B3B3)); background-image: -moz-linear-gradient(top, #D6D6D6, #B0B0B0, #B3B3B3 90%); border-bottom: solid 1px #999; } #table-2 th { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 17px; line-height: 20px; font-style: normal; font-weight: normal; text-align: left; text-shadow: white 1px 1px 1px; } #table-2 td { line-height: 20px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; border-bottom: 1px solid #fff; border-top: 1px solid #fff; } #table-2 td:hover { background-color: #fff; } </style> <body> <table id='table-2'> <thead><tr><th>Sensor</th> <th>Current</th> <th>Today (min)</th> <th>Today (max)</th></tr></thead> <tbody> <tr><td>Outdoor Temperature</td> <td>[th0temp-act=F.1:--]&deg; F</td> <td>[th0temp-dmin=F.1:--]&deg; F</td> <td>[th0temp-dmax=F.1:--]&deg; F</td></tr> <tr><td>Outdoor Humidity</td> <td>[th0hum-act.0:--] %</td> <td>[th0hum-dmin.0:--] %</td> <td>[th0hum-dmax.0:--] %</td></tr> <tr><td>Outdoor Dew Point</td> <td>[th0dew-act=F.1:--]&deg; F</td> <td>[th0dew-dmin=F.1:--]&deg; F</td> <td>[th0dew-dmax=F.1:--]&deg; F</td></tr> <tr><td>Wind Chill Temperature</td> <td>[wind0chill-act=F.1:--]&deg; F</td> <td>[wind0chill-dmin=F.1:--]&deg; F</td> <td>[wind0chill-dmax=F.1:--]&deg; F</td></tr> <tr><td>Air Pressure</td> <td>[thb0seapress-act=inHg:--] in</td> <td>[thb0seapress-dmin=inHg:--] in</td> <td>[thb0seapress-dmax=inHg:--] in</td></tr> <tr><td>Wind Direction</td> <td>[wind0dir-act=endir:--]&deg;</td> <td></td><td></td></tr> <tr><td>Wind Speed (averaged)</td> <td>[wind0avgwind-act.mph:--] mph</td> <td>[wind0avgwind-dmin.mph:--] mph</td> <td>[wind0avgwind-dmax.mph:--] mph</td></tr> <tr><td>Gust Speed</td> <td>[wind0wind-max5.1:--] mph</td> <td>[wind0wind-dmin.1:--] mph</td> <td>[wind0wind-dmax.1:--] mph</td></tr> <tr><td>Rain</td> <td>rate: [rain0rate-act.in:--] in/h</td> <td>sum: [rain0total-sumday=in:--] in</td> <td></td></tr> <tr><td>Solar Radiation</td> <td>[sol0rad-act.0:--] W/qm</td> <td>[sol0rad-dmin.0:--] W/qm</td> <td>[sol0rad-dmax.0:--] W/qm</td></tr> <tr><td>UV Index</td> <td>[uv0index-act.1:--] uvi</td> <td>[uv0index-dmin.1:--] uvi</td> <td>[uv0index-dmax.1:--] uvi</td></tr> </tbody> </table> </body> <html>

Re: Changing push email alert from °C to °F

Posted: Tue Dec 02, 2014 6:47 pm
by wvdkuil
Ladd wrote:OK, I finally got everything switched over to how we foolishly list data on this side of the pond. °C to °F, hPa to in, m/s to mph and mm/h to in/hr.

Perhaps there aren't that many Meteobridge users here in the U.S., but I'm a bit surprised that there isn't a check box in Meteobridge for selecting between the two systems or at least a "if you want to switch over to what's used in the U.S., paste this text into the 'Subj # Body:' line". It would have save over an hour of work figuring out what was going on and how to modify it. Of course, I know a bit more about how to do this now, so I guess it equals out.

So, for the next folks who don't what to figure this out, here's the text one can paste into "Subj # Body:" line on the "Push Services" tab so that email push alerts are formatted into U.S. format:

(text string temporarily removed while I figure out how to change the rain summary data from mm to inches; using "sum: [rain0total-sumday.in:--] in" changes my daily rain summary from 3mm total to 3 inches total and that's clearly incorrect.)

What should I put there to change from 3mm daily total to .12 inches daily total?
Maybe =in and not .in ?
[rain0total-sumday=in:--]

Wim

Re: Changing push email alert from °C to °F

Posted: Tue Dec 02, 2014 7:05 pm
by Ladd
Yup, that worked.

Thanks.

Revised text string put back in place.