This Software is build for Beekeepers, to collect some measurements and allows you to get some insights in your hive.
With this you can automatically measure:
- The Weight
- The Temperature (outside and inside the Hive)
- The Battery Voltage
Also it transmits to any MQTT Server. By using the deep sleep mode, you will can use it nearly several weeks. In addition with a solar cell, you are free to use without a powerplug!
You can Update your device by connecting it to your pc, or you use the OTA method.
This project will not work alone, so it has dependencies.
Actually it was Build and Testet on the following devices
- D1_Mini
- D1 Mini Huzzah
- ESP 8266 Devboard
This Software is based on the Homie for ESP8266 Framework.
The following libaries are required:
- HX711
- RunningMedian
- Homie-esp8266
- ArduinoJson@^5.13.4
- OneWire@^2.3.5
- DallasTemperature@^3.9.1
First of all, the follwing commands required an installation of Platform IO. You can install it with the follwoing command:
setup-virtualenv
You can Build your firmware very easyly with the following command:
make build-complete
After a successfull build you can upload it to your connected device with:
make upload-firmware
In some cases you have multiple device connected. In this case, you must set the port to upload before with this command:
export PLATFORMIO_UPLOAD_PORT=/dev/ttyUSB0
This upload the firmware throught the /dev/ttyUSB0 port.
export PLATFORMIO_UPLOAD_PORT=/dev/ttyUSB0
make upload-config
The following section will describe the hardware construction
I Ordered the following parts from my local seller
- 1 x Hx711
- 1 x Solarcell (If you use the POWER of the sun :))
- 1 x Lipo with 3.7 Voltage and 1200 mA
- 1 x H30A Weight cell (from Bosche)
- 1 x Wemos D1 mini Huzzah
- 1 x DS18B20
- 1 x S8050 as minimal switch curcuit.
- 1 x 210R
- 1 x 10K
- 1 x TP4056
Together you can wire it up lik this schematic circuit:
I was sometimes confused about the wiring of the loadcell to the HX711. So I decided to write down the wirings here to:
The Configuration is done with an json file. An example of it looks like this:
{
"wifi": {
"ssid": "SSID",
"password": "mysecret"
},
"mqtt": {
"host": "192.168.178.55",
"port": 1886,
"base_topic": "",
"auth": true,
"username": "username",
"password": "password"
},
"name":"hive-teststand",
"ota": {
"enabled":false
},
"device_id":"hive-teststand",
"settings": {
"sleepTime": 3600,
"sendInterval": 320,
"weightOffset": 244017.00,
"kilogramDivider": 22.27
}
}
The following table will give you more insights about the settings.
Setting | Description |
---|---|
wifi.sid | the wifis name. |
wifi.password | The password for the wifi |
mqtt.host | The host for the mqtt. This can be a dns name or a ip address. |
mqtt.port | The Mqtt Port. |
mqtt.base_topic | If there is a prefix required for a topic, then you can set here the basetopic. |
mqtt.auth | true when using authentication, or false when not using it |
mqtt.username | The username when authentication is configured. |
mqtt.password | The password when authentication is configured. |
name | This is the device name. This will shown up in the router later |
ota.enabled | true to enable _o_ver _t_he _a_ir update. |
device_id | The device ID, possible the same as name. |
settings.sleepTime | The Sleepingtime in seconds |
settings.sendInterval | The intervall to send, the sleep time will be different. When you have a send intervall from 60 seconds and a weight intervall of 90 seconds it will take 2 rounds of wake up |
settings.weightOffset | The weight offset. This is neccessary for the adjustment of the weightcell. Because there are some base weights. |
settings.kilogramDivider | The divider to get the kilograms. |
After you modified the configuration to your setting, you can upload this to your device.
make upload-config
I use this devices for my hives to. So I am not ready yet.
For future Releases I planning to improve some thing and extend it with the following planned features:
- Support Lora
- Adding custom Webinterface to Configure the Device within the wireles connection
- Adding Maintenance Mode (Especcially when you work at the bees)
Feel free to suggest me more Features.