Open Hive GSM and WiFi sensor nodes
Tip
You might want to read this document on our documentation space, all inline links will be working there.
Introduction
This hybrid firmware supports two different hardware devices. Telemetry data is transmitted using HTTP. Both HX711 and ADS1231 load cell sensor chips are supported. The most recent firmware version is available at node-gprs-http.ino.
Platform and supported peripherals
Board
Open Hive Box GSM: Seeeduino Stalker v2.3 with ATmega328 MCU and GPRSbee GSM modem or
Open Hive WiFi Node: Adafruit Feather HUZZAH with ESP8266 MCU (Fritzing wiring)
Sensors
HX711 ADC weigh scale breakout board or
ADS1231 ADC weigh scale breakout board
DS18B20 digital thermometer
See also
Nodes with identical hardware: Basic WiFi/MQTT sensor node and ESP8266 beehive scale based on Homie
Setup
Clone git repository
# Get hold of the source code repository including all dependencies
git clone https://github.com/hiveeyes/arduino
# Select this firmware
cd node-gprs-http
Configure firmware
Have a look at the source code node-gprs-http.ino and adapt feature flags and setting variables according to your environment:
When using a HX711 sensor:
#define isScaleHX711
When using an ADS1231 sensor:
#define isScaleADS1231
Enable AVR ATmega328 with GPRSbee GSM modem:
#define isGSM
#define APN "internet.eplus.de"
Enable ESP8266 with integrated WiFi:
#define isWifi
#define WLAN_SSID "your-ssid"
#define WLAN_PW "your-pw"
Configure load cell calibration settings:
// Use sketches "scale-adjust-hx711.ino" or "scale-adjust-ads1231.ino" for calibration
// The raw sensor value for "0 kg"
const long loadCellZeroOffset = 38623;
// The raw sensor value for a 1 kg weight load
const long loadCellKgDivider = 11026;
Tip
Read about Firmwares for load cell adjustment to get these values.
Build instructions
Build
The build system is based on PlatformIO.
Build firmware:
make
After successfully building it, you will find firmware images at
.pio/build/nodemcu/firmware.bin
.pio/build/nodemcu/firmware.elf
Upload to MCU
export MCU_PORT=/dev/ttyUSB0
make upload