Should a maintanance switch be included on the interface board

11 posts / 0 new
Last post
Should a maintanance switch be included on the interface board

As beekeepers we all know that a hive requires work. We add supers, check for new queens, add sugar before winter, ... and probably a lot more.

While working on the data warehouse we have trouble in figuring out when a manipulation was done or when a sudden change in weight is normal operation. Out of these discussions we came up with the idea to have a maintenance switch on the interface board.

The state of the switch is sent with the other data to the central database. This way we can know when manipulations are done. At least with the new data. One remark tough: At work we also have some kind of blackout window we can set when doing maintenance to servers. But We notice that is sometimes forgotten. So something to set maintenance windows after the facts would be great to. ( but then we're off to the software forum, and close to the smartphone app idea in which you can say what you did, and save the condition of the hive etc...

any comments?

Paul's picture
A switch would be easy.

It would be easy to add a switch There are plenty of GPIO lines. I suggest a push button that would add a manipulation/maintenance record to a table as a flag. A push button means it wouldn't get left on.

The manipulation/maintenance record could be added or edited after the fact via a gui interface. I would like to be able to right click on a graph and make a comment and change the quality rating.

Then, either with software or by manual inspection, clean up the bad data around the manipulation change flag.

A "maintenance window". Would that be a start time and end time during which the data is invalid? The push button would either mark the beginning of the window or fall within the window, depending on when it was pressed. A toggle switch could mark the beginning(on) and end (off) of the window but could be left on.

This would be easy to try. If you don't plan on using the rain gauge, that input already has debounce hardware on the hive interface board.

Esa's picture
imho push button that changes

imho push button that changes the state, flag - and that to be possible to change via sw/web page in case forgotten to set/release.

What is the "debounce hardware" you mention ? I don't have the i/f board yet so cannot look...

Paul's picture
Debounce hardware is just an

Debounce hardware is just an RC (1K & .1 mfd. I think) to prevent false triggers from noise.

So, maybe a push button that puts it into maintenance mode? The LED would start flashing. Any data recorded during that time would have it's quality set to 1 (maintenance mode) instead of 5 (raw). Then another push of the button would return to normal mode, the LED would stop flashing and data sent up would have quality set to 5.

I had in mind quality ratings like:
0 Bad
1 Maintenance Mode
2 Suspect. Probably bad
3 Questionable. Strange but I think it is right.
4 Test mode (accurate data but not a hive. Useful for temp drift analysis)
5 Raw
6 Converted
10 Checked and certified good.

Nate's picture
Maintenance Mode Comment


Great ideas on adding maint mode, a couple things, In the software package I work with we call this framing your data, so supplying the mechanism to show/totalize/calculate things based on other conditions

Changing the actual quality of the data seems just a little off though, The data really is correct, the sensors are still valid, but what's going on is what needs to be contextualized.

I suggest a time-series database, and an alarm and event database - these data sets are quite different in their behavior... maintenance mode is really just an event that we can drive other conditions off of - Hive X is in maint mode - use previous temp/humidity values until maint mode is off

ie don't just supply maint mode, supply a mechanism to do that and more - provide the framework for users to answer questions like show me a trend all of the times my hives had pollen patties on, or show me the weight change during the last mite treatment and similar things for other stuff we do with our hives
maintenance mode
Feeding pollen patties
Feeding syrup
Hive Splits
Hive Moves

For simplicity's sake, I like the pushbutton with an associated LED - it gives the beekeeper a very simple mechanism to record that something's happening at the hive.

An LED actually is a valuable addition, for more than just showing we're in maint mode -
If we add alarm logic - show alarm status ie sensor fail, low temp, high temp, etc.
Show network connection status
When we add a new super, we probably want to know if we gain or lose x pounds -
End of timer - perhaps some will want to setup a timer to trigger a monthly/weekly or?? event - show that it's time to do something.
Not an endorsement for this particular one, but LED's can be pretty cheap and waterproof

I think this is an article about directly controlling this chipset with the pi

But to augment it, there should be a editing/input tool available through the website or ?? to also add a maintenance window, or cleanup timeframes we create with the push button.

Also there is normally going to be maintenance activity that we should record to help make sense of what's going on - ie we're doing maint... we're probably adding/subtracting supers, medicating, feeding, counting mites ??? if we could add entries for each hivescale, it would be of great value to give a mechanism to record what we actually did and observed. Whether the input comes from an attached touch panel, a smart phone app, or a web interface - the input methods could be built up after the proper DB schema is in place. We all probably take notes here or there, or use another online tool to save hive inspection data, but it really makes more sense to bring all of this data together under the same data-store. Entering when/what we medicated with is valuable and we need to know, but to be able to correlate years worth of hive data with these events would conceivably be even more valuable.

Maintenance mode activation & Indication - more ideas

The RGB LED idea is good, multi-function is needed. Consider each push adds 15 minutes to a maintenance mode down counter. A 5 second push cancels the maintenance mode event, continuous depression for ten seconds reboots the Pi, resetting power can be challenging at times. The maintenance mode could also be useful for doing sensor calibrations where one does not want calibration to be trended but still need to record the data. So perhaps set the data quality flag to a value like 0 that prevents data from being shown in a trend unless overridden.
Consider a watertight mini push button like this:

Adrian Ogden

Paul's picture

The beekeeper will be able to set maintenance mode by pressing a real switch on the hive or a virtual switch via a smart phone or touch pad GUI. It can also be set remotely from the web GUI and the start, end, context and annotation changed after the fact.

Each press of the button will add 15 minutes to the MM timer.

Holding the switch in for
5 seconds will clear the timer.
10 seconds will reboot the Pi.

The LED can be used to signal MM and display error codes. See LED Alert software

In addition to start and end time, the context and annotation need to be stored.
See New tables for events, context, annotation

The main purpose of maintenance mode is to help understand the data and to filter out (or track) man made changes. We are currently limited to detecting manipulations based on dw/dt. How big was the change and how fast did it happen. It may be obvious to the eye, but we want to do this automatically. Removing a lid, then a few frames, then a super can look a lot like a swarm.

Really like the outcome: I

Really like the outcome: I was afraid first about the push button, but with the led is fantastic.

Paul's picture
maintenance mode switch in image 0.8

I'm playing with the maintenance mode switch. Have it mostly working. Should be in image 0.8. Any more ideas or suggestions on how it should work? For now this will just use a one color LED and change the flash rate. This will work with Hive Interface boards versions 0.2 and 0.3


Sounds awesome! My current approach is to shut down the system during maintenance (I just unplug it, since the power outlet is 3 feet from the hive). A brief gap in the data is better than wildly swinging weight readings. The annotations field will be very helpful as well.

Maintenance Switch

Did anyone ever deploy this switch? I like the idea of pressing the switch to record a change when removing a super or making a change.

Can anyone share their circuit and code for this setup?


Log in to post comments