<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Logging &amp;mdash; Paul Sutton</title>
    <link>https://personaljournal.ca/paulsutton/tag:Logging</link>
    <description>Personal Blog</description>
    <pubDate>Tue, 05 May 2026 11:11:29 +0000</pubDate>
    <item>
      <title>Weather logging</title>
      <link>https://personaljournal.ca/paulsutton/weather-logging</link>
      <description>&lt;![CDATA[Weather logging&#xA;&#xA;So been experimenting with some of the options for ansiweather, partly as schools   need to teach data logging as part of the national curriculum computing,  however not all schools have the kit required.&#xA;&#xA;As I have this running on a Raspberry Pi,  I thought it may be possible to set one up to log just the location and temperature.  &#xA;&#xA;ansiweather -l paignton -p false -h false  -w false -i false   temponly.txt&#xA;&#xA;so the above will display the location and temperature,   but exclude pressure, humidity, wind and UV index.&#xA;&#xA;now=$(date +&#34;%m%d%Y&#34;)&#xA;echo &#34;Filename : /nas/backup$weather.csv&#34;&#xA;echo $(date &#34;+ %D, %T&#34;), $(ansiweather -l Paignton -a false)     weather$now.csv&#xA;&#xA;Control what is sent to stdout.&#xA;&#xA;now=$(date +&#34;%m%d%Y&#34;)&#xA;echo &#34;Filename : /nas/backup$weather.csv&#34;&#xA;echo $(date &#34;+ %D, %T&#34;), $(ansiweather -l torquay -p false -h false  -w false -i false)     torquay$now.csv&#xA;&#xA;Final script&#xA;&#xA;now=$(date +&#34;%m%d%Y&#34;)&#xA;echo &#34;Filename : /nas/backup$weather.csv&#34;&#xA;echo $(date &#34;+ %D, %T&#34;), $(ansiweather -l torquay -p false -h false  -w false -i false)     torquay$now.csv&#xA;&#xA;Tags&#xA;&#xA;#Bash,#BashScripting,#Logging,#Data&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Weather logging</p>

<p>So been experimenting with some of the options for ansiweather, partly as schools   need to teach data logging as part of the national curriculum computing,  however not all schools have the kit required.</p>

<p>As I have this running on a Raspberry Pi,  I thought it may be possible to set one up to log just the location and temperature.</p>

<pre><code>ansiweather -l paignton -p false -h false  -w false -i false &gt;temponly.txt
</code></pre>

<p>so the above will display the location and temperature,   but exclude pressure, humidity, wind and UV index.</p>

<pre><code>now=$(date +&#34;%m_%d_%Y&#34;)
echo &#34;Filename : /nas/backup_$weather.csv&#34;
echo $(date &#34;+ %D, %T&#34;), $(ansiweather -l Paignton -a false) &gt;&gt; weather_$now.csv
</code></pre>

<p>Control what is sent to stdout.</p>

<pre><code>now=$(date +&#34;%m_%d_%Y&#34;)
echo &#34;Filename : /nas/backup_$weather.csv&#34;
echo $(date &#34;+ %D, %T&#34;), $(ansiweather -l torquay -p false -h false  -w false -i false) &gt;&gt; torquay_$now.csv
</code></pre>

<p>Final script</p>

<pre><code>now=$(date +&#34;%m_%d_%Y&#34;)
echo &#34;Filename : /nas/backup_$weather.csv&#34;
echo $(date &#34;+ %D, %T&#34;), $(ansiweather -l torquay -p false -h false  -w false -i false) &gt;&gt; torquay_$now.csv
</code></pre>

<p><strong>Tags</strong></p>

<p><a href="/paulsutton/tag:Bash" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Bash</span></a>,<a href="/paulsutton/tag:BashScripting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">BashScripting</span></a>,<a href="/paulsutton/tag:Logging" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Logging</span></a>,<a href="/paulsutton/tag:Data" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Data</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/weather-logging</guid>
      <pubDate>Fri, 18 Jul 2025 06:52:59 +0000</pubDate>
    </item>
    <item>
      <title>Logging the weather</title>
      <link>https://personaljournal.ca/paulsutton/logging-the-weather</link>
      <description>&lt;![CDATA[Logging the weather&#xA;&#xA;I have modified the script that runs every 10 minutes to record the output from the ansiweather utility,   This still saves the output to a file but adds the current date to the file name.&#xA;&#xA;now=$(date +&#34;%m%d%Y&#34;)&#xA;echo &#34;Filename : /nas/backup$weather.csv&#34;&#xA;echo $(date &#34;+ %D, %T&#34;), $(ansiweather -l Paignton -a false)     weather$now.csv&#xA;&#xA;So the output looks like&#xA;&#xA; Humidity: 71% - Pressure: 1023 hPa&#xA;06/09/25, 14:20:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 1.79 m/s WSW - Humidity: 69% - Pressure: 1024 hPa&#xA;06/09/25, 14:30:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 2.24 m/s SW - Humidity: 70% - Pressure: 1023 hPa&#xA;06/09/25, 14:40:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 3.13 m/s W - Humidity: 69% - Pressure: 1023 hPa&#xA;06/09/25, 14:50:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 1.79 m/s SW - Humidity: 69% - Pressure: 1023 hPa&#xA;06/09/25, 15:00:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 1.79 m/s WSW - Humidity: 71% - Pressure: 1023 hPa&#xA;06/09/25, 15:10:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 1.34 m/s SSW - Humidity: 71% - Pressure: 1024 hPa&#xA;&#xA;As this runs on a headless pi4,  I can login and copy the data files locally before uploading to my gopherspace (Look it up) &#xA;&#xA;gopher://vern.cc/1/~zleap&#xA;&#xA;Tags&#xA;&#xA;#Bash,#BashScripting,#Data,#Logging,#Gopher,#RaspberryPi,&#xA;Weather&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Logging the weather</p>

<p>I have modified the script that runs every 10 minutes to record the output from the ansiweather utility,   This still saves the output to a file but adds the current date to the file name.</p>

<pre><code class="language-bash">now=$(date +&#34;%m_%d_%Y&#34;)
echo &#34;Filename : /nas/backup_$weather.csv&#34;
echo $(date &#34;+ %D, %T&#34;), $(ansiweather -l Paignton -a false) &gt;&gt; weather_$now.csv
</code></pre>

<p>So the output looks like</p>

<pre><code> Humidity: 71% - Pressure: 1023 hPa
06/09/25, 14:20:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 1.79 m/s WSW - Humidity: 69% - Pressure: 1024 hPa
06/09/25, 14:30:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 2.24 m/s SW - Humidity: 70% - Pressure: 1023 hPa
06/09/25, 14:40:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 3.13 m/s W - Humidity: 69% - Pressure: 1023 hPa
06/09/25, 14:50:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 1.79 m/s SW - Humidity: 69% - Pressure: 1023 hPa
06/09/25, 15:00:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 1.79 m/s WSW - Humidity: 71% - Pressure: 1023 hPa
06/09/25, 15:10:01, Weather in Paignton: 18 °C - UVI: 7.03 - Wind: 1.34 m/s SSW - Humidity: 71% - Pressure: 1024 hPa
</code></pre>

<p>As this runs on a headless pi4,  I can login and copy the data files locally before uploading to my gopherspace (<strong>Look it up</strong>)</p>

<pre><code>gopher://vern.cc/1/~zleap
</code></pre>

<p><strong>Tags</strong></p>

<p><a href="/paulsutton/tag:Bash" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Bash</span></a>,<a href="/paulsutton/tag:BashScripting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">BashScripting</span></a>,<a href="/paulsutton/tag:Data" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Data</span></a>,<a href="/paulsutton/tag:Logging" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Logging</span></a>,<a href="/paulsutton/tag:Gopher" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Gopher</span></a>,<a href="/paulsutton/tag:RaspberryPi" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">RaspberryPi</span></a>,
<a href="/paulsutton/tag:Weather" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Weather</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/logging-the-weather</guid>
      <pubDate>Mon, 09 Jun 2025 14:23:22 +0000</pubDate>
    </item>
  </channel>
</rss>