<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Hydrologiq - Medium]]></title>
        <description><![CDATA[Sharing stories and learnings from the Hydrogen industry 💧 - Medium]]></description>
        <link>https://medium.com/hydrologiq?source=rss----52aec1eea84f---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Hydrologiq - Medium</title>
            <link>https://medium.com/hydrologiq?source=rss----52aec1eea84f---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 03:10:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/hydrologiq" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Navigating Connectivity Challenges in Remote IoT Deployments]]></title>
            <link>https://medium.com/hydrologiq/navigating-connectivity-challenges-in-remote-iot-deployments-0cf7a8b1dab4?source=rss----52aec1eea84f---4</link>
            <guid isPermaLink="false">https://medium.com/p/0cf7a8b1dab4</guid>
            <category><![CDATA[connectivity]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Adam Ayre-Storie]]></dc:creator>
            <pubDate>Wed, 25 Jun 2025 08:49:53 GMT</pubDate>
            <atom:updated>2025-06-25T10:30:52.334Z</atom:updated>
            <content:encoded><![CDATA[<p>At Hydrologiq, we tackle the realities of deploying IoT in places where connectivity can’t be trusted. This guide explores practical strategies such as offline data storage, automatic syncing, and edge processing to keep your data reliable and your system resilient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LrxUMYWED70sg3Zuf1tZkQ.jpeg" /><figcaption>Hydrologiq remote IoT deployment case study — <a href="https://www.hydrologiq.com/case-study-graham-national-highways-m2-j5-site-hydrogen-deployment/">https://www.hydrologiq.com/case-study-graham-national-highways-m2-j5-site-hydrogen-deployment/</a></figcaption></figure><h3>The challenge</h3><p>In remote IoT deployments, devices often rely on wireless networks such as Wi-Fi or cellular connections. These connections can be unreliable due to geographical remoteness, environmental factors, or infrastructure limitations. As a result, devices will inevitably face intermittent or prolonged connectivity loss. When this happens, two key challenges emerge:</p><ol><li>How to avoid losing data when the connection drops</li><li>How to reliably synchronise that data once connectivity is restored</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*FMvv8l0nlSbWsmMZ3fGpOw.jpeg" /><figcaption>David Payette. 1 December 2021. Online image. Payette Forward. 1 December 2021. <a href="https://tinyurl.com/rarxj934">https://tinyurl.com/rarxj934</a></figcaption></figure><h3>Why it matters</h3><p>Unreliable connectivity impacts both the timeliness and integrity of your data, bringing some operational risks:</p><h4><strong>Delayed data transmission</strong></h4><ul><li><strong><em>Slower decision-making</em></strong>: Real-time analytics and alerting systems depend on continuous data streams. Interruptions can prevent timely responses to critical events.</li><li><strong><em>Visibility gaps</em></strong>: When data arrives late or inconsistently, it becomes harder to obtain a clear operational picture.</li></ul><h4><strong>Data loss</strong></h4><ul><li><strong><em>Reduced data quality</em>:</strong> If sensor readings aren’t persisted during offline periods, entire chunks of historical data can be lost.</li><li><strong><em>Reduced visibility:</em></strong> Incomplete datasets can make it challenging to diagnose issues, perform maintenance, or assess system performance.</li></ul><h3>Strategies to consider</h3><p>There’s no one-size-fits-all solution for unreliable connectivity in remote IoT. Below are common strategies to help plan your implementation.</p><h4>File storage</h4><p>Store data locally on the device in a comma-separated values (CSV) file during periods of connectivity loss. For example, a Node-RED flow can write sensor data to a CSV file on the device’s filesystem.</p><p><strong><em>Benefits</em></strong></p><ul><li>Easy to implement with minimal dependencies (e.g., native Node-RED <a href="https://flowfuse.com/node-red/core-nodes/csv/">CSV nodes</a>)</li><li>Human-readable and compatible with most data processing tools</li><li>Data structure can be easily tailored to match downstream systems like InfluxDB</li></ul><p><strong><em>Challenges</em></strong></p><ul><li>Difficult to manage or scale for large datasets</li><li>Lacks indexing and querying features for on-device analysis</li><li>Requires manual or scripted synchronisation after reconnection</li></ul><h4>Time series databases</h4><p>Use a local time series database (TSDB), such as InfluxDB, to store and manage timestamped sensor data.</p><p><strong><em>Benefits</em></strong></p><ul><li>Consistency between cloud and device storage formats</li><li>Enables edge analytics such as alerts or trend analysis due to having a continuous data flow and more advanced querying</li></ul><p><strong><em>Challenges</em></strong></p><ul><li>Higher resource consumption (RAM, CPU, storage)</li><li>Added complexity in setup and sync logic</li><li>May be unsuitable for resource-constrained devices</li></ul><h4>Queuing system</h4><p>Use a message queuing protocol like MQTT to buffer data locally during outages. Once connectivity is restored, queued messages can be transmitted automatically.</p><p><strong><em>Benefits</em></strong></p><ul><li>Automatically handles buffering and replay without manual syncing</li><li>Preserves message order and delivery reliability</li><li>Decouples data producers and consumers, enabling a more flexible system design</li></ul><p><strong><em>Challenges</em></strong></p><ul><li>Requires additional cloud and local infrastructure (e.g., MQTT broker setup)</li><li>Not persistent by default, meaning data may be lost on device reboot or power loss unless explicitly saved</li><li>Limited visibility into queued data without additional functionality being implemented</li><li>The queue size may be limited, and sending all queued messages at once can negatively impact other parts of the system</li></ul><h3><strong>What’s the best solution for your use case?</strong></h3><p>The optimal solution depends on your specific deployment needs and constraints. In many cases, a hybrid approach works best:</p><ul><li><strong><em>Resource-constrained devices:</em></strong> If your hardware is limited in processing power or storage, simplicity and low overhead are key. In this case, lightweight approaches like file storage (e.g., CSV) or a basic queuing system may be the most practical.</li><li><strong><em>Need for on-device processing or real-time alerting:</em></strong> A time series database can support richer querying and continuous data workflows if your application demands real-time insight or local data processing (e.g., edge alerting). Pairing this with a queue can provide robustness during outages.</li></ul><p>One key consideration is how often connectivity interruptions occur. If downtime is rare and short-lived, a simpler solution like file-based persistence with a manual or periodic synchronisation may do. However, if disconnections are frequent or prolonged, investing in a more robust queuing or syncing mechanism may be justified, though this often comes with increased development and operational costs.</p><p>Ultimately, it’s about striking the right balance between reliability, complexity, and cost.</p><h3>Additional considerations</h3><p>As your IoT deployments evolve, consider the following strategies to enhance resilience and efficiency:</p><h4>Automatic data synchronisation</h4><p>Implement mechanisms to sync locally stored data with central servers once connectivity is restored. This ensures data consistency and reduces manual intervention.</p><h4>Edge processing for real-time event handling</h4><p>Incorporate edge computing to process critical data on the device itself, enabling immediate responses to urgent events without relying on cloud connectivity. This approach reduces latency and enhances system responsiveness.</p><h4>On-device downsampling</h4><p>Aggregate high-frequency data into summaries before transmission to conserve bandwidth and storage. While not a direct solution to outages, this approach can improve data integrity in environments where only daily or periodic data uploads are feasible. It may also mask brief disruptions if summaries are complete. Interested in finding out more about this topic? See <a href="https://medium.com/p/33114c58018f">Why You Should Downsample Your IoT Data</a>.</p><h3>What’s Next?</h3><p>Solving connectivity issues in remote IoT deployments isn’t just a technical challenge; it also impacts:</p><ul><li><strong><em>Support teams</em></strong> need reliable tools to diagnose and maintain systems in the field</li><li><strong><em>Data analysts</em> </strong>rely on consistent datasets to draw meaningful insights</li><li><strong><em>End users</em></strong>, who expect real-time feedback and system transparency</li></ul><p>Getting input from all stakeholders early can help you prioritise solutions that balance complexity with impact. Start small and pick a persistence strategy that matches your current needs. Plan your system evolution, factoring in scale and expectations for growth.</p><p>Have questions about solving IoT connectivity challenges, monitoring systems, or anything else we’ve covered? Feel free to connect with me on <a href="https://www.linkedin.com/in/adamayrestorie/">LinkedIn</a> or comment below 💭.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0cf7a8b1dab4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hydrologiq/navigating-connectivity-challenges-in-remote-iot-deployments-0cf7a8b1dab4">Navigating Connectivity Challenges in Remote IoT Deployments</a> was originally published in <a href="https://medium.com/hydrologiq">Hydrologiq</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Batch Downsampling with InfluxDB: A Practical Guide]]></title>
            <link>https://medium.com/hydrologiq/batch-downsampling-with-influxdb-a-practical-guide-231541f92be1?source=rss----52aec1eea84f---4</link>
            <guid isPermaLink="false">https://medium.com/p/231541f92be1</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[timeseries]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[influxdb]]></category>
            <dc:creator><![CDATA[Adam Ayre-Storie]]></dc:creator>
            <pubDate>Wed, 19 Mar 2025 10:38:05 GMT</pubDate>
            <atom:updated>2025-03-19T12:11:35.643Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Downsampling high-frequency IoT data can reduce storage costs, speed up queries, and provide additional insights. This guide will explain how Python and InfluxDB 3.0 can aggregate your data into manageable chunks.</em></p><figure><img alt="An IoT device is represented as a microchip with an arrow pointing towards a cell tower with text stating ‘send data’. Another arrow from the cell tower pointing towards a time series database is represented as a cylinder. A bidirectional extends from the time series database pointing towards the time series database, pointing towards an icon of a cloud which represents cloud computing. A box surrounds cloud computing with the text ‘Batch processing’." src="https://cdn-images-1.medium.com/proxy/1*5Y1l66pI_YGMQLa8-QYw4Q.jpeg" /><figcaption><em>Figure 1: A diagram showing the location where batch processing typically occurs when publishing IoT data. The location is highlighted by the rectangle with a black outline.</em></figcaption></figure><h3>Introduction</h3><p>When working with high-frequency IoT data, things can get a bit out of hand; performance takes a hit, and storage costs can skyrocket! But don’t worry; batch downsampling can help. It boosts performance, decreases storage costs, and delivers more accessible insights from your data. By consolidating raw data into more significant summaries at consistent intervals, you can cut costs and the time needed to execute queries. This guide will show step-by-step instructions for implementing batch downsampling using Python and InfluxDB 3.0 — you can refer to the <a href="https://github.com/aas5670/blog-influxdb-batch-downsampling">source GitHub repository</a> for a complete version of this guide.</p><p>(<em>If you’re wondering why downsampling is essential or just what it is, check out </em><a href="https://medium.com/hydrologiq/why-you-should-downsample-your-iot-data-33114c58018f"><em>Why You Should Downsample Your IoT Data</em></a>).</p><h3><strong>Step 1: Prerequisites </strong>✅</h3><p>Before we dive into the code, ensure you have the following:</p><ul><li>An <strong>InfluxDB Cloud</strong> account or an <strong>InfluxDB 3.0 instance</strong> running locally — in this guide, we are using an InfluxDB cloud instance</li><li><strong>Python 3.12+</strong> installed</li><li>Required Python packages: influxdb3-python and pandas</li><li>A folder created on your machine where you will save the data and Python files</li></ul><h4>a. Install dependencies 📦</h4><p>Install the Python dependencies via the terminal — feel free to use a Python environment manager such as <a href="https://github.com/pyenv/pyenv">pyenv</a>.</p><pre>pip install influxdb3-python pandas</pre><h4>b. Set up an InfluxDB cloud bucket &amp; retrieve the API key 🔑</h4><ol><li>Sign up for an <a href="https://cloud2.influxdata.com/signup">InfluxDB Cloud account</a>.</li><li>Navigate to the <strong>Buckets</strong> section within Add Data and create two new buckets: iot_data (for raw data) and iot_data_downsampled (for the downsampled data).</li><li>Go to the API Tokens section, generate a Read/Write token (with read+write access to iot_data and iot_data_downsampled buckets), copy it, and save it on your machine for later use. This token will authenticate your connection in the following steps.</li></ol><h3>Step 2: Prepare Data 📥</h3><p>For this guide, we will use a prepopulated dataset representing a temperature and humidity sensor publishing data at 1 data point per field every 5 seconds for 30 minutes. Following the steps below, you will upload this dataset into InfluxDB.</p><h4>a. Download the data 📂</h4><p>You must download the <a href="https://raw.githubusercontent.com/aas5670/blog-influxdb-batch-downsampling/refs/heads/main/src/1_data.csv">sample sensor data</a>, name it 1_data.csv, and place it in the previously created folder.</p><h4>b. Upload the data 📝</h4><p>The below code will upload the data you downloaded in the previous step to the iot_data bucket in InfluxDB.</p><pre>import pandas as pd<br>from datetime import datetime, timezone<br>from influxdb_client_3 import InfluxDBClient3, Point<br><br># Define connection parameters<br>INFLUX_URL = &quot;https://eu-central-1-1.aws.cloud2.influxdata.com/&quot;  # Use your InfluxDB Cloud URL<br>TOKEN = &quot;your-api-token&quot;  # Replace with your API token<br>ORG = &quot;your-org&quot;  # Replace with your InfluxDB organization name/id (can be found in the URL)<br>SOURCE_BUCKET = &quot;iot_data&quot;<br><br># Initialize client<br>client = InfluxDBClient3(host=INFLUX_URL, token=TOKEN, org=ORG)<br><br># Load CSV data<br>df = pd.read_csv(&quot;1_data.csv&quot;, parse_dates=[&quot;time&quot;])<br><br># Write data to InfluxDB<br>points = []<br>for _, row in df.iterrows():<br>    point = (<br>        Point(&quot;sensor_data&quot;)<br>        .time(datetime.fromtimestamp(int(row[&quot;time&quot;].timestamp()), tz=timezone.utc))<br>        .field(&quot;temperature&quot;, row[&quot;temperature&quot;])<br>        .field(&quot;humidity&quot;, row[&quot;humidity&quot;])<br>    )<br>    points.append(point)<br><br>client.write(database=SOURCE_BUCKET, record=points, write_precision=&#39;s&#39;)<br><br>print(&quot;Data successfully written to InfluxDB.&quot;)</pre><p>To run the code, you must do the following:</p><ol><li>Please place it in a file in the same folder as the data from step 2.a. The file can have any name; a suggestion is 1_upload.py</li><li>At the top of the file, replace the relevant connection parameter variables with the values associated with your InfluxDB account and token</li><li>Upload the data by running python 1_write.py</li></ol><h3>Step 3: Apply Batch Downsampling 📊</h3><p>Now, we will aggregate the data into meaningful summaries (e.g., 5-minute averages and peaks for temperature and humidity).</p><h4><strong>a. Apply Batch Downsampling</strong></h4><p>We’ll group the data into 5-minute intervals and compute the average and peak of both the temperature and humidity.</p><pre>import pandas as pd<br>from influxdb_client_3 import InfluxDBClient3, Point<br>from datetime import datetime, timezone<br><br># Define connection parameters<br>INFLUX_URL = &quot;https://eu-central-1-1.aws.cloud2.influxdata.com/&quot;  # Use your InfluxDB Cloud URL<br>TOKEN = &quot;your-api-token&quot;  # Replace with your API token<br>ORG = &quot;your-org&quot;  # Replace with your InfluxDB organization name/id (can be found in the URL)<br>SOURCE_BUCKET = &quot;iot_data&quot;<br><br>client = InfluxDBClient3(host=INFLUX_URL, token=TOKEN, org=ORG)<br><br>result = client.query(<br>    &quot;&quot;&quot;<br>    SELECT * from &quot;sensor_data&quot;<br>    WHERE time &gt;= &#39;2024-02-19T12:00:00Z&#39; AND time &lt; &#39;2024-02-19T12:30:00Z&#39;<br>    &quot;&quot;&quot;,<br>    database=SOURCE_BUCKET,<br>    mode=&quot;pandas&quot;,<br>)<br># Change time column to datetime<br>result[&quot;time&quot;] = pd.to_datetime(result[&quot;time&quot;])<br>result.set_index(&quot;time&quot;, inplace=True)<br><br># Downsample data to 5-minute intervals using mean aggregation<br>downsampled_df = result.resample(&quot;300s&quot;).agg([&#39;mean&#39;,&#39;max&#39;])<br><br># Verify the downsampled data<br>print(downsampled_df)</pre><p>To run the code, you must do the following:</p><ol><li>Please place it in a file in the same folder as the data from step 2.a. The file can have any name; a suggestion is 2_downsample.py</li><li>At the top of the file, replace the relevant connection parameter variables with the values associated with your InfluxDB account and token</li><li>Downsample the data by running python 2_downsample.py</li></ol><p>The output should look the same as the one below.</p><pre>                      humidity            temperature           <br>                          mean        max        mean        max<br>time                                                            <br>2024-02-19 12:00:00  50.386490  65.273174   21.795060  26.452211<br>2024-02-19 12:05:00  50.151275  65.662693   21.932996  28.081900<br>2024-02-19 12:10:00  50.309326  67.273063   22.092928  28.261569<br>2024-02-19 12:15:00  49.488181  54.541386   21.903784  23.926366<br>2024-02-19 12:20:00  49.913995  65.895096   21.755522  23.066517<br>2024-02-19 12:25:00  50.006058  66.947777   22.013015  27.599687</pre><h4>b. Write the downsampled data back to InfluxDB 🔄</h4><p>Now, we’ll write the downsampled data back into the iot_data_downsampled bucket.</p><pre>DOWNSAMPLED_BUCKET = &quot;iot_data_downsampled&quot;<br><br># Write downsampled data back to InfluxDB<br>points = []<br><br>for time, row in downsampled_df.iterrows():<br>    points.append(Point(&quot;summary_sensor_data&quot;)<br>        .time(datetime.fromtimestamp(int(time.timestamp()), tz=timezone.utc))<br>        .field(&quot;temperature_avg&quot;, row[&quot;temperature&quot;][&quot;mean&quot;])<br>        .field(&quot;temperature_peak&quot;, row[&quot;temperature&quot;][&quot;max&quot;])<br>        .field(&quot;humidity_avg&quot;, row[&quot;humidity&quot;][&quot;mean&quot;])<br>        .field(&quot;humidity_peak&quot;, row[&quot;humidity&quot;][&quot;max&quot;])<br>    )<br><br>client.write(database=DOWNSAMPLED_BUCKET, record=points, write_precision=&#39;s&#39;)<br><br>print(&quot;Downsampled data successfully written to InfluxDB.&quot;)</pre><p>To run the code, you must do the following:</p><ol><li>Append the code to the previous Python code you used to downsample the data.</li><li>Downsample and write the data to InfluxDB by running python 2_downsample.py</li></ol><h3>Step 4: Validate and visualize the downsampled data 📈</h3><h4>a. Validate the Downsampled Data</h4><p>You can verify that the downsampled data has been stored correctly in InfluxDB by querying the iot_data_downsampled bucket:</p><pre>from influxdb_client_3 import InfluxDBClient3<br><br># Define connection parameters<br>INFLUX_URL = &quot;https://eu-central-1-1.aws.cloud2.influxdata.com/&quot;  # Use your InfluxDB Cloud URL<br>TOKEN = &quot;your-api-token&quot;  # Replace with your API token<br>ORG = &quot;your-org&quot;  # Replace with your InfluxDB organization name/id (can be found in the URL)<br>DOWNSAMPLED_BUCKET = &quot;iot_data_downsampled&quot;<br><br>client = InfluxDBClient3(host=INFLUX_URL, token=TOKEN, org=ORG)<br><br>result = client.query(<br>    &quot;&quot;&quot;<br>    SELECT * from &quot;summary_sensor_data&quot;<br>    WHERE time &gt;= &#39;2024-02-19T12:00:00Z&#39; AND time &lt; &#39;2024-02-19T12:30:00Z&#39;<br>    &quot;&quot;&quot;,<br>    database=DOWNSAMPLED_BUCKET,<br>    mode=&quot;pandas&quot;,<br>)<br>print(result)</pre><p>To run the code, you must do the following:</p><ol><li>Please place it in a file in the same folder as the data from step 2.a. The file can have any name; a suggestion is 3_verify.py</li><li>At the top of the file, replace the relevant connection parameter variables with the values associated with your InfluxDB account and token</li><li>Retrieve the downsampled data by running python 3_verify.py</li></ol><p>The output should look the same as the one below.</p><pre>   humidity_avg  humidity_peak  temperature_avg  temperature_peak                time<br>0     50.386490      65.273174        21.795060         26.452211 2024-02-19 12:00:00<br>1     50.151275      65.662693        21.932996         28.081900 2024-02-19 12:05:00<br>2     50.309326      67.273063        22.092928         28.261569 2024-02-19 12:10:00<br>3     49.488181      54.541386        21.903784         23.926366 2024-02-19 12:15:00<br>4     49.913995      65.895096        21.755522         23.066517 2024-02-19 12:20:00<br>5     50.006058      66.947777        22.013015         27.599687 2024-02-19 12:25:00</pre><h4>b. Visualising the downsampled data📊</h4><p>Various tools can be used to visualize the downsampled data. One we use internally is Grafana, which integrates seamlessly with InfluxDB. Creating a Grafana dashboard that connects to your InfluxDB instance enables you to visualize trends in temperature and humidity over time (<a href="https://grafana.com/docs/grafana/latest/getting-started/get-started-grafana-influxdb/">this is a good guide to getting started</a>).</p><h3>Step 5: Clean up</h3><p>Remember to clean up the resources you have created today, including the two InfluxDB buckets (iot_dataand iot_data_downsampled ) and the API Token.</p><p><strong>Conclusion</strong></p><p>Batch downsampling can be a powerful way to manage high-frequency time-series data, improving query performance ⏱️, reducing storage costs 💰, and making key insights more accessible 🔍.</p><p>In this guide, we reduced the total number of data points from 720 to 24 — a <strong>96% reduction</strong> 🤯 — while making it easier to extract key insights like averages and peaks. These are just a few examples; you can expose many other valuable metrics. This approach keeps your data lightweight, efficient, and more insightful.</p><p>This guide addresses a relatively straightforward scenario, but when applying it to your specific use case, there are some essential considerations you need to take into account. I have discussed these in the original blog post, <a href="https://medium.com/hydrologiq/why-you-should-downsample-your-iot-data-33114c58018f#0319">Why You Should Downsample Your IoT Data</a>.</p><p>Have questions about downsampling or IoT monitoring systems? Feel free to connect with me on <a href="https://www.linkedin.com/in/adamayrestorie/">LinkedIn</a> or leave a comment below 💭</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=231541f92be1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hydrologiq/batch-downsampling-with-influxdb-a-practical-guide-231541f92be1">Batch Downsampling with InfluxDB: A Practical Guide</a> was originally published in <a href="https://medium.com/hydrologiq">Hydrologiq</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why You Should Downsample Your IoT Data]]></title>
            <link>https://medium.com/hydrologiq/why-you-should-downsample-your-iot-data-33114c58018f?source=rss----52aec1eea84f---4</link>
            <guid isPermaLink="false">https://medium.com/p/33114c58018f</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Adam Ayre-Storie]]></dc:creator>
            <pubDate>Thu, 24 Oct 2024 10:09:14 GMT</pubDate>
            <atom:updated>2024-10-24T10:09:14.488Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Are you consuming a lot of IoT data? Are long query times slowing you down? Are users complaining about sluggish graphs?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vy8gSDMPk8tVkh59lB3qVQ.jpeg" /><figcaption>Peter Alfred Hess. “Frustration”. 21 October 2008. Online image. Flickr. 27 October 2008. <a href="https://flic.kr/p/5x3DF6">https://flic.kr/p/5x3DF6</a></figcaption></figure><p>Downsampling was the solution for us at <a href="https://www.hydrologiq.com/">Hydrologiq</a> when we faced similar challenges — it might be the one you need too. Here’s why ⬇️</p><p><strong>The problem<br></strong>IoT devices <em>(1/2 — see glossary) </em>often generate data at very high frequencies <em>(3)</em> — sometimes every few seconds. Since IoT devices usually run 24/7, this can lead to massive datasets over time. Storing and querying <em>(4) </em>this data at its original frequency over long periods (months or years) can cause significant challenges, including:</p><ol><li>🤕 <strong>Slow Querying Times</strong>: Querying large datasets generated by IoT devices often results in longer response times, impacting system efficiency and user experience.</li><li>🤑 <strong>High Costs</strong>: Storing and processing vast amounts of high-frequency data drives up operational and infrastructure expenses.</li><li>😣 <strong>Complex Data Management</strong>: Handling and maintaining large datasets is complicated, requiring significant expertise and increasing the risk of errors or system inefficiencies.</li></ol><p>You may be wondering, why capture so much data in the first place, good question. High-frequency data not only allows for real-time decision-making but also leads to more accurate insights, as it captures finer details and trends. The trade-off, however, is that a large amount of data is stored, which also needs to be available for historical analysis and reporting purposes.</p><p><strong>What is downsampling?<br></strong>Downsampling is the process of reducing the number of data points <em>(5)</em> collected by summarizing them over longer time intervals. It retains the critical information needed for historical analysis and reporting, while significantly reducing data storage and processing requirements.</p><p><em>Example</em><br>An IoT device monitors power usage on a construction site, where real-time data is essential for monitoring immediate power consumption. The device sends a power reading every 15 seconds, resulting in 5,760 data points per day 🤯. However, when generating hourly historical insights — such as the average and max power — we don’t need that level of detail. This is where downsampling comes in. By summarizing the data into 1-hour intervals, we only need to store the average and max power for each hour, reducing the data to just 48 points — 120x smaller, without losing key insights.</p><p><strong>Why should you downsample your IoT data?</strong></p><ol><li>⚡ <strong>Faster Query Times</strong>: High-frequency data is slow to query, especially over long periods. Downsampling reduces the number of points in a query, speeding up data retrieval.</li><li>🤑 <strong>Reduced Costs</strong>: Storing every second of data gets expensive. Downsampling compresses data into meaningful summaries (e.g. hourly or daily), reducing storage costs.</li><li>🚀 <strong>Scaleable</strong>: Ensures that your system can handle the increasing volume of data generated by the growing number of IoT devices in your system without compromising performance or inflating costs.</li><li>👌 <strong>Simplified Logic</strong>: Pre-calculating common aggregations <em>(6)</em> reduces the need for additional logic and calculations in the queries serving your system.</li></ol><p><em>Additional considerations</em><br>While downsampling is beneficial, there are a few things to watch out for:</p><ul><li><strong>Retaining Critical Information</strong>: Downsampling reduces data, but keeping essential details is important. Choose appropriate time intervals and metrics — sometimes peak or outlier values are more relevant than averages.</li><li><strong>Hybrid Approaches</strong>: You should keep raw, high-frequency data for a short time (e.g., 30 days) for detailed analysis and downsample the rest for long-term storage and reporting.</li><li><strong>Evolving Needs</strong>: Downsampling isn’t a one-time process. Be prepared to revisit or adjust your downsampling logic as business needs, data patterns, or system requirements evolve.</li></ul><p><strong>Methods to downsample your IoT data<br><em>On-Device processing</em></strong><br>On-device downsampling is performed directly on the IoT device before publishing data points (see Figure 1), meaning only the downsampled data points are stored in a time series database.</p><figure><img alt="An IoT device is represented as a microchip with an arrow pointing towards a cell tower with text stating ‘send data’. Another arrow from the cell tower pointing towards a time series database is represented as a cylinder. A box surrounds the IoT device with the text ‘On-device processing’." src="https://cdn-images-1.medium.com/max/1024/1*ghybsmtJi2wkRUJMRTX6_Q.jpeg" /><figcaption>Figure 1: A diagram showing the location where on-device processing typically occurs when publishing IoT data. The location is highlighted by the rectangle with a black outline.</figcaption></figure><p><em>Benefits</em></p><ul><li><strong>Lower Transmission Costs</strong>: Sending smaller, downsampled data reduces bandwidth usage and communication costs.</li><li><strong>Distributed Processing</strong>: Each device processes its data, lightening the load on your infrastructure.</li></ul><p><em>Challenges</em></p><ul><li><strong>Limited Computational Power</strong>: Many IoT devices have limited resources (e.g., CPU, memory), which may constrain the complexity of the downsampling.</li><li><strong>Maintaining Consistency</strong>: Ensuring that all devices apply the same downsampling logic and frequency consistently can be challenging, especially when updating configurations across a distributed network.</li></ul><p><strong><em>Stream processing<br></em></strong>Stream downsampling is usually performed after data points have been published but before they are stored in a time series database (see Figure 2), usually the downsampled data points are stored alongside the raw data points.</p><figure><img alt="An IoT device is represented as a microchip with an arrow pointing towards a cell tower with text stating ‘send data’. Another arrow from the cell tower pointing towards a time series database is represented as a cylinder. A bidirectional arrow intercepts the arrow pointing towards the time series database, pointing towards an icon of a cloud which represents cloud computing. A box surrounds cloud computing with the text ‘On-device processing’." src="https://cdn-images-1.medium.com/max/1024/1*PBatS3FGCP22HyBA8ii0HA.jpeg" /><figcaption><em>Figure 2: A diagram showing the location where stream processing typically occurs when publishing IoT data. The location is highlighted by the rectangle with a black outline.</em></figcaption></figure><p><em>Benefits</em></p><p>· <strong>Scalability</strong>: Designed to handle large, continuous data flows without overwhelming your infrastructure and built to scale scale as the volume of IoT data grows.</p><p>· <strong>Faster Insights</strong>: Monitoring systems or predictive analytics can immediately use aggregated data to trigger alerts or actions without waiting for additional processing.</p><p><em>Challenges</em></p><p>· <strong>Complexity</strong>: Setting up and maintaining real-time stream processing systems can be complex and any delays in data transmission or processing can impact real-time insights.</p><p>· <strong>Error Handling</strong>: Data loss or inaccuracies need to be addressed in real-time, which requires robust error management and monitoring systems.</p><p><strong><em>Batch processing</em><br></strong>Batch downsampling is usually performed at fixed intervals, once the raw data points have been published and stored in a time series database (see Figure 3), the downsampled data points are stored in addition to the raw data points.</p><figure><img alt="An IoT device is represented as a microchip with an arrow pointing towards a cell tower with text stating ‘send data’. Another arrow from the cell tower pointing towards a time series database is represented as a cylinder. A bidirectional extends from the time series database pointing towards the time series database, pointing towards an icon of a cloud which represents cloud computing. A box surrounds cloud computing with the text ‘Batch processing’." src="https://cdn-images-1.medium.com/max/1024/1*5Y1l66pI_YGMQLa8-QYw4Q.jpeg" /><figcaption><em>Figure 3: A diagram showing the location where batch processing typically occurs when publishing IoT data. The location is highlighted by the rectangle with a black outline.</em></figcaption></figure><p><em>Benefits</em></p><p>· <strong>Improved Data Accuracy</strong>: Allows you to back-fill any data captured offline, correct any inconsistencies, and validate the accuracy of the data before running downsampling.</p><p>· <strong>Efficient for Larger Data Sets</strong>: Enables you to downsample at higher intervals over longer periods massively reducing the data stored for long-term storage whilst making it easier to analyse historical data.</p><p><em>Challenges</em></p><p>· <strong>Latency</strong>: Since batch processing isn’t real-time, there is a delay in getting insights which will have a big impact on real-time use cases.</p><p>· <strong>High Resource Usage</strong>: Processing large batches of data can require significant computational resources during the job, especially if the downsampling logic is complex.</p><p><strong>What’s next?<br></strong>If you’re struggling with large-scale IoT data and slow performance, downsampling might be a good fit for your system. Here’s a quick roadmap to guide your implementation:</p><ol><li><strong>Identify Key Metrics</strong>: Identify the key business metrics and underlying data points that need to be retained. This ensures you downsample without losing crucial insights.</li><li><strong>Define Frequency &amp; Aggregation</strong>: Determine the minimum frequency and the appropriate aggregation methods (e.g., max, min, mean, sum) required for each metric.</li><li><strong>Select Method</strong>: Select the best downsampling method for your data. You may need multiple methods depending on the data and use cases.</li><li><strong>Assess Impact</strong>: Test the impact on costs and performance to ensure the benefits are worth the investment.</li></ol><p>In an upcoming blog, I’ll dive deeper into an example downsampling scenario we handled at Hydrologiq using InfluxDB and batch-processing. Stay tuned for more details!</p><p>Have questions about downsampling or IoT monitoring systems? Feel free to connect with me on <a href="https://www.linkedin.com/in/adamayrestorie/">LinkedIn</a> or leave a comment below 💭</p><p><strong>Glossary</strong></p><ol><li><strong>IoT (Internet of Things)</strong>: A network of interconnected devices that communicate and share data over the internet. It’s like a group of overly chatty friends texting each other every little detail: “I’m turning on the lights!” “I just spilled coffee!” 📱💡</li><li><strong>IoT device</strong>: A machine equipped with sensors and software that connects to the internet to send and receive data. Imagine a smart toaster that not only burns your toast perfectly but also texts your fridge to chill the orange juice. 🍞📱🥤</li><li><strong>High-Frequency Data</strong>: Data collected at very short intervals, often seconds apart. It’s like your smartwatch pinging you every 5 seconds to remind you that, yes, you’re still sitting. ⏱️</li><li><strong>Query/Querying</strong>: The process of asking a database for specific information. It’s like asking your fridge, “Where’s the leftover pizza?” and it tells you the exact shelf. 🍕</li><li><strong>Data point</strong>: A single piece of information collected from a device, part of a larger dataset. It’s like one sprinkle on a donut — small on its own, but when combined with thousands of others, it creates a delicious treat. 🍩</li><li><strong>Aggregation</strong>: Summarizing multiple data points into a single value, like averaging or totaling them. Think of it as making a giant burrito by combining all your fridge leftovers into one tasty wrap. 🌯</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33114c58018f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hydrologiq/why-you-should-downsample-your-iot-data-33114c58018f">Why You Should Downsample Your IoT Data</a> was originally published in <a href="https://medium.com/hydrologiq">Hydrologiq</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A hydrogen-powered future: Insights from Hydrologiq’s Senior Software Engineer]]></title>
            <link>https://medium.com/hydrologiq/a-hydrogen-powered-future-insights-from-hydrologiqs-senior-software-engineer-74010fd2cbe2?source=rss----52aec1eea84f---4</link>
            <guid isPermaLink="false">https://medium.com/p/74010fd2cbe2</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[hydrogen]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Adam Ayre-Storie]]></dc:creator>
            <pubDate>Thu, 11 Jan 2024 15:50:11 GMT</pubDate>
            <atom:updated>2024-01-11T15:50:11.213Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Follow me on my journey as Hydrologiq’s first tech hire, in which we will discuss the challenges, architectural decisions, and unique experiences of start-up life in the hydrogen industry 💧</em></p><h3>Me</h3><p>I joined <a href="https://www.hydrologiq.com/">Hydrologiq</a> last June as the first software engineer on the team, it has been a great experience so far but not without its challenges. The first couple of weeks felt like information overload 🤯, as I arrived at a Hydrogen business with just my software credentials to back me up and had a lot to learn. And quickly! But hey, sometimes in life you need a challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nqtVr1j6cK4-kTQp16wLyw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BN-b6BS8ZVUKaAwf33macA.jpeg" /></figure><p>Throughout my career spanning 5 years, I have had a wide range of experience working in different industries and using different technologies. Before joining Hydrologiq I was a senior software engineer at Thoughtworks. In this role I was developing larger-scale web applications for the public sector, one example being the modernisation of a dataset (NaPTAN) for the Department of Transport. As for my early career, I started my first job during a placement year and went on to work at the same company, ADLINK, for a couple of years. During my role at ADLINK, I developed IoT, Edge Computing, and Computer Vision applications and solutions that enabled real-world process improvements.</p><p>Hydrologiq has not disappointed as a great place for me to combine all my past experience: to design and build complex solutions which deliver major value to the end user and implement the key processes that enable this 🛠️.</p><h3>Why Hydrologiq?</h3><p>I want to make a positive impact on the world and helping drive the transition to net zero is a great way to do that. By joining Hydrologiq, I can do just that. I have realised that decarbonising high-impact areas, such as off-grid power is a difficult task, and many businesses are struggling to do so 🏭. Hydrologiq’s vision and expertise accelerates the phasing out of diesel and the adoption of cleaner solutions.</p><p>I also have a passion for being at the forefront of innovation and building data-driven solutions, which is reflected by my past experiences building distributed data services; IoT and AI solutions; and scalable web applications. At Hydrologiq I can combine all of these to help build out Hydrologiq’s scalable platform and be at the forefront of supply chain innovation.</p><p>Being the first developer on the team is a new experience for me and felt like a natural next stage of my career as I always want to push myself to learn and develop new and existing skills. I also realised during my consulting work, that I missed the ability to influence and own products and shape the direction of the business, which I can do at Hydrologiq.</p><p>I also see a massive room for growth 📈. As Hydrologiq expands, I will have many opportunities to grow, gain responsibilities, and own various processes. Examples include hiring new developers and enabling career progression; developing and maintaining technology roadmaps; and fostering a positive work environment.</p><h3>Why Hydrogen?</h3><p>You may be wondering why hydrogen as a fuel? For off-grid scenarios, specifically powering non-road mobile machinery (NRMM) 🏗️, there are some core requirements to determine a renewable power source&#39;s suitability. These include no emissions (clean air and site), transportability (enabling continuous supply), and high energy density ⚡ (enabling high power demand use case). Hydrogen ticks all these boxes beating its competition (biodiesel and batteries + solar) whilst providing multiple other benefits such as the fact a deployment is practically silent and has little ground-level vibrations; there are zero emission and fuel spills; it is reliable and low maintenance as there are no moving parts.</p><p>At Hydrologiq we are accelerating the transition to off-grid electricity powered by Hydrogen, to enable businesses to drastically cut CO2e 🌍♻️. We are creating economically viable solutions to reduce our society’s carbon footprint, building towards the common goal of Net Zero. Using our proprietary tools and hardware, we make deploying hydrogen-powered generators and other hydrogen-powered NRMM <a href="https://www.hydrologiq.com/hydrogen-generator-deployment/">easier, faster, and less risky</a>.</p><h3>Common problems deploying Hydrogen generators</h3><p>When deploying a hydrogen generator, there are three main stages: the planning, the deployment, and the teardown. There are some common problems we see that customers face during the three stages, that Hydrologiq has solved and are solving. Some of these problem statements are as follows:</p><h4>Lack of data</h4><p>This can be split into two categories:</p><ul><li>Lack of existing usage data of live sites 🤔 (construction sites, festivals, events, filmsets, etc.), limits the ability to provide an accurate estimation of the generator(s) and fuel needed for a deployment which increases costs for the customer.</li><li>The lack of independent data reduces customers&#39; ability to gain insight into their existing solutions. During the deployment of a generator, this can lead to many problems such as the inability to deliver the correct amount of fuel at the right time leading to a lack of financial certainty.</li></ul><h4>New technology</h4><p>Using Hydrogen for power generators is relatively new, and adopting new products means customers need to understand how it will affect their business-as-usual processes e.g., refuelling logistics, health, and safety, alongside having confidence in the product.</p><h4>Emerging supply chain</h4><p>Hydrogen is an emerging supply chain. With this comes two main challenges: lack of confidence and high costs. An example that encapsulates both is being able to guarantee fuel being delivered on time and with the correct quantity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qWS08mQbARPlCFircW-iuw.jpeg" /><figcaption>A Hydrogen generator setup</figcaption></figure><p>I would group these problem statements into three main categories: lack of data, data visibility, and a fragmented supply chain. Solving each of these categories is key to the adoption of hydrogen as a fuel, especially in off-grid scenarios.</p><h3>How we are addressing these problems</h3><p>At Hydrologiq we have two products which are addressing these problems: the <a href="https://www.hydrologiq.com/platform/">Hydrologiq Platform</a>, which includes both operational and customer use cases, and the <a href="https://www.hydrologiq.com/hydrologiq-announced-as-winner-of-testbed-grant-competition/">Hydrogen Testbed</a>.</p><h4><em>Hydrologiq Platform</em></h4><p>Our Platform 💧 provides all the information needed for a customer’s hydrogen deployment (timeline, key events, documents, etc…); real-time monitoring of generators deployed at the site, data points can include pressure, power, and weight of hydrogen; fuel forecasting to predict when a re-fuelling event needs to occur; and reporting so being able to provide the raw data which enables them to fulfill their environmental reporting. These are just some of the features the dashboard will provide, and it will continually evolve.</p><h4>Hydrogen Testbed</h4><p>The Hydrogen Testbed is an interactive digital version of the emerging hydrogen supply chain, initially focused on hydrogen-powered generator applications with support from project partners Motive Fuels and Reynolds Logistics, alongside funding from <a href="https://www.digicatapult.org.uk/">Digital Catapult</a>. We will be focusing on developing a digital-first connected 🕸️ supply chain that will enable the standardisation of data in a non-standardised market. Alongside providing an understandable and live view of the hydrogen market. The digital-first supply chain will aim to provide a foundation for the future of the hydrogen market.</p><h3>What’s next?</h3><p>I’m aiming to produce regular blogs, covering a wide range of topics with specific tracks (hopefully including but not limited to) some software engineering challenges and how we overcame them; architectural designs and decisions; more general blogs about life at a start-up; and the challenges that exist within the hydrogen industry.</p><p>Get in touch with me directly if you have any questions! 📧💨</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74010fd2cbe2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hydrologiq/a-hydrogen-powered-future-insights-from-hydrologiqs-senior-software-engineer-74010fd2cbe2">A hydrogen-powered future: Insights from Hydrologiq’s Senior Software Engineer</a> was originally published in <a href="https://medium.com/hydrologiq">Hydrologiq</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>