Page 1 of 1

Twitter Interval Not As Expected - SOLVED

Posted: Sat 11 Jun 2016 11:23 am
by andrew_sinclair
Hello Steve,

I have been focussing on using the Twitter functionality. I have set the @cheddarweather Twitter Interval at 180 (i.e. 180 minutes) and tweets occurred at the following times:

10/06/2016, 23:58
11/06/2016, 01:58
11/06/2016, 03:58
11/06/2016, 05:58
11/06/2016, 09:58
11/06/2016, 11:58

i.e. 120 minute not 180 minute intervals and with 07:58 missing. The log at 05:58 reported
2016-06-11 05:58:57.499 Starting Twitter update
2016-06-11 05:58:57.500 Using twitter.txt file
2016-06-11 05:58:57.500 Updating Twitter: Wind N / 0.0kts (10min. ave.), F0, 0.0kts (Gust), OAT 14.8C, UV Index 0.0, QNH 1010.90hPa, Rain 0.00in/hr, SR 04:55, SS 21:27
2016-06-11 05:58:59.289 Status returned: (741494916602286080)[CheddarWeather ☀️]CheddarWeather ☀️, Wind N / 0.0kts (10min. ave.), F0, 0.0kts (Gust), OAT 14.8C, UV Index 0.0, QNH 1010.90hPa, Rain 0.00in/hr, SR 04:55, SS 21:27, 11/06/2016 04:58:59
which appears correct but the log at 07:58 reported
2016-06-11 07:58:57.499 Starting Twitter update
2016-06-11 07:58:57.500 Using twitter.txt file
2016-06-11 07:58:57.500 Updating Twitter: Wind WSW / 0.8kts (10min. ave.), F1, 1.7kts (Gust), OAT 15.6C, UV Index 0.0, QNH 1011.28hPa, Rain 0.00in/hr, SR 04:55, SS 21:27
2016-06-11 07:58:57.687 UpdateTwitter: Connection reset by peer
I am not sure what "Connection reset by peer" means.

Regards

Andrew

Re: Twitter Interval

Posted: Sat 11 Jun 2016 3:26 pm
by steve
Connection reset by peer indicates some kind of communication problem.

The interval not being as set may be because you have used a factor/multiple of 60, so the code is trying to synchronise with the clock time. It can't currently do that correctly for times of over 60 minutes.

Re: Twitter Interval

Posted: Sat 11 Jun 2016 9:42 pm
by andrew_sinclair
Hello Steve,

Understood. I read somewhere that daj had experienced a similar problem so I had set my interval at 180 and restarted CumulusMX...

Re: Twitter Interval

Posted: Mon 13 Jun 2016 11:38 am
by andrew_sinclair
That's worked now.

What I have learned is that if you change the Twitter interval setting to a number between 1-59 inclusive then when you press 'Save' the functionality works as, at least I had, expected e.g. at 12:26 change the Twitter Interval in Settings to 10 and press Save then then a Tweet will be 'Tweeted' at 12:36, 12:46, 12:56 etc

When you enter a number which is a multiple of 60, i.e 120, 180, 240, etc then you have to press 'Save' and restart CumulusMX and then an update will be Tweeted after every Interval number of minutes after re-started CumulusMX e.g. if you enter 120 in settings and save the settings and restart CumulusMX at 10:34 then a Tweet will be 'Tweeted' at 12:34, 14:34, 16:34, 18:34 etc.

Re: Twitter Interval

Posted: Mon 13 Jun 2016 12:40 pm
by freddie
andrew_sinclair wrote:When you enter a number which is a multiple of 60, i.e 120, 180, 240, etc then you have to press 'Save' and restart CumulusMX and then an update will be Tweeted after every Interval number of minutes after re-started CumulusMX e.g. if you enter 120 in settings and save the settings and restart CumulusMX at 10:34 then a Tweet will be 'Tweeted' at 12:34, 14:34, 16:34, 18:34 etc.
That's not necessarily true. I have my interval set to 60 and I get a tweet sent out every hour on the hour, regardless of what time I restart MX.

Re: Twitter Interval

Posted: Mon 13 Jun 2016 12:53 pm
by ConligWX
freddie wrote:That's not necessarily true. I have my interval set to 60 and I get a tweet sent out every hour on the hour, regardless of what time I restart MX.
Same here. its always on the hour no matter what.

Re: Twitter Interval

Posted: Mon 13 Jun 2016 2:18 pm
by steve
I think it's because 120 doesn't pass the 'factor of 60' check, so operates on a simple periodic timer which is started when Cumulus starts. 60 does pass the check so happens on the hour.