Twitter Templates. **solved**

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
User avatar
ConligWX
Platinum Boarder
Platinum Boarder
Posts: 329
Joined: Wed Nov 14, 2018 12:48 pm
Location: Conlig, Co. Down, UK
Contact:

Twitter Templates. **solved**

Post by ConligWX »

Hi.

just thought I'd share my Twitter Template for anyone that wants it. set at "after every full hour"

Code: Select all

Time: [hh]:[mm] • #Conlig, #Bangor • Temp: [th0temp-act:--]°C • Wind: [wind0dir-act=endir:---] [wind0wind-act=mph.1:--] to [wind0wind-max10=mph.1:--]mph • Pressure: [thb0press-act:--]hPa • Rain: [rain0total-sumday]mm • Hum [th0hum-act.0=:--]% • Solar: [sol0rad-act:--]W/m² •  UV Index: [uv0index-act:--]  • Sunrise: [mbsystem-sunrise:--] • Sunset: [mbsystem-sunset:--] •
Time: 12:00 • #Conlig, #Bangor • Temp: 7.5°C • Wind: 2.9 to 8.1mph W • Pressure: 1005.2hPa • Rain: 0.0mm • Hum 85% • Solar: 60.0W/m² • UV Index: 0.0 • Sunrise: 08:33 • Sunset: 15:57 •
Forecast is just the plain Davis one which is posted every 6 Hours:

Code: Select all

#Conlig, #Bangor, Forecast at Time: [hh]:[mm] • [forecast-text]
#Conlig, #Bangor, Forecast at Time: 12:00 • Partly cloudy and cooler.
hope this helps someone.

Please share your own Template Message for Twitter too!
User avatar
WA4OPQ
Senior Boarder
Senior Boarder
Posts: 44
Joined: Mon Feb 29, 2016 5:36 am
Location: Tennessee, USA About 40 miles west of Nashville y'all.
Contact:

Re: Twitter Templates.

Post by WA4OPQ »

Here's my 7PM summary:

Code: Select all

[MMM] [DD] - High and lows for Centerville, just west of the town square, are #if# {*105 - [th0temp-dmax=F.1:0] *} #then# [th0temp-dmax=F.1:--]º #else# [th0temp-dmax.1:--]º #fi#and [th0temp-dmin=F.1:--]º F. #if# {*([rain0total-daysum=in.2:0] > .02)*} #then#Today's rainfall: [rain0total-daysum=in.2:0] inches #else# https://t.co/9EXJdgeXZS#fi#
Dec 06 - High and lows for Centerville, just west of the town square, are 46.4º and 23.2º F. https://www.wunderground.com/personal-w ... =KTNCENTE3
or
Dec 09 - High and lows for Centerville, just west of the town square, are 34.9º and 32.9º F. Today's rainfall: 0.20 inches
User avatar
ConligWX
Platinum Boarder
Platinum Boarder
Posts: 329
Joined: Wed Nov 14, 2018 12:48 pm
Location: Conlig, Co. Down, UK
Contact:

Re: Twitter Templates.

Post by ConligWX »

Just updated my to include Cloudbase height and ET too:

Code: Select all

Time: [hh]:[mm] • Temp: [th0temp-act:--]°C • Wind: [wind0dir-act=endir:---] [wind0wind-act=mph.1:--] to [wind0wind-max10=mph.1:--]mph • Pressure: [thb0press-act:--]hPa • Rain: [rain0total-sumday]mm • Hum: [th0hum-act.0=:--]% • ET: [sol0evo-act.1=:--]mm • Solar: [sol0rad-act:--]W/m² • UV Index: [uv0index-act:--] • Sunrise: [mbsystem-sunrise:--] • Sunset: [mbsystem-sunset:--] • Cloudbase: #if#[th0temp-act.1:0.0]>[th0dew-act.1:0.0]#then#{*([th0temp-act.1:0.0]-[th0dew-act.1:0.0])*400*0}#else#0#fi#ft • #Conlig, #Bangor •
View now looks like this:
cloudbase.jpg
cloudbase.jpg (28.57 KiB) Viewed 4473 times
kds
Junior Boarder
Junior Boarder
Posts: 24
Joined: Sat Jan 26, 2019 10:13 pm

