Wednesday, October 15, 2014
Monday, October 13, 2014
Jubito @ IoT360 - The Gateway to Innovation
I just completed my registration to the IoT360. I'll be in Rome at 27-30 October if anyone interested to meet in person. I'll be glad to see you there!
I still compose the paper that I will submit and deliver to the BLUE Track sessions (*) and I'll publish it here when it's finished. A draft is uploaded, you can preview it at the bottom of this post. You can check the eai360 Jubito page here.
About
The IOT360 is a unique event bringing a 360 degree perspective on
IoT-related projects and activities and aiming to coach involved people
on the whole path between research to innovation and all the way through
to commercialization of ideas, projects and technologies.
The
Summit is a powerful and inspirational event that brings together
industry representatives, makers, vendors, experts, developers and
others to plan, learn, network, collaborate, strategize and more
effectively tap into the immense potential of the IoT domain.
The event offers a wide set of activities among which tutorials,
presentations, panels and keynotes covering new methods to accelerate in
the market, monetize technologies & IPR and raise funds in Europe.
Structured professional networking to turn cutting edge into business
through exploitation and commercialization opportunities is a key
priority.
(*) People networking to build together the internet of things.
The Blue track is the instrument to meet people, companies and organizations. This session brings together such actors to share research plans, kick-start initiatives, formulates new projects and make business.
Agile one to one meetings among users facilitate a coral development of the EAI internet of things community.
Tuesday, July 29, 2014
Arduino RFID access control
In this tutorial I will demonstrate an RFID (Radio Frequency Identification) access control system.
What we need:
- Arduino
- 125KHz RFID module
- RFID Tags
Alternatively use codebender
Open the serial monitor and approach a token or a card to the antenna. You should receive the tag id.
Now we have readings let's handle them. It's in your discretion what to operate with those, but in this example we will make a simple check-in/check-out sequence.
As always, check your arduino configuration and then enable the serial port.
To achieve our goal we need to evaluate user status in order to switch from present to absent and vice versa when a tag is pointed. At Control Panel click Add New Instruction Set. Type rfideval in the name field (handler) or one of your choice and the evaluation that follows as the action...
{ evalBool("%whereami%" == "present"); check_me_out; check_me_in; }
'check_me_in' and 'check_me_out' are Instruction Sets that corresponds to our preferred actions. For example, saluting user using %salute% function, announce temperature even turning on a light. Also the %checkin% and %checkout% functions are mandatory to changing the current status.
To see how responses will look or sounds like, go to terminal tab and type...
...which will execute the commands and after that get the status with %whereami% function.
We can also drive the check-out sequence within an event handler for extra functionality, like a countdown timer that give as time to leave before status is changed. This action can be achieved by pointing the check_me_out Instruction Set to event handler we just describe. The events will look like this...
To see how responses will look or sounds like, go to terminal tab and type...
check_me_in; %whereami%
check_me_out; %whereami%...which will execute the commands and after that get the status with %whereami% function.
We can also drive the check-out sequence within an event handler for extra functionality, like a countdown timer that give as time to leave before status is changed. This action can be achieved by pointing the check_me_out Instruction Set to event handler we just describe. The events will look like this...
judo sleep <ms>; %checkout%The check_me_out Instruction Set now points to check-out-handler.
It would be wise to read about functions and API for extra customization. Also, it would be very handy to know how events work .It will help you to make multiple actions in a single command.
As we may already know, whatever collected by the serial port triggers corresponding events if they exists. This means that if we create a new event handler with name (id) same as RFID tag then it will be triggered when found.
Notice the last id in the serial monitor screenshot. When specific token (with id 6600942812) is acknowledged the event will trigger the evaluator 'rfideval' and change our status accordingly.
Labels:
access control,
arduino,
automation,
development,
diy,
how to,
rfid,
security,
tutorial
Thursday, July 24, 2014
A brief history of the Jubito of Things
When I first started working on this project and had its concept in my mind back in 2010, I had no idea what the Internet of Things (IoT) was. Actually, I'm not even sure if it was defined. So, this is what forced me to start building a platform that would probably inherit that kind of terminology.
I was always fascinated by automations and dreamed of a smart house that would allow devices, sensors, software applications and services to exchange data and finally populate customized environments. These environments would be used for automated tasks or controlled interactively by the user.
Then I decided to start building my own automation systems with various microcontrollers and sensors, scripts and programs to gather information and connect with hardware from other vendors, like IP-Cameras, etc. A lots of other, innovative ideas that came along. The problem I faced back at the time was that. I had a bunch of dispersed stuff that was useful on its own and incapable of operating as a centric block.
To be honest, I didn't have the full picture in my head from the beginning, but eventually it started maturing enough to become a resolver for most of my considerations.
An illustration of the infrastructure...
In this blog you'll find a bunch of tutorials and information about Jubito and how to interconnect your things. I hope to find it amusing and still do not hesitate to ask any guidance if needed.
Saturday, July 19, 2014
Jubito android app with voice control
The new coveted feature that incorporated in the new version of jubito app (v1.2) is the speech recognition and speech synthesis. It allows us to hit the speech button and come out with a preferred command. That means that from now on your instruction set names (including launchers and events) must listed speech friendly.
Assume that we have three different Instruction Sets that give us the weather conditions. Let's say 'weather today' that consists of a set of today's conditions, 'weather tomorrow' for the day after and 'forecast' for both situations.
For the example to take effect you need to check your weather settings.
Go to Control Panel/Instruction Sets/Add New Instruction Set enter weather_today as name (id) and set the line bellow as action...
Today %todayday% in Athens, %todayconditions%, between %todaylow% and %todayhigh% degrees.For the other two options you can use...
weather_tomorrow
Tomorrow %tomorrowday% in Athens, %tomorrowconditions%, between %tomorrowlow% and %tomorrowhigh% degrees.
forecast
Today %todayday% in Athens, %todayconditions%, between %todaylow% and %todayhigh% degrees. Tomorrow %tomorrowday% in Athens, %tomorrowconditions%, between %tomorrowlow% and %tomorrowhigh% degrees.
Optionally fill description and any other field you want in order to be accessed from the dashboard.
The % enclosures represents the built-in functions that are responsible to translate the retrieved weather data to values. Find more weather functions.
Now open the app and press speech button. The approach is very simple, we just speak the instruction set id (name) and its posted to the server. Once it acknowledged we'll be able to hear the response (from speech synthesis) or see any kind of action that use this example, for instance turn on an appliance. The only limitation we should conform is that we need to replace blank spaces with underscores. Update: Latest versions of Jubito, automatically replace blanks with underscores.
Alternatively before create an instruction set you can perform a preferable command and see how it prints out.
Enjoy!
Enjoy!
Video demo
Tuesday, July 15, 2014
Communicate over a TCP socket
In the Internet of Things era, a good practice to communicate between protocol-agnostic software and/or hardware is a tailor made implementation on top of TCP. Jubito is taking advantage of Internet infrastructure and supports communication requests.
UPDATE: Currently the AppConfig.xml configuration file is fully supported by the UI. Under settings you can find menus that corresponds to each functionality.
Trusted clients should be semicolon delimited.
I leave the paragraph below as is, in case you want to edit the file and see things behind the scenes.
Let's move to our example. First of all we need to configure the host and the port. Edit AppConfig.xml file and add your preferences to the following fields...
UPDATE: Currently the AppConfig.xml configuration file is fully supported by the UI. Under settings you can find menus that corresponds to each functionality.
Trusted clients should be semicolon delimited.
I leave the paragraph below as is, in case you want to edit the file and see things behind the scenes.
Let's move to our example. First of all we need to configure the host and the port. Edit AppConfig.xml file and add your preferences to the following fields...
jaNET/System/Comm/localHost - A hostname of the server to connect to (it can also be its raw IP address)
jaNET/System/Comm/localPort - A number representing the TCP port to be used by the socket (Default is 5744)
jaNET/System/Comm/Trusted - Authorized clients delimited by semicolon
Sample Screenshot...
Save and close the file and go to Control Panel/Switches and turn on the socket.
Or by terminal...
judo socket openWe'll start our first debugging by sending some data via telnet.
Open command line ot a terminal in linux and type...
telnet <host> <port>After that, drop some functions and/or commands (Instruction Sets)...
We can even make a RESTful style call from a web browser as well...
Now that we've find how to implement a communication channel and pass through any kind of data, such as built-in functions, judo API calls or custom Instruction Set's, let's see how to utilize it in a hardware manner using an http request by following that article...
DVR system by using an IP camera
...or by making a simple .NET application using the TcpClient Class of System.Net.Sockets namespace illustrated by the method bellow...
private string getServerResponse()
{
Int32 port = 5744;
String host = "localhost";
String msg = "%whereami%\r\n"; // Always terminate command with \r\n else will cause a deadlock and socket need to be restarted.
TcpClient client = new TcpClient(host, port);
// Translate the passed message into ASCII and store it as a Byte array.
Byte[] data = System.Text.Encoding.ASCII.GetBytes(msg);
NetworkStream stream = client.GetStream();
// Send the message to the connected TcpServer.
stream.Write(data, 0, data.Length);
// Buffer to store the response bytes.
data = new Byte[16 * 1024];
// Read the first batch of the TcpServer response bytes.
Int32 bytes = stream.Read(data, 0, data.Length);
// Close everything.
stream.Close();
client.Close();
return System.Text.Encoding.ASCII.GetString(data, 0, bytes);
}
Sample Console application...
Sample ASP.NET web application...
Friday, July 11, 2014
Arduino light sensing
In this tutorial we'll create a simple circuit that sense light using a photoresistor.
What we need:
Alternatively use codebender
}
Update
Video demo
What we need:
- Arduino
- Photo cell (CDS Photoresistor)
- 10K Resistor
- Breadboard or perforated pcb
Alternatively use codebender
By hitting the 'light' command in the serial monitor we will get a print out of what it interprets as the amount of light in a qualitative manner. Thus is 'Dark', 'Dim', 'Light', 'Bright', 'Very_Bright'. You can change thresholds readings with values that suits your conditions.
OK, now we are ready to take advantage of the above example and make an assistive illumination system. As we already know we can capture serial messages from Jubito and trigger corresponding events. To make it happen we need to create one event handler with the name 'Dark' that will execute the 'plug-A-on' launcher of this example.
To do so, navigate to Control Panel/Instruction Sets/Add New Event Handler and enter the name and the action. When sensor submits 'Dark', the 'plug-A-on' launcher will be executed and turn on a light that is plugged to a wireless power outlet.
Notice: The above example to take effect, we need to let the loop continuous running and print out conditions than waiting for a 'light' command to be send. The modified sketch should be...
void loop(void) {
// Light measurement
photocellReading = analogRead(photocellPin);
// We'll have a few threshholds, qualitatively determined
if (photocellReading < 10) {
Serial.println("Dark");
} else if (photocellReading < 200) {
Serial.println("Dim");
} else if (photocellReading < 500) {
Serial.println("Light");
} else if (photocellReading < 800) {
Serial.println("Bright");
} else {
Serial.println("Very_Bright");
}
}
delay(1000);}
But still you can use a scheduler and evaluator that applies to original sketch. Follow this article to see how you can do that.
Update
So we come back to see how we can make a running daemon with a scheduler that evaluates the light conditions.
First we need to create a launcher that executes the 'light' command we set to arduino sketch and fetch the state. Then we need a new Instruction Set that invokes it.
First we need to create a launcher that executes the 'light' command we set to arduino sketch and fetch the state. Then we need a new Instruction Set that invokes it.
From the Instruction Set menu click Add New Launcher and give a name and the judo API call to send the 'light' command to the serial port.
After that create a new Instruction Set that invoke the launcher and make the evaluation with the 'Dark' condition. Type a name of your choise and the evaluation that follows...
{ evalBool("*getlight" == "Dark"); plug-A-on; ; }
The '*getlight' pointer will invoke the 'getlight' launcher and get its returning. Then it will be replaced by the condition data ('Dark', 'Dim', 'Light', etc) and proceed to evaluation. If condition is true the 'plug-A-on' launcher will be triggered, else nothing will happen.
The last thing to do to make it a runnable daemon is to create a new schedule that call the above Instruction Set within an interval.
From Scheduler menu click Add New enter a name, <Repeat> on the period dropdown, interval in milliseconds (the example use 60000ms which is 1 minute) and finally the 'evallight' Instruction Set as the action.
From Scheduler menu click Add New enter a name, <Repeat> on the period dropdown, interval in milliseconds (the example use 60000ms which is 1 minute) and finally the 'evallight' Instruction Set as the action.
Video demo
Subscribe to:
Posts (Atom)


































