Fork me on GitHub

Blog

Your Agilart programs are now taking off using COSM.com

Tags: Raspberry Pi, cosm

Things get a lot better when you can control your devices from the Network. The Internet of Things movement is getting more and more close to everything we do. The cosm.com (pachube) platfrom provides a great way to make everything talk to the Internet. Now we developed an Agilart Feed Widget for Cosm.com that aims to ease post your changes in your Cosm.com feeds.

Let’s have a look at one very common Home Automation scenario and see how we can add Agilart Feed Widget and monitor what’s happening from the Internet. Imagine that it’s Winter and it’s cold outside. You’d love to to keep your home nice and cosy by assuring that it is always the right temperature. Let’s simulate this situation in an Agilart Program. We want to make sure that whenever it is less than 22 degrees in the room, the heater will be on.

Here is what we can do using visual blocks:

We have to drag and drop the blocks from the Widgets area and connect them together using wires. Here the ON and OFF buttons are physical or HTML entry points for starting and stopping the process. This could be a hardware button connected to our controller or an HTML button making calls to a specific web service.

  • The Set/Reset Trigger is a simple logical device that produces True on its output pin when we have activated its Set pin (here connected to the ON button) and produces False on its output pin when we have activated the Reset Pin (here the OFF button).
  • We also have the ADC widget which here simulates the temperature controller. For the purpose of this demonstration the ADC will go from 17 to 23 degrees. Then the other input of the Comparator widget is a constant widget initialized with the value of 22.
  • The Comparator widget will compare it’s operands applying the Less Than operation and will trigger the correct value to its output pin.
  • Depending on this the Logical And widget will switch On or Off the Heater.

Based on this we can do so much more with cosm.com! Have a look again:

Here we have marked 3 key places in the scheme where we might want to know what is happening at each exact moment.

  1. Whether the Program is running or not?
  2. What is the current temperature?
  3. Is the Heater On or Off?

Cosm.com is great platform for tracking your data. But what is it - "it is a platform that allows you to securely store and exchange data coming from any kind of device or app." - to find more have a look here Cosm.com: How it works?

We developed a simple Agilart Feed Widget for Cosm.com that allows you to send data to any feed and datastream. Let’s add one of these widgets at each of the connecting point 1-3.

You can edit the Agilart Cosm Feed Widgets by providing your specific data. For example:

Then when we run the program, we can monitor everything from our feed in Cosm.com:

How can this not be cool! Pachube Rocks and we're so glad that we made it work from Agilart programs!

Add a Comment