Skip to main content

Posts

Showing posts from October, 2017

Source Control for Google App Scripts

Google App Script (GAS) is a very versatile tool for writing scripts to control many of the GSuites and Google Cloud services. One can build many small applications using GAS and hosts it seamlessly on GDriver for free. It has a built-in editor, debugging tool and logging of logs to StackDriver. The main drawback I had with GAS is the difficulty to create save the scripts to source control like Github.

Fortunately, danthareja shared his tools to read/write app script into GDrive seamlessly, but the script has a limitation, it can only handle a single project. This is because it is writing the OAuth information into %UserProfile%\.gapp.

I wrote a simple wrapper script pull.bat and push.bat that synchronous the App Script.

 pull.bat
copy .gapps %UserProfile%\.gapps gapps init [REPLACE YOU PROJECTID] -o Copy the local version of the ".gapps" to the %UserProfile% directory and overwrite the local copy of the script file.

push.bat
copy .gapps %UserProfile%\.gapps gapps push C…

Journey into Google Cloud IoT Core with ESP8266 and Mongoose OS

Google recently take the IoT Core to Public Beta. IoT Core is one of the product lines of Google entry to the IoT arena. It is a device registry for controlling and tracking the IoT devices. On top of this, it provides connectivity to the rest of the Google services. Below is the standard diagram provided by Google for the IoT Core.

As we can see, there are 10 big parts in this entire chain (including the edge devices). Some parts are more complicated than the others. For this article, I will start the journey by exploring the following path.
I will be using an ESP8266 running on the Mongoose OS because Mongoose OS has native support for Cloud IoT Core. This will reduce the work required to perform the authentication between the device and the IoT Core.
ESP 8266 & Mongoose IoT Core setup Mongoose OS website has a set of setup instructions on configuring the devices to connect to IoTCore. The Mongoose OS example stopped at when the message is successfully delivered to PubSub. The P…

A new chapter has begun

Just moved into the Co-Working space in LaunchPad. LaunchPad is Singapore version of Silicon Valley.

A new chapter has begun.



ESP Easy

ESP Easy is an interesting piece of firmware, it really makes interfacing to an ESP 8266 a breeze. It has a very comprehensive user interface to configure practically everything:

MQTT setupAll the GPIO pins behaviour.Configure the supported sensors setting.Configure the OLED to display the value of the sensors.and more... In this setup, I used my custom Wemos D1 Mini shield extender to connect to additional I2C devices. I have connected to a BMP280 temperature/pressure sensor and a TSL2561 luminosity sensor. For fun, I have also connected the DHT11 temperature/humidity sensor.


All this setup is done without writing a single line of code. Amazing. Kudos to ESP Easy. One interesting observation, the temperature reading from DHT11 and BMP280 differs by abt 1.5 to 2 C. I wonder which sensor is accurate?