There are two main differences between off the shelf commercial sensors and sensors that you create yourself using various sensor modules and Arduino/ESP32 microcontrollers. They are:
- Connection Technology
- Data produced
Connection Technology
Commercial sensors for home use are predominantly wireless sensors using Zigbee, Zwave and Wi-Fi.
Although Wi-Fi is basically ubiquitous in most homes it generally requires using the manufacturers cloud system to add and manage the device.
Zigbee and Zwave are not normally present in most homes and so require some sort of Hub. However they can be easily made to work with a local system and don’t require the cloud or hardware flashing to achieve this.
Creating your sensors using ESP32 or similar lets you utilise Wi-Fi in local environment.
It also lets you create wired sensors.
However it is only an option for those who are technical.
Data Produced
Commercial sensors often publish considerably more information than just the measurement being monitored, including:
-
Temperature and humidity readings.
-
Battery level.
-
Wi-Fi or Zigbee signal strength.
-
Firmware version.
-
Device availability.
-
Diagnostic and status information.
DIY sensors, on the other hand, can be designed to publish only the information required by the application.
For example, a DIY temperature sensor might publish:
{
"temperature": 21.5,
"humidity": 55
}
Whereas a commercial device might publish additional information like:
{
"temperature": 21.5,
"humidity": 55,
"battery": 87,
"rssi": -65,
"linkquality": 120,
"voltage": 3.1
}
When combined with MQTT as is normal with commercial sensors you also have more control over the topic structure
Building you own sensors is not necessarily cheaper than using commercial sensors but it helps you understand smart home systems from data collection,communication and automation.
Summary
DIY smart home sensors are only really and option for the technical savvy but it offers far flexibility than simply using off the shelf commercial ones. It s however not necessarily any cheaper.
Related tutorials and resources:
- Sensors and Actuators- Overview for Beginners
- Grouping Smart Home Devices
- HTTP vs MQTT for Smart Home Devices