After setting up a new SD card with the latest pywws, my Tweets are going out, but one hour behind.
They're due to go out each hour, on the hour, which they are doing, but one hour behind.
The date & time in the Pi is correct (typing DATE in at the command prompt) and the base station date and time are correct.
I'm clearly missing something, but I cannot work out what.
Any thoughts as to where to look?
Kind regards
Phil Cooper
Guernsey
And thanks for the response.
Typing DATE into the command line produces the correct display, just your format shows.
In the Tweet template for Tweet.txt it shows the following:
#hourly#
#timezone local#
#roundtime True#
#calc "(data['idx'] + timedelta(minutes=10)).replace(minute=0)" "%H:00 %Z:"#
Temp: #temp_out "%.1f°C" "-"#
,
Wind: #wind_dir "%s, " "" "winddir_text(x)"#
#wind_ave "%.0f kts (ave), " "" "wind_kn(x)"#
#wind_gust "%.0f kts (gust)" "" "wind_kn(x)"#
,
Humidity: #hum_out "%d%%"#
,
Rain (hourly) #rain "%.1f mm"#
,
Pressure: #rel_pressure "%.0f hPa, "#
#pressure_trend "%s" "" "pressure_trend_text(x)"#
So it does have the timezone local set.
I can't find anything else to check...
Regards
Phil Cooper
--
You received this message because you are subscribed to the Google Groups "pywws" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pywws+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/b8cca5c5-544f-cbc2-bb8b-6954075b95c8%40jim-easterbrook.me.uk.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/1624193757.92223875%40webmail.sure.com.
I don't think so, but where/how to check that?
I've checked the base station for time & date, and it shows the TZ as 0, which is what I would expect.
Cheers
Phil Cooper
Cheers
Tony
> https://groups.google.com/d/msgid/pywws/1624193757.92223875%40webmail.sure.com
> .
>
--
You received this message because you are subscribed to the Google Groups "pywws" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pywws+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/CAAjkP6dN_2vrvLYWtO-Hb-PpLH8t9QGEL7cTWaG17reO66_vDA%40mail.gmail.com.
OK, I can see that may cause some issues, so I have changed it to 00 to see what happens on the next hour.
It may well be that my WiFi connection is busy when it goes to Tweet, so there could be a delay between assembling the Tweet and it getting posted.
The idea was to Tweet the weather for the PAST hour, on the hour, so at - say - 0900, it would Tweet at 0900 with a time stamp of 0900, not 0800.
Will test this out and see what happens.
Thanks for the pointer
Regards
Phil
-----Original Message-----
From: "polc1410" <goo...@wittongilbert.free-online.co.uk>
Sent: Sunday, 20 June, 2021 15:10
To: "pywws" <py...@googlegroups.com>
Subject: Re: [pywws] Issues with Tweet timings
--
You received this message because you are subscribed to the Google Groups "pywws" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pywws+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/1dc627b8-0c89-48d7-8a4d-4ffeea0990d4n%40googlegroups.com.
I've just done a python -m pywws.timezone command at around 17:56BST, and this is the result:
Local time zone: Europe/London
UTC time: 2021-06-20 16:56:05
Local time: 2021-06-20 17:56:05+01:00 (BST)
most recent 9am 2021-06-20 08:00:00 UTC
most recent 9pm 2021-06-19 20:00:00 UTC
Convert local to UTC around DST transition
2021-03-28 00:15:00 -> 2021-03-28 00:15:00
2021-03-28 01:15:00 -> 2021-03-28 01:15:00
2021-03-28 02:15:00 -> 2021-03-28 01:15:00
2021-03-28 03:15:00 -> 2021-03-28 02:15:00
Convert UTC to local around DST transition
2021-03-27 23:15:00 -> 2021-03-27 23:15:00+00:00 (GMT)
2021-03-28 00:15:00 -> 2021-03-28 00:15:00+00:00 (GMT)
2021-03-28 01:15:00 -> 2021-03-28 02:15:00+01:00 (BST)
2021-03-28 02:15:00 -> 2021-03-28 03:15:00+01:00 (BST)
Convert local to UTC around DST transition
2020-10-24 23:15:00 -> 2020-10-24 22:15:00
2020-10-25 00:15:00 -> 2020-10-24 23:15:00
2020-10-25 01:15:00 -> 2020-10-25 01:15:00
2020-10-25 02:15:00 -> 2020-10-25 02:15:00
Convert UTC to local around DST transition
2020-10-24 23:15:00 -> 2020-10-25 00:15:00+01:00 (BST)
2020-10-25 00:15:00 -> 2020-10-25 01:15:00+01:00 (BST)
2020-10-25 01:15:00 -> 2020-10-25 01:15:00+00:00 (GMT)
2020-10-25 02:15:00 -> 2020-10-25 02:15:00+00:00 (GMT)
==========================
Is there anything in that which may point to the hour out?
Cheers
Phil Cooper
-----Original Message-----
From: "Jim Easterbrook" <j...@jim-easterbrook.me.uk>
Sent: Sunday, 20 June, 2021 09:35
To: "'pco...@suremail.gg' via pywws" <py...@googlegroups.com>
Subject: Re: [pywws] Issues with Tweet timings
--
You received this message because you are subscribed to the Google Groups "pywws" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pywws+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/b8cca5c5-544f-cbc2-bb8b-6954075b95c8%40jim-easterbrook.me.uk.
I've just done a python -m pywws.timezone command at around 17:56BST, and this is the result:
Local time zone: Europe/London
UTC time: 2021-06-20 16:56:05
Local time: 2021-06-20 17:56:05+01:00 (BST)
Hello,
I’ll try that tomorrow when I have some more time, and then let you know the result.
Thanks
Phil
From: py...@googlegroups.com [mailto:py...@googlegroups.com] On Behalf Of polc1410
Sent: 20 June 2021 21:02
To: pywws
Subject: Re: [pywws] Issues with Tweet timings
On Sunday, 20 June 2021 at 18:05:02 UTC+1 pco...@suremail.gg wrote:
--
You received this message because you are subscribed to the Google Groups "pywws" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pywws+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/663e9ab8-416e-451a-947a-edb915be7eean%40googlegroups.com.
OK, the problem is solved!
In conversation with my son (@BtonWeatherPi), who runs the same setup, we discovered that my weather station was reporting the weather at 38 minutes past each hour.
Therefore, the line that has this:
#calc "(data['idx'] + timedelta(minutes=10)).replace(minute=0)" "%H:00 %Z:"#
was adding 10 minutes to the recorded time (xx:38) and adding 10 minutes, which was still short of the next hour.
He suggested changing that to:
#calc "(data['idx'] + timedelta(minutes=25)).replace(minute=0)" "%H:00 %Z:"#
which takes it past the next hour, and I can report that it is now Tweeting on the correct hour! (@GSY_Weather)
Thanks to all for the suggestions....
Jim, maybe something to add on your page as something to check?
Cheers all
Phil Cooper
Hello,
Thanks
Phil
tail ~/weather/data/hourly/2021/2021-06/2021-06-20.txt
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/663e9ab8-416e-451a-947a-edb915be7eean%40googlegroups.com <https://groups.google.com/d/msgid/pywws/663e9ab8-416e-451a-947a-edb915be7eean%40googlegroups.com?utm_medium=email&utm_source=footer> .
--
You received this message because you are subscribed to the Google Groups "pywws" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pywws+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/003001d7661a%24fd4158a0%24f7c409e0%24%40suremail.gg.
Well, I thought it was, but looking at the raw data, it appears to only be logging half-hourly, so I have issued the command again.
I will see what happens now.
Kind regards
Phil Cooper
-----Original Message-----
From: "Jim Easterbrook" <j...@jim-easterbrook.me.uk>
Sent: Monday, 21 June, 2021 11:38
To: "'pco...@suremail.gg' via pywws" <py...@googlegroups.com>
--
You received this message because you are subscribed to the Google Groups "pywws" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pywws+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/005fe840-6c1a-9f76-f934-2499eb90c17a%40jim-easterbrook.me.uk.