[PYTHON] I compared wireless IoT sensors from one end (temperature and humidity sensor edition)

IoT and wireless communication

Speaking of IoT, sensors! RaspberryPi! So, as you can see by actually using it,

** Wiring is an obstacle anyway! ** (The image is my octopus leg) takoashi.jpg

If the number increases a little, it will look like a hacker's room, and there is a risk of getting caught in the code. If you make it wireless, you can manage many sensors with Raspberry Pi without spoiling the appearance and safety!

Comparison of wireless IoT sensors

So which wireless sensor should I buy? I thought about it, but there are almost no sites that I actually compared. So, in the spirit of the human pillar, I actually purchased a sensor with Bluetooth Low Energy (BLE) connection and compared it.

Sensor used for comparison

We chose the temperature / humidity sensor that seems to be the most in demand, and the one that can acquire data by API. ・ Omron Environment Sensor BAG Type (2JCIE-BL01)Omron Environment Sensor USB Type (2JCIE-BU01) ・ [Inkbird IBS-TH1 mini](https://www.amazon.co.jp/Inkbird-%E3%83%96%E3%83%AB%E3%83%BC%E3%83%88%E3% 82% A5% E3% 83% BC% E3% 82% B9-% E6% B8% A9% E6% B9% BF% E5% BA% A6% E3% 82% BB% E3% 83% B3% E3% 82 % B5% E3% 83% BC-Android-IBS-TH1 / dp / B07D74CQLJ) ・ [Inkbird IBS-TH1](https://www.amazon.co.jp/Inkbird-IBS-TH1-Bluetooth-%E5%A4%96%E9%83%A8%E3%83%97%E3%83 % AD% E3% 83% BC% E3% 83% 96% E4% BB% 98% E3% 81% 8D-% E3% 82% B9% E3% 83% 9E% E3% 83% 9B% E3% 81% A8% E9% 80% A3% E6% 8E% A5% E3% 81% A7% E3% 81% 8D / dp / B07D75H734 / ref = pd_aw_sbs_201_3 / 356-7389076-5979439?_encoding=UTF8&pd_rd_i=B07D75H734&pd_rd_r=184 4e16-8524-c984893af9bd & pd_rd_w = Ip0MD & pd_rd_wg = lcDuD & pf_rd_p = bff3a3a6-0f6e-4187-bd60-25e75d4c1c8f & pf_rd_r = 939W116VQ9B4YV5DQ69A & ps ・ SwitchBot Thermo-Hygrometer (* For comparison: Nature Remo ‥ Wifi-connected smart remote controller)

Omron environment sensor BAG type (2JCIE-BL01)

オムロン環境センサ.png (2JCIE-BL01 on the left)

Price: ¥ 9,350 @ [Chip One Stop](https://www.chip1stop.com/view/dispDetail/DispDetail?mpn=2JCIE-BL01&partId=OMRO-0134726&keyword=%E3%82%AA%E3%83%A0% E3% 83% AD% E3% 83% B3% E3% 80% 80% E7% 92% B0% E5% A2% 83% E3% 82% BB% E3% 83% B3% E3% 82% B5) * Price Is all tax included Size: 46 x 39 x 15 mm Weight: 19g (including batteries) Battery: CR2032 (button battery) Comment: Made by OMRON, which Japan is proud of in the world! The price is a little higher

Omron Environmental Sensor USB Type (2JCIE-BU01)

オムロン環境センサ.png (2JCIE-BU01 on the right) Price: ¥ 10,902 @ Digikey Size: 29 x 14 x 7 mm Weight: 3g Power supply: USB supply Comment: Omron in the world Part 2! This is wired (USB) only for power supply

Inkbird IBS-TH1 mini Inkbird_mini.jpg Price: ¥ 2,899 @ [Amazon](https://www.amazon.co.jp/Inkbird-%E3%83%96%E3%83%AB%E3%83%BC%E3%83%88%E3% 82% A5% E3% 83% BC% E3% 82% B9-% E6% B8% A9% E6% B9% BF% E5% BA% A6% E3% 82% BB% E3% 83% B3% E3% 82 % B5% E3% 83% BC-Android-IBS-TH1 / dp / B07D74CQLJ) Size: 35 x 35 x 10 mm Weight: 13g Battery: CR2032 (button battery) Comment: Compactness is attractive

Inkbird IBS-TH1 Inkbird_IBS-TH1.jpg Price: ¥ 3,399 @ [Amazon](https://www.amazon.co.jp/Inkbird-IBS-TH1-Bluetooth-%E5%A4%96%E9%83%A8%E3%83%97%E3% 83% AD% E3% 83% BC% E3% 83% 96% E4% BB% 98% E3% 81% 8D-% E3% 82% B9% E3% 83% 9E% E3% 83% 9B% E3% 81 % A8% E9% 80% A3% E6% 8E% A5% E3% 81% A7% E3% 81% 8D / dp / B07D75H734 / ref = pd_bxgy_3) Size: 56 x 56 x 17 mm Weight: 31g Batteries: AAA batteries Comment: With probe. Can be used without a probe

SwitchBot Thermo-Hygrometer

switchbot.jpg Price: ¥ 1,980 @ [Amazon](https://www.amazon.co.jp/SwitchBot-%E3%82%B9%E3%82%A4%E3%83%83%E3%83%81%E3% 83% 9C% E3% 83% 83% E3% 83% 88-% E3% 82% B9% E3% 82% A4% E3% 82% B9% E8% A3% BD% E3% 82% BB% E3% 83 % B3% E3% 82% B5% E3% 83% BC% E3% 82% B9% E3% 83% 9E% E3% 83% 9B% E3% 81% A7% E6% B8% A9% E5% BA% A6 % E6% B9% BF% E5% BA% A6% E7% AE% A1% E7% 90% 86-GoogleHome-IFTTT% E5% AF% BE% E5% BF% 9C / dp / B07L4QNZVF) Size: 55 x 55 x 24 mm Weight: 69g Batteries: AAA batteries x 2 Comment: Overwhelming cost performance despite having a screen

Comparison method

An experiment was conducted to compare the following performance. For how to get the data, ** See this article **

Performance to consider with wireless sensors

I compared the following 6 items

1. Measurement accuracy

If the accuracy is poor, it cannot function as a sensor. ** Difference from the average of all sensors of temperature and humidity ** was measured

2. Reliability

If data acquisition fails and there are many missing values, analysis becomes difficult. ** We measured the probability of getting data correctly ** (whether it is a missing value)

3. Response time

If one measurement takes 10 minutes, you can't log properly. ** How many seconds it takes to acquire data with Rapsberry Pi ** was measured as a reference

4. Battery life

If the battery runs out in two weeks, it will be difficult to replace it, and the battery cost will be high, making it impossible to operate for a long time. ** Measured how many months it will take for the battery to run out ** (updated from time to time)

5. Size

There is no point in wireless with a sensor that is too large! ** Describe the size of 3 sides **

6. Price

No matter how good the sensor is, the price is 100,000 yen! If you are told, "Just measure the temperature and humidity, it's a little ..."! ** Price as of June 2020 **

experimental method

・ Period: 6 / 2-7 / 10 (interrupted due to battery replacement, router replacement, etc.) ・ Measurement interval: 1 time / 5 minutes ・ Number of measurement points: 8834 points ・ Measurement location: As shown in the figure below, measurement is performed in a box installed indoors, and the sensor position is randomly replaced once a day so that location dependence does not occur. sensors_in_box2.jpg

result

I will explain the comparison results in detail. For those who want to know only the main points, I think it is enough to read only the "conclusion".

Conclusion

We have created a star chart for each sensor. ◎: 2 points 〇: 1 point △: -1 point ×: -3 points Scored by (evaluate minus to a large extent)

Omron BAG type Omron USB type Inkbird IBS-TH1mini Inkbird IBS-TH1 Switchbot (Nature Remo)
Measurement accuracy(temperature) (△)
Measurement accuracy(Humidity) (◎)
Measurement success rate (◎)
Response time (〇)
Battery life 〇~ × 〇~ 〇~ (◎)
size (×)
price △¥9,350 △¥10,902 〇¥2,899 〇¥3,399 ◎¥1,980 (△¥9,900)
Comprehensive judgment 〇(9 points) 〇(7 points) △(3 points) ◎(10 points) 〇(7 points) (Not judged)

・ ** Impression that everything except Inkbird IBS-TH1mini can be used without any problems ** (Inkbird IBS-TH1mini has a battery life ...) ・ ** Recommended is Inkbird IBS-TH1 ** (non-mini) ・ ** Omron BAG type ** for small size or use at a distance of 5m or more ・ ** If you want a bargain, Swithbot ** ・ ** Omron USB type (+ mobile battery) ** if you want to maximize battery life ** -Response time is slightly faster in Connect mode than in Broadcast mode, but trade-off with battery life ・ If you are using a ** WiFi router ** nearby, the Bluetooth will be more stable if you mainly use ** 5GHz ** (2.4GHz interferes with Bluetooth)

Comparison details for each performance

1. Measurement accuracy

** Difference from the average of all sensors of temperature and humidity ** was measured

·temperature The temperature difference from the average over the entire period is as follows.

Omron BAG type Omron USB type Inkbird IBS-TH1mini Inkbird IBS-TH1 Switchbot (Nature Remo)
Temperature difference from the average +0.122℃ +0.08℃ +0.10℃ +0.11℃(1st), +0.04℃(2nd) -0.123℃ -0.32℃
Judgment (△)

To determine if the above difference is due to individual sensor differences The temperature difference from the average was totaled for each day to make a box plot. 温度箱ひげ図.png

Nature_Remo_1 is far off from the other sensors, and SwitchBot_Thermo_1 is also off a bit. These are differences that exceed the variations in the box plot, and can be said to be individual differences of the sensors.

In any case, except for Nature_Remo, the temperature difference is within 0.2 ° C even at the quartile. Considering that even analog thermometers are mainly guaranteed to have an absolute temperature of ± 1 ° C, ** It seems to be a fairly reliable value ** (Nature_Remo has a temperature measurement resolution of around 0.7 ° C in the first place, and it is undeniable that it is slightly insufficient compared to other sensors.)

** ・ Humidity **

Omron BAG type Omron USB type Inkbird IBS-TH1mini Inkbird IBS-TH1 Switchbot (Nature Remo)
Humidity difference from average +0.77% +1.96% +3.20% -0.82℃(1st), -1.12%(2nd) -1.35% +1.53%
Judgment (◎)

As with the temperature, the temperature difference from the average is tabulated for each day to create a box plot. 湿度箱ひげ図.png

IBS-TH1mini and Omron_USB are disconnected from other sensors, In particular, IBS-TH1mini has a difference of nearly 4%, which makes us feel a little uneasy about the absolute accuracy.

** ・ Comparison of temperature and humidity accuracy ** Difference in temperature quartile 0.2 ° C ÷ Absolute value of temperature 20 ° C = 1% order Humidity quartile difference 4% ÷ absolute humidity 40% = 10% order As you can see, the humidity has a larger single-digit individual difference, and it can be said that the accuracy is poor. If humidity accuracy is required, it seems that calibration (correction using a high-precision hygrometer or the difference from the above average) is necessary.

2. Reliability

** We measured the probability of getting data correctly ** (whether it is a missing value)

Omron BAG type Omron USB type Inkbird IBS-TH1mini Inkbird IBS-TH1 Switchbot (Nature Remo)
Trial 8834 8834 8834 8834(1st), 5444(2nd) 8834 8834
success 8816 8808 8791 8823(1st), 5439(2nd) 8717 8831
Failure 18 26 43 11(1st), 5(2nd) 117 3
success rate 99.80% 99.71% 99.51% 99.88%(1st),99.94%(2nd) 98.68% 99.97%
Judgment (◎)

Overall, there is a clear difference in price, but the relatively inexpensive Inkbird IBS-TH1 is doing well. I'm surprised that the sensors sold on Amazon for 3000 yen exceed 99.9%, which is said to be a guideline for industry.

** ・ Impact of interference with WiFi ** In addition, during this experiment, I replaced the router on 6/15 and changed the WiFi line in the house from 2.4GHz band main to 5GHz band main, but As shown in the figure below, the success rate (vertical axis) tends to increase after 6/15 (especially Omron's two sensors). 成功率折れ線グラフ.png

The following is a summary of the success rates before and after router replacement. With the exception of the almost unchanged Inkbird IBS-TH1mini, the success rate is clearly higher (bold is over 99.9%).

Omron BAG type Omron USB type Inkbird IBS-TH1mini Inkbird IBS-TH1 Switchbot (Nature Remo) Number of trials
Before replacing the router(2.4GHz)success rate 99.50% 99.29% 99.53% 99.79%(1st),-(2nd) 97.88% 99.91% 3390
After replacing the router(5GHz)success rate 99.98% 99.96% 99.50% 99.93%(1st),99.94%(2nd) 99.17% 100.0% 5444

[This site](https://houwa-js.co.jp/blog/2018/06/20180629/#:~: text=%E3%81%BE%E3%81%9F%E9%9B%BB % E6% B3% A2% E5% 88% B0% E9% 81% 94% E8% B7% 9D% E9% 9B% A2% E3% 82% 82,% E3% 81% 95% E3% 81% 9B% E3% 82% 8B% E3% 81% 93% E3% 81% A8% E3% 81% 8C% E5% 87% BA% E6% 9D% A5% E3% 81% BE% E3% 81% 99% E3% As stated in 80% 82) It seems that 2.4GHz WiFi and Bluetooth are prone to interference, but it is thought that the effect is also reflected in the success rate of this experiment.

So, in order to improve the reliability of the sensor, ** "If you are using the WiFi router in the same place as the Bluetooth sensor, it is better to use 5GHz as the main" ** I can say

3. Response speed

** How many seconds it takes to acquire data with Rapsberry Pi ** was measured as a reference

Omron BAG type Omron USB type Inkbird IBS-TH1mini Inkbird IBS-TH1 Switchbot (Nature Remo)
Average response time 4.08 seconds 0.84 seconds 2.85 seconds 2.75 seconds(1st), 2.78 seconds(2nd) 4.36 seconds 2.36 seconds
Judgment (〇)

The Omron USB type responds quickly, and the Omron BAG type and Switchbot, which have to wait for the timeout value, are slightly slower. In any case, I think it's fast enough for logging once every few minutes.

4. Battery life

** Measured how many days it will take for the battery to run out ** (updated from time to time)

Omron BAG type Omron USB type Inkbird IBS-TH1mini Inkbird IBS-TH1 Switchbot (Nature Remo)
Days to run out of battery - Wired 26th(First time),18th(Second time),14th(Third time),12th(4th) - - Wired
Judgment 〇~ × 〇~ 〇~ (◎)

It's been about 2.5 months since the operation started, but the batteries are not dead except for Inkbird IBS-TH1mini.

On the other hand, ** Inkbird IBS-TH1mini has run out of battery 4 times **, and the battery has run out in less than 3 weeks on average. It is less than 1/4 of the period of Omron BAG type using the same CR2032 button battery. Amazon's review also says that the battery will run out soon, This fact alone made me feel that the Inkbird IBS-TH1mini was a delicate choice.

5. Size

** Describe the size of 3 sides **

Omron BAG type Omron USB type Inkbird IBS-TH1mini Inkbird IBS-TH1 Switchbot (Nature Remo)
3 sides size(mm) 46×39×15 29×14×7(Wired) 35×35×10 56×56×17 55×55×24 74x74x18(Wired)
Judgment (×)

I don't think it's particularly disturbing, except for the Omron USB type, which is powered by wire.

6. Price

** The lowest price at the time of the survey (June 2020) ** is listed.

Omron BAG type Omron USB type Inkbird IBS-TH1mini Inkbird IBS-TH1 Switchbot (Nature Remo)
price ¥9,350 ¥10,902 ¥2,899 ¥3,399 ¥1,980 ¥9,900
Judgment (△)

Reliable and reliable OMRON is still expensive. It seems that there is no choice but to convince you that it is a guarantee and a support fee. Even though it is the cheapest, Switchbot with LCD display has outstanding cost performance.

Additional validation: Change in success rate and response time with distance

Actually, it seems that it is often used at a distance from the Raspberry Pi on the receiving side, so I experimented with the effect of the distance and obstacles on the success rate and response time. [Experimental conditions] ・ Period: 7 / 11-7 / 17 (interrupted due to battery replacement) ・ Measurement interval: 1 time / 5 minutes ・ Number of measurement points: 1462 points

success rate

Omron BAG type Omron USB type Inkbird IBS-TH1mini Inkbird IBS-TH1 1st Inkbird IBS-TH1 2nd Switchbot
distance 5m (0.5m(Same place as the above experiment)) 4m 2m 5m 4m
Obstacle Glass door&curtain(Outdoor) (wooden box) None sofa Wooden door None
Success rate after release 99.93% 99.93% 98.70% 99.04% 98.43% 99.17%
Success rate before releasing 99.98% 99.96% 99.50% 99.93% 99.94% 99.17%

The success rate across the board is deteriorating, and it seems that both distance and obstacles are affected. On the other hand, Broadcast mode Omron BAG type and Switchbot use the trick of extending the timeout value, but The success rate has not deteriorated. ** If distance or obstacles are tight, you may want to choose a Broadcast mode sensor that can be adjusted with a timeout value **.

Acquisition time

Omron BAG type Omron USB type Inkbird IBS-TH1mini Inkbird IBS-TH1 1st Inkbird IBS-TH1 2nd Switchbot
distance 5m (0.5m(Same place as the above experiment)) 4m 2m 5m 4m
Obstacle Glass door&curtain(Outdoor) (wooden box) None sofa Wooden door None
Average response time after release 5.15 seconds 0.78 seconds 3.09 seconds 3.14 seconds 3.25 seconds 5.45 seconds
Average response time before release 4.08 seconds 0.84 seconds 2.85 seconds 2.75 seconds 2.78 seconds 4.36 seconds

取得時間箱ひげ図_離した後.png

The Omron BAG type and Switchbot with a longer timeout value, as well as others, are longer depending on the distance. However, I think it's a level that is not a problem for logging once every few minutes **

That's all for this article. Thank you for watching till the end!

Recommended Posts

I compared wireless IoT sensors from one end (temperature and humidity sensor edition)
Raspberry + am2302 Measure temperature and humidity with temperature and humidity sensor