A friend's father recently made a hatchery and put quail eggs in it. Then, I decided to capture the data from the hatchery and display them in a real time somewhere, where he could see them, even when he is not at home, which was also one of the project's goals.


In the project presented, Raspberry Pi, tiny and affordable computer is used. Also, Raspberry Pi Camera Module for live streaming on YouTube and sensor which measures actual temperature and humidity. The sensor must be connected to the RPi via cables, because it is neccessary to have sensor somewhere inside the hatchery in order to obtain more precise data.

Components used:

 Raspberry Pi with Connected Components
Figure 1 - Raspberry Pi with Connected Components


In RPi is running python script, which serves as mediator between sensor and ThingsBoard. MQTT messaging protocol is used to send data from sensor BME280 to IoT platform Thingsboard via Rasberry Pi. Data are sent every 5 seconds. RPi camera  is used to monitorize eggs and it is possible to broadcast a live stream on Youtube from it, for as long as we need. 

Thingsboard is used,  because it is an open-source IoT platform for data collection, processing, visualization, and device management. There can be collected and stored telemetry data in scalable and fault-tolerant way and visualized data with built-in or custom widgets in flexible dashboards. Finally, dashboards can be shared with everyone.

Scheme of Data Processing and Communication
Figure 2 - Scheme of Data Processing and Communication


In Figure 3. we can see the dashboard, which was created in Thingsboard.  Widgets can be seen, which shows actual temperature and humidity. Also, timeseries line charts showing history of measured temperature and humidity, widget where is video from YouTube inserted, and HTML widget with short description about th project and hatching countdown. These widgets are updated according to sensor data received to Thingsbord from Raspeberry Pi (Figure 4).

Thingboard Dashbord with Received DataFigure
Figure 3 - Thingboard Dashbord with Received DataFigure
Latest Telemetry in Thingsboard Console
Figure 4 - Latest Telemetry in Thingsboard Console

In Figure 5 is screenshot from Youtube live stream. Video backup cannot be included, because Youtube allows only to save 8 hours of stream, but stream was running for few days. Seeing if something is happening in hatchery in last hatching day is very important for all breeders.

Video Stream Screenshot
Figure 5 - Video Stream Screenshot


Based on dataset the Graph 1 was plotted. In Graph 1 it is shown temperatureand humidity from last three days of hatching (from 21.4.2021 9:00:00 to 23.4.2021 11:00:00). Graph is divided into three parts:

Measured Temperature and Humidity
Graph 1 - Measured Temperature and Humidity


With the project presented it was analyzed sensor data of temperature and humidity from hatchery during the hatching of quails. According to high humidity fluctuations and temperature rising in results it is possible to say that quails has started to hatch even when stream is not presented.

One day old quails
Figure 6 - One day old quails