Re: Twitter Templates.

Post by kds »

After some inspiration by ConligWX, here's my template:

Code: Select all

It's currently [th0temp-act=F.1:--]° outside#if# {*([wind0chill-act=F.1:--] < [th0temp-act=F.1:--])*} #then# with a wind chill of [wind0chill-act=F.1:--]°#else##fi##if#{*([th0heatindex-act=F.1:--] > [th0temp-act=F.1:--])*} #then# with a heat index of [th0heatindex-act=F.1:--]°#else##fi#. #if#{*([wind0wind-hmax=mph.1:--] > 0)*}#then#Wind is [wind0wind-havg=mph.1]mph from from the [wind0dir-havg=endir] with gusts up to [wind0wind-hmax=mph.1:--]mph.#else##fi# #if# {*([rain0total-daysum=in.2:0] > .02)*} #then#It has rained [rain0total-hoursum=in.2]in in the past hour, [rain0total-sumday=in.2]in total today. #else# #fi#
Here are the conditions:
  • it will always show temp.
  • if the wind chill is less than the temp, show wind chill.
  • if the heat index is greater than the temp, show heat index.
  • if the wind is gusting to greater than 0mph, then show wind speed, gust, and direction.
  • if it has rained more than .02" in the day, then show total rainfall and rainfall rate for the past hour (it tweets hourly).
User avatar
ConligWX
Platinum Boarder
Platinum Boarder
Posts: 329
Joined: Wed Nov 14, 2018 12:48 pm
Location: Conlig, Co. Down, UK
Contact:

Re: Twitter Templates.

Post by ConligWX »

Thanks for the post.
User avatar
ConligWX
Platinum Boarder
Platinum Boarder
Posts: 329
Joined: Wed Nov 14, 2018 12:48 pm
Location: Conlig, Co. Down, UK
Contact:

Re: Twitter Templates.

Post by ConligWX »

Updated mine:

Code: Select all

Time: [hh]:[mm] • Temp: [th0temp-act:--]°C • Wind: [wind0dir-act=endir:---] [wind0wind-act=mph.1:--] to [wind0wind-max10=mph.1:--]mph • Pressure: [thb0press-act:--]hPa • Rain: [rain0total-sumday]mm • Hum: [th0hum-act.0=:--]% • ET: [sol0evo-act.1=:--]mm • Solar: [sol0rad-act:--]W/m² • UV Index: [uv0index-act:--] • Sunrise: [mbsystem-sunrise:--] • Sunset: [mbsystem-sunset:--] • Cloudbase: #if#[th0temp-act.1:0.0]>[th0dew-act.1:0.0]#then#{*([th0temp-act.1:0.0]-[th0dew-act.1:0.0])*400*0}#else#0#fi#ft • #Conlig, #Bangor • bit.ly/2TzKYFb •
Time: 12:00 • Temp: 13.2°C • Wind: W 2.0 to 6.9mph • Pressure: 992.9hPa • Rain: 0.0mm • Hum: 82% • ET: 0.3mm • Solar: 142.0W/m² • UV Index: 0.7 • Sunrise: 05:55 • Sunset: 20:46 • Cloudbase: 1200ft • #Conlig, #Bangor • http://bit.ly/2TzKYFb
Capture.JPG
Capture.JPG (26.44 KiB) Viewed 4267 times
BigSkyWeather
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Mon Feb 10, 2020 12:30 pm

Re: Twitter Templates.

Post by BigSkyWeather »

kds wrote: Mon Feb 18, 2019 3:50 am After some inspiration by ConligWX, here's my template:

Code: Select all

It's currently [th0temp-act=F.1:--]° outside#if# {*([wind0chill-act=F.1:--] < [th0temp-act=F.1:--])*} #then# with a wind chill of [wind0chill-act=F.1:--]°#else##fi##if#{*([th0heatindex-act=F.1:--] > [th0temp-act=F.1:--])*} #then# with a heat index of [th0heatindex-act=F.1:--]°#else##fi#. #if#{*([wind0wind-hmax=mph.1:--] > 0)*}#then#Wind is [wind0wind-havg=mph.1]mph from from the [wind0dir-havg=endir] with gusts up to [wind0wind-hmax=mph.1:--]mph.#else##fi# #if# {*([rain0total-daysum=in.2:0] > .02)*} #then#It has rained [rain0total-hoursum=in.2]in in the past hour, [rain0total-sumday=in.2]in total today. #else# #fi#
Here are the conditions:
  • it will always show temp.
  • if the wind chill is less than the temp, show wind chill.
  • if the heat index is greater than the temp, show heat index.
  • if the wind is gusting to greater than 0mph, then show wind speed, gust, and direction.
  • if it has rained more than .02" in the day, then show total rainfall and rainfall rate for the past hour (it tweets hourly).
Thank you for sharing this code. I've implemented it in my hourly tweet reporting but I'm having an issue with the rainfall. This is what is outputs:

Conditions at 12:00 PM - 30.4°F outside with a wind chill of 25.7°F. It has rained [rain0total-hoursum=in.2]in in the past hour, 0.03in total today.

Any ideas what's wrong? I've copied your code verbatim and there's no extra characters/spaces/etc. that might have accidentally made its way in.

Thanks in advance for any help you (or anyone else) can give.
PSJohn
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: Thu Aug 29, 2019 7:58 pm

Re: Twitter Templates.

Post by PSJohn »

BigSkyWeather wrote: Thu Feb 27, 2020 5:40 pm
kds wrote: Mon Feb 18, 2019 3:50 am After some inspiration by ConligWX, here's my template:

Code: Select all

It's currently [th0temp-act=F.1:--]° outside#if# {*([wind0chill-act=F.1:--] < [th0temp-act=F.1:--])*} #then# with a wind chill of [wind0chill-act=F.1:--]°#else##fi##if#{*([th0heatindex-act=F.1:--] > [th0temp-act=F.1:--])*} #then# with a heat index of [th0heatindex-act=F.1:--]°#else##fi#. #if#{*([wind0wind-hmax=mph.1:--] > 0)*}#then#Wind is [wind0wind-havg=mph.1]mph from from the [wind0dir-havg=endir] with gusts up to [wind0wind-hmax=mph.1:--]mph.#else##fi# #if# {*([rain0total-daysum=in.2:0] > .02)*} #then#It has rained [rain0total-hoursum=in.2]in in the past hour, [rain0total-sumday=in.2]in total today. #else# #fi#
Here are the conditions:
  • it will always show temp.
  • if the wind chill is less than the temp, show wind chill.
  • if the heat index is greater than the temp, show heat index.
  • if the wind is gusting to greater than 0mph, then show wind speed, gust, and direction.
  • if it has rained more than .02" in the day, then show total rainfall and rainfall rate for the past hour (it tweets hourly).
Thank you for sharing this code. I've implemented it in my hourly tweet reporting but I'm having an issue with the rainfall. This is what is outputs:

Conditions at 12:00 PM - 30.4°F outside with a wind chill of 25.7°F. It has rained [rain0total-hoursum=in.2]in in the past hour, 0.03in total today.

Any ideas what's wrong? I've copied your code verbatim and there's no extra characters/spaces/etc. that might have accidentally made its way in.

Thanks in advance for any help you (or anyone else) can give.
I'm receiving the same results when posting hourly. I'm assuming it is because the hourly rain resets at the top of the hour so there is no data yet. I could be wrong on this and waiting response from someone that knows.

Also tried posting at 45 after the hour, it works but then I wonder if the above is true that is it only pulling the data from minute 1 to 45 each hour?

UPDATE: I changed the interval to "before every full hour" and it is now working without any issues!
https://desertweather.com
Palm Springs, California

https://lakehemetweather.com
Lake Hemet, California

Image
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Twitter Templates.

Post by admin »

I think the explanation that when no rain information has yet been recorded for the current hour, then "[rain0total-hoursum=in.2]" might not be evaluated because of no data. when you change to "[rain0total-hoursum=in.2:0]" you should be fine. Sensor data should always be given a default reply in case no data there.
Post Reply