Contents

How to connect a fridge to the internet

The question

What is the best answer to the following question:

How to connect a fridge to the internet?

The (short) answer

Why would you like to do that? What do you want to achieve?

The (long) answer

There are multiple ways to connect a device (i.e. a fridge) to the internet (or, to be more precise, to some backed system).

Let’s not start by listing all the ways to achieve that specific task. Sometimes it is tempting to jump directly into technical details and start designing/implementing the solution.

In the actual engagement, that is typically not the best approach.

The (right) question

Before giving any technical advice, let’s ask a few questions:

  • what is the business goal?
  • what is the business value?
  • what kind of data do you want to send from that fridge to your backend system?
    • will you send any personally identifiable information (PII)?
  • what is the expected frequency of messages sent by that fridge?
  • what is the expected size of a message payload?
  • how critical is that data?
    • do we need to ensure that every single message is going to be delivered to the backend system?
    • will the backend system tolerate duplicated messages?
  • how the backend system will process this data?
    • as stream?
    • in batches?

Those are just a few sample questions to start the actual conversation.

The (right) answers

Those are a few examples, how the answers to the above additional questions can impact our final solution:

PII data

Personally identifiable information (PII) data needs to be treated with super care. You need to ensure that this data remains confidential under any circumstances - even when your system got compromised.

There are multiple ways to secure this data - you can choose the right approach once you understand how PII data will be used to generate the business value.

Expected frequency and size of messages

The expected frequency and size of messages impact our implementation options.

Let’s use the AWS cloud as a sample backend.

Big, infrequent messages

In this case, I would recommend transferring data from the fridge directly to S3 Bucket.

Small, infrequent (or medium frequency) messages

I would suggest the MQTT messages and ask additional questions:

Should we deliver those messages to multiple subscribers?

If yes, then let’s use custom MQTT topics handled by the AWS IoT message broker.

If not, then let’s use the Basic Ingest to reduce the messaging cost.

Critical data

If we need to ensure that every message will be delivered, then we need to use MQTT QoS1 or QoS2 (I explained the MQTT QoS in this post).

If we use the MQTT QoS1 then the backend system needs to be able to handle potential duplicated messages.

Frequent messages

Depending on the Edge configuration, I would use the Greengrass Stream manager or Kinesis Data Firehose.

Summary

There are multiple ways to achieve the same high-level goal in every Internet of Things initiative. You need to be careful not to jump directly into a solution without understanding the actual goal (and defining the technical requirements).

The better you will understand the expected business outcome, the more appropriate solution you will be able to design.

Support quality content❤️ Donate💰

Sign up for news: (by subscribing you accept the privacy policy)