Beehive Monitor


This topic is dedicated to comments and conversations about the following RuuviLab tutorial:

If you don’t see any comments yet, don’t be afraid to be the first one to contribute!


Just linking to this topic which has good discussion about beehive monitoring:


I am still looking for a way of monitoring my beehives with Ruuvitags and sending the data at intervals of say 10minutes maybe by email to a pc with an accelerometer alarm by email.
Tags need to be nameable.
Hives are in remote areas without power but with mobile phone access.
I like the Mezurem solution of a spare android phone, that could easily be powered by a solar panel, but dont need the SMS message system and would prefer to have the data read on my own pc rather than on the cloud.
Running costs have to be low or very low.
Anyone been working on this?


Now running Meazurem gateway on a raspberrypi zero w with the client on a Samsung S5 running Android 6.0.1
Using a Macbook for ssh access seems to work for me.
At the moment I am still playing with the set up of sensors.
I have a UPS add on board and solar panel coming to power the pi.
One issue I have is adding or updating sensors in the terminal but I am working on it.
It is not a turnkey project and quite a challenge for the newbie to working at terminal level IMHO.
I will update later on success or failure.


What are your specifics for the UPS and Solar panel?

I have had success with the Ruuvi Collector feeding an influx database running on a pi Zero W(no cell phone involved). Not only displaying with Grafana but also downloading data in CSV format as well as extracting data with the influx command (sql like) program.

Seems that it would be easy(for someone with the knowledge) to have a cron invoked script run every 10 minutes like:

influx -precision rfc3339 -database ruuvi -execute “select LAST(temperature), LAST(movementCounter) where MAC =‘D48B9C6C230E’ or MAC =‘C6C30E’230E’” | sendmail

I’d be willing to assist with more details if you are interested.


I just want to be able to monitor and have temp, humidity and movement alarms for my hives.
They are in the countryside with cellphone access but no mains power.
I dont want to spend a bundle and graphs and historical data are of no interest.
Standalone in a weatherproof box.
Remote access for programing would be good too.


The configuration I described previously requires no external services for data collection. Grafana is not necessary but really pretty with no additional cost.
One raspberry pi should be able to monitor multiple hive/ruuviTag sets if they are close enough.

Use the

crontab -e

command to update the cron configuration.

to have all output to be included in an email.
The lines

mm hh dd MM DOW command
00,30 * * * *

cause the script to be executed on the hour (00 minute) and half hour (30 minute), every hour, every day, every month, every DayOftheWeek.

You can add multiple influx commands to the check script which can include LAST(humidity).

As you have said, the additional communications hardware/cost is for the cellular connection. I am not familiar with the SIM7000C GNSS GPS GPRS GSM Expansion Board For Raspberry but a quick overview suggests it would work.

Raspberry pi zero with wifi requires an additional 20% power so after construction of the first system you might sacrifice wifi connectivity for better power and use the raspberry pi without the wifi.

So far what we have discussed can be easily replicated for other bee keepers with very little personalization.


OK let me digest that.

The bit I am missing is how does the Rpi connect to say a giffgaff network at the nearest mast to send me the data it has collected and processed from the ruuvitags, either via an email or data?

A year ago I envisaged sitting at my laptop and reading the tag data being collected by a gateway from my hives positioned many miles away,
And an alarm on my phone if any hive went above a preser temp or was moved.

I am still not there, either with a working solution or a clear understanding of why.


As you referred to giffgaff I expect you are within their service area?


Yes, they use the O2 network here.
I take your point about the power consumption of the Wifi connection.


OK, I’ll look into what they have and get back to you.


A thought: Instead of email messages, consider syslog messages, which could be directly received by your Mac book and/or other hosts. This would allow classification of messages as Emergency, Alert , Critical , Error, Warning , Notice , Info or Debug and control their disposition by settings the configuration file on the Mac.


That looks workable.
And if the collector is logging at say 15min intervals the graph would allow interpolation for any event messages not received.
According to some very quick research a Rpi zero with a BT dongle might need a considerably smaller UPS especially if as you suggest the collecter is only on to provide a timed event.
The alarm function would still be viable just not in realt time with a max 15minute delay that might be a workable tradeoff.


The RuuviCollector, i.e. java program receives ALL ruuvi bluetooth packets usually runs continuously (if you want to capture all data).

The cron process invokes the transmission periodically.

Timing considerations include real life “once you find out there is a problem, how long does it take to get there” and “how fast does the temperature change anyway”. No sense transmitting every 15 minutes if the temperature -mostly controlled by the bees(?)- changes very slowly and if there is a problem it takes you hours to get to the hive. Think about if the problem occurs in the middle of the night! Considering that, the cron invocation of the transmission could be only between 06:00 and 23:00 by simply changing the cron configuration entry on the pi to:

00,30 06-23 * * *

See my notes on cron at

Best to just try you solar/battery config at home and increase solar panel if necessary. Remember you’re running the pi from the battery, charging the batter from the solar panel making dark nights and cloudy days less important. Your choice regarding pi zero W vs pi zero + BT dongle, I’d go with the simpler zero W. Much is up to you including a board that has a clock running off a very small separate battery, using micro amps which can actually shuts down /power up the raspberry pi for minutes/hours if you what to go to the extreme (I would not recommend that). Again in real life you’ve been living with no monitor all this time. Actual milage will vary. Include xxx% safety margin for little additional cost.

Have you seen my data at ?
Feel free to poke around.