DataGoo’s firmware is open-source and can be downloaded from GitHub: https://github.com/yesimon/datagoo. Feel free to send a pull request if you want to contribute changes either to the source code or the documentation.
For write access to the repository, please contact Simon at email@example.com.
Download the required external libraries (see Software Libraries) and place them in the Arduino libraries/ directory. Open datagoo.ino, compile and upload using the GUI.
A significant portion of our code is based on the OpenEnergyMonitor project, which is building an open source energy monitoring solution targeted at homes in the UK/Europe (and to a lesser extent the US). Their library does much of the heavy lifting for us in converting the raw voltage and current inputs coming into the DataGoo device into power measurements.
We forked their code base primarily because we needed to output our readings over GSM and to an SD logger, rather than over a custom (low-power) RF system which OpenEMon uses to transmit their data.
There isn’t exactly a library for communicating with the GSM module; instead, it presents itself as a Serial device which can read and write messages.
Also, see this tutorial for some example code using the GSM module.
The library to write text to SD cards is part of the Arduino standard library. It lets us write to the SD card just by creating a file and then calling file.print().