Ever wanted to control your desktop meditation fountain via the Web? Here is a simple way to achieve that using a few components and AT&T Flow Designer.
First we start by using the Wio Node and a Relay, also going to a screen for feedback and text. Using the Relay we can control the power supply:
Next we add an OLED screen display text information:
All put together (with tape). Thinking of using sugru to hold it all in place.
SoftwareNow that that hardware is all connected, its time setup the Software. We will use the Wio app by Seeed.
STEP 1: Install Android/iOS App
STEP 2: Create your Account
STEP 3: Connect Wio Node to Internet
STEP 4: Virtually interconnect modules with Wio Node and update firmware
- Here is where we add the 2 components we are using: Relay & OLED
STEP 5: Test application using APIs
For testing the API, I used PostMan. Let's test things out by using the Check Status API:
https://us.wio.seeed.io/v1/node/GroveRelayD0/onoff_status?access_token=XYZ
Now let's test out the OLED screen API:
https://us.wio.seeed.io/v1/node/GroveOLED12864I2C1/string/[row]/[col]/[str]?access_token=XYZ
Arguments in URL:
- [row]: uint8_t value, 0~7
- [col]: uint8_t value, 0~15
- [str]: char * value, the string to display
Now that we have everything connected and confirmed our API is working, it's time to move onto ATT Flow Designer. We'll use Flow Designer to create an API to control our fountain and create additional logic.
AT&T Flow DesignerWe can use Flow Designer to bring the API's together.
Here we create the following new API calls:
- /wateroff - turns relay off & sends 'off' text to OLED
- /wateron - turns relay on & sends 'on' text to OLED
- /contact - sends Contact Info text to OLED
- /clear - clears the OLED
Sign up for an account: https://flow.att.io/. Install the code via the Clipboard. https://github.com/jhey/iotfountain/blob/master/attflow-fountain
Now we will create a web page that will let us interact with the new API. We can use jQuery to quickly create simple page with a few buttons. This will allow us to call our four methods; Off, On, Contact, and Clear.
https://github.com/jhey/iotfountain/blob/master/index.html
Now you can control your Meditation Fountain from any web browser! Turn it on from your phone, and put your own messages on the screen. Never again have to worry if you left it on after you leave the office.
Future Plans/Ideas- Control via Alexa or other Natural Language Processing
- Show random inspirational quotes
- Show data stats; stocks, emails, notifications, meetings, etc.
- Add timers
- Many Fountains
Comments
Please log in or sign up to comment.