Is it possible to use this Twitter extension to post the daily archived values for a given day? Ideally I'd like to set it to automatically tweet once a day (say at 10am local time) giving the stats for the previous day, e.g.:
06/01/2023: Max temperature: 12.3C, Min temperature: 2.3C, Max wind gust: 35 mph, Total rainfall: 12.2 mm I have it working so that it only tweets once a day at 10am, but giving instantaneous values is a bit pointless at that tweet frequency On Saturday, 7 January 2023 at 02:24:33 UTC Jon B wrote: > I managed this by modifying Axelle's code above in process_record(): > > ts = time.localtime() > if ts.tm_hour not in (0,6,12,18) or ts.tm_min != 0: > > logdbg("This is not hour to tweet: %d" % ts.tm_hour) > return > > That should tweet at 00:00, 06:00, 12:00 and 18:00. I'm not sure if this > will necessarily work if the archive interval is longer than 1 minute > though (my station is set to 1 minute) > On Monday, 28 March 2022 at 21:00:45 UTC+1 arnaud...@gmail.com wrote: > >> Hello, I installed the twitter extension 'weewx-twitter' on my install >> (Debian 11 + WeeWX 4.7.0 + weewx-twitter 0.15) and it works fine. I >> modified the 'twitter.py' file to post a tweet to my weather twitter >> account and I wish the extension sends a tweet at a fixed time (0:00, 6:00, >> 12:00, 18:00). But if WeeWX or the computer restarts, tweets are sent >> the minutes the software starts (Ex: If WeeWX restarts at 4:12, the >> tweet is sent at 6:12, then 12:12, 18:12). >> >> Here is my part of the file: >> >> ``` ts = time.localtime() >> if (ts.tm_hour != 0 and ts.tm_hour != 6 and ts.tm_hour != 12 and >> ts.tm_hour != 18): >> >> logdbg("This is not hour to tweet: %d" % ts.tm_hour) >> return >> ``` >> > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/3e721a07-d642-4836-b63d-9c9ee543d4c6n%40googlegroups.com.