Official website

Wednesday, May 1, 2013

Posting actions via qr code

For simple understanding on how to use RESTful commands, let's make a dummy example with a QR code.
If you want to post to the server over the web, go to your favorite qr code maker ( and select URL. Type your Jubito hostname including the REST style command (/index.html?cmd=<your-custom-instruction set>). When you scan the QR code, the corresponding action will be executed.

On your home network you can use a TCP socket. Check this post to see how to setup a TCP socket to listen for network data.
Syntax...<your-custom-instuction-set>. Just make sure that you have include the senders IP to the trusted list in XML file.

By using a socket you can also access via telnet.
Syntax telnet 5744

See also Communicate over a TCP socket

Monday, April 15, 2013


Themes below are apply to jquery mobile 1.3.1. Jubito currently use version 1.4. Please read the note on this post.

Glacier (Default)










Hot Rod Red







To change the stylesheet follow this post
or alternatively edit index.html and change the stylesheet name
<!DOCTYPE html>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="default.css" />
        <link rel="shortcut icon" href="favicon.ico" />
        <link rel="stylesheet" href="" />
        <script src=""></script>
        <script src=""></script>
You can also create a custom one with themeroller.

Friday, March 22, 2013

Linux voice configuration

The voice-installer script from download area installs the cmu_us_slt_arctic voice [1]. By default it's set to US English slt (female) voice. In this post we'll see how to make a different selection.

First listen voice examples here and choose which one you want to use. Then download the package from here and modify the voice-installer script to use that file. When installation completes, edit /etc/festival.scm file and jump to CMU Arctic voices. Comment the default one (in yellow) with double semicolons (;;) and remove them from your desirable choice. This is it. Save and close the file and you're done!

;;;; CMU Arctic voices
;;(set! voice_default 'voice_cmu_us_rms_arctic_clunits)
;;(set! voice_default 'voice_cmu_us_bdl_arctic_clunits)
(set! voice_default 'voice_cmu_us_slt_arctic_clunits)
;;(set! voice_default 'voice_cmu_us_clb_arctic_clunits)
;;(set! voice_default 'voice_cmu_us_awb_arctic_clunits)
;;(set! voice_default 'voice_cmu_us_jmk_arctic_clunits)

[1] By default the script checks if festival exists. If not, will ask you to install. Then you should re-run the script to proceed to voice installation.

* Automated scripts will follow for all arctic voices.

Monday, March 18, 2013

Version 0.9 beta released

A beta version of Jubito finally released! It comes in two flavors, Windows and Linux.

Download Jubito

Tuesday, March 5, 2013

Scheduling tasks

Another important tool is the Scheduler. It can be formed as a simple notification, a hierarchy of tasks or as a daemon.

Scheduler Parameters 
Name: a schedule handler.
Date: when an action doesn't need to be repeated and removed from schedule when completed.
    Daily - action takes place every day at specific hour
    Workdays - action takes place from Monday to Friday at specific hour
    Weekend - action takes place every Saturday and Sunday at specific hour
    Specific day {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday} - action takes place from day specified at specific hour
    Repeat - a repeated action that takes place at a specified time in milliseconds
Action: a simple sentence or an instruction set call

Let's see some examples.

A simple notifier that inform us daily at 9am to take out the trash.

A daemon that check every 5 minutes for unread e-mail messages.

Corresponding Instruction Sets.

Scheduler can fulfill a number of scenarios like, wakeup call (ask me to wake up work days at 7am, tell me weather conditions, turn on the room light), automation control (turn off garden lights daily at 11pm) or check-out after 10am when I'm living for work, etc.

Yahoo! Weather RSS feed

OBSOLETE, please follow this post.

To setup your location for the weather feed you need to visit and search it by zip code or city name and press go.

From the address bar copy the city number...

Edit the AppConfig.xml file. Under System/Others/YahooForecastFeed we enter the follow URL including the city number we get from Yahoo website.

The final URL should be like this...;u=c

&amp;u=c - Celsius
&amp;u=f - Fahrenheit

UPDATE: Framework version (type %about% on terminal tab) supports a GUI for weather setup.

        <MailSubject>Alert from Jubito</MailSubject>
      <!-- Addresses that allowed to post notifications to socket specified -->
      <!-- Socket for accepting network messages via telnet, ip cameras, etc -->
      <!-- Web Server -->
      <!-- Microcontroller -->

Save and close the file. To test if it's ok, go to terminal tab and give some corresponding functions like %todaylow%, %todayhigh%, etc.

View more weather functions.

Wednesday, February 27, 2013

Web UI customization

Note: Latest version of Jubito use jquery mobile 1.4, the only difference to this guide is that there is a directory called themes under www and you have to paste your customized default.css and default.min.css files over there. [ Useful source: Creating a Custom Theme with ThemeRoller ]

To give your own flavor to the Jubito's web UI, a really easy task since it's developed with jQuery mobile.
Go to theme roller drag & drop colors of your choise to swatch A and click download. Unzip the downloaded file, go to themes folder and copy the .css file to Jubito's folder under www. Then rename it to default.css if it's not already.


That's it, enjoy the new look!

Tuesday, February 26, 2013

Instruction Set anatomy

An instruction set is a collection of actions that has 3 basic forms and cast as follows.

Launchers allow modularity. A launcher is responsible to execute third party programs and making API calls against the framework. If any of the processes above has a returning output, then its associated to the final synthesis.
Third party programs are invoked with dot-slash (./) and API calls with the judo keyword.

IMPORTANT: Use with cause the dot-slash (./) method if you want to avoid deadlocks. It instructs the process component to wait indefinitely for the associated process to exit. In case of the example above with notepad, the process will completed when notepad will terminated. Purpose of this action is the expandability via custom scripts and programs that does a job, give an output and finally terminated.

Example in steps...

A simple shell script that returns 'john'

The launcher

The invoke method

Result of the launcher

Result of the method

In the above example we create a launcher of a program that returns a value in order to reproduce a new instruction set that also contains additional information. We can bypass this process if we just want to launch a program and not use its value for reproduction. Since everything is instruction sets, this can be achieved by a single task.

However run-calc cannot be called by another instruction set.

When you try to execute a program that takes arguments, you should use single or back quotes (' or `) to split the statement. It doesn't matter if the arguments contains double quotes (").
./'program.exe' '<arguments> "<arguments with quotes>"'
./'ffmpeg' '-t 00:00:20 -i "http://<cam ip>:<port>/videostream.asf?user=admin&pwd=xxx" "/home/%user%/Videos/IP-Cam/cam-%calendarday%-%calendarmonth%-%calendaryear%_%hour%-%minute%.asf"'


Events are very convenient because you can make multiple calls with a single command. This could be a sequence of different instruction sets, functions or API calls delimited by semicolon and can be triggered by another instruction set container like this...

%~><event handler id>%
In this particular example %~>demohandler%

To view events, go to terminal tab and type...
judo event list

Final Synthesis
A command (demo) is a sentence consisted by plain text, function calls and/or launchers. A launcher must be invoked by asterisk (*) token which it represents a pointer to the launcher.

Tip: You can have a number of instruction sets with the same name. Thus will give us the ability to trigger a sequence of events with ascending order.
Update: Use events instead for a more convenient way.

If instead of the (dummy) notepad example we are triggering a program or a script that has a returning value, then the wildcard *test will be replaced by it and associated to the final output. For example, if we request a sensor value from the microcontroller then the result should be synthesized like...

The temperature is <value returned from *temp>. This is a demo. has launched something that returns a value.

Check this post to see an example in action.

To view instruction sets, go to terminal tab and type...
judo inset list

Another feature we can include to expand functionality is the evaluation function. This allows us to evaluate one or more expressions and act accordingly.

In the next step, we create a simple notification when evaluation failed. Category and other fields are not essential since in this case we need just a notifier

Evaluate %day% function against string "Monday"

Test result

Indicators used within an instruction set when we need to call a launcher or an event handler. Wildcards used by the framework are...

Asterisk (*) pointer to a launcher or just a reflection of another Instruction Set.

%value% represents an internal function call.

%~>value% represents an event handler.

Essential Resources

Built-in finctions and API

Wednesday, February 20, 2013


Evaluation of an expression within Instruction Set allows you to add logic and extend the functionality.


  evalBool: Returns one of two states, depending on the evaluation of an expression.


     Required. Boolean. The expression you want to evaluate.
  True Part
     Required. Type: Instruction Set. Called when expression evaluates to True.
  False Part
     Required. Type: Instruction Set. Called when expression evaluates to False.


  { evalBool(expression); <true part>; <false part>; }

Relational & Conditional Operators

 equal to: ==
                i.e. (x == y)
                i.e. ("x" == "y")
                * String comparison require quotes
 not equal to: !=
                i.e. (x != y)
                i.e. ("x" != "y")
                * String comparison require quotes
 greater than: >
                i.e. (x > y)
 less than: <
                i.e. (x < y)
 greater than or equal to: >=
                i.e. (x >= y)
 less than or equal to: <=
                i.e. (x <= y)

 conditional AND: &&

                i.e. (x > 10 && x < 20)
 conditional OR: ||
                i.e. (x == 10 || x == 20)

 contains (Supported on ver. 0.2.1 of libJanet. To check your version, go to terminal tab and type %about%)

                i.e. (this is a test ~> is a)
                i.e. (%todayconditions% ~> Sunny)


  { evalBool(*getTemp > 30);  foo1; foo2; }

The above example can be translate like...

If temperature is greater than 30 degrees then turn on a fan (foo1) else turn it off (foo2)

foo1, foo2 represents Instruction Set names. You can have more than one or none at any part.

Arduino configuration

UPDATE: Jubito supports a GUI for most settings.

To send and receive messages between Arduino and Jubito, we have to edit the AppConfig.xml file and enter the port name and the baud rate.
Just for reference since you can apply this action from the UI (*), the API calls that are responsible to enable/disable the port is...

judo serial open - enable
judo serial close - disable

You can test above commands on terminal tab. More on APIs here.

        <MailSubject>Alert from jubito</MailSubject>
      <!-- Addresses that allowed to post notifications to socket specified -->
      <!-- Socket for accepting network messages via telnet, ip cameras etc -->
      <!-- Web Server -->
      <!-- Microcontroller -->


Simple interface example with arduino

In this post we'll explain how to interface and access an arduino project over the internet or by LAN. In the following screenshot I'll display some actions that my arduino does.

For example, the sketch print MotionDetected to the serial port when PIR sensor detect motion, take illumination conditions on light command, read RF data from a remote control in order to transmit back to the corresponding device, and display the temperature when temp command is called.

Find out more on arduino tutorials

Let's make a simple paradigm with temp.

So, when temp command is sent to the serial monitor arduino returns the current temperature (1st screenshot). To create an interface, go to Control Panel/Instruction Sets/Add New Launcher. Enter a name (handler) and judo serial send <command> API call to transmit temp command to the serial port.

To make this action available to the dashboard, go to Control Panel/Instruction Sets/Add New Instruction Set and follow the screenshot.

We always put the asterisk (*) token before a launcher to invoke it and retrieve the return value. In this case temp should be described as *temp. Save the above example, go to the Dashboard, refresh the page and you'll see the new command we just create.

This is the result when it clicked. It will replace the *temp action with the value that arduino returns.

For further debugging, launchers and instruction sets can be tested via terminal tab.


In the same way we can make our security triggers, control appliances remotely, etc. More examples will follow.

Tuesday, February 19, 2013

Built-in functions and API

Please visit GitHub Wiki
From now on updates will take place on jaNET Framework GitHub Wiki.

Update applies to jaNET framework version 0.2.2+ 

Built-in functions and API commands are described below and it used for instruction set synthesis.
After you create a new InstructionSet you can debug it and see the response from terminal.

You can also debug a launcher (using judo API) before you make the call from Instruction Set. In demonstration below, I'm going to use the 'judo serial send' API to send 'temp' command to the serial port where arduino is connected. This action will automatically fetch the arduino response when it's available.

Once we have test the launcher we can proceed with a custom Instruction Set. Notice the asterisk (*) indicator in front that remarks the launcher.

See also Instruction Set anatomy.


    User and Greetings
  • %user% %whoami% - return user login
  • %daypart% %partofday% - return the current part of the day (morning, noon, evening, afternoon, night, midnight)
  • %salute% - return human greetings e.g.: good morning, good evening and good afternoon

  • %usercheckin% %checkin% - change user status to true
  • %usercheckout% %checkout% - change user status to false
  • %whereami% - return the user status (absent/present)

    Weather (retrieve information from yahoo web service
  • %todayday% - return current day
  • %todayconditions% - return current day conditions
  • %todaylow% - return current day low temperature
  • %todayhigh% - return current day high temperature
  • %tomorrowday% - return the day after
  • %tomorrowconditions% - return the day after conditions
  • %tomorrowlow% - return day after low temperature
  • %tomorrowhigh% - return day after high temperature

  • %day% - return system day i.e. Sunday
  • %date% - return current system date i.e. November 5
  • %calendarday% - return system day i.e. 5
  • %calendarmonth% - return system month i.e. 11
  • %calendaryear% - return system year i.e. 2013
  • %calendardate% - return system date in d/m/yyyy format
  • %time% - return system time
  • %time24% - return system time in 24 format (hh:mm)
  • %hour% - return system hour i.e. 17
  • %minute% - return system minute

  • %pop3count% - pop3 unread message count
  • %gmailcount% - gmail unread message count
  • %gmailheaders% %gmailreader% %gheaders% %greader% - gmail headers, sender information and subject

  • %mute% - disable speech synthesis
  • %unmute% - enable speech synthesis
  • %cls% %clear% - clearing the console
  • %quit% %exit% - terminate application
  • %about% %copyright% - return framework version and copyright information


(*) From the terminal tab you can type judo ? for the latest / updated help.

1. Instruction Sets & Events
    1.1 Add New Instruction Set
        + judo inset add <lock>[ID]</lock> <lock>[Action]</lock>
        + judo inset new
<lock>[ID]</lock> <lock>[Action]</lock>
        + judo inset set
<lock>[ID]</lock> <lock>[Action]</lock>
        + judo inset setup
<lock>[ID]</lock> <lock>[Action]</lock]
        + judo inset add
[ID] <lock>[Action]</lock> `[Category]` `[Header]` `[Short Description]` `[Long Description]` `[Thumbnail Url]`
        + judo inset new [ID] <lock>[Action]</lock> `[Category]` `[Header]` `[Short Description]` `[Long Description]` `[Thumbnail Url]`
        + judo inset set [ID] <lock>[Action]</lock> `[Category]` `[Header]` `[Short Description]` `[Long Description]` `
[Thumbnail Url]`
judo inset setup [ID] <lock>[Action]</lock> `[Category]` `[Header]` `[Short Description]` `[Long Description]` `[Thumbnail Url]`
    1.2 Remove Instruction Set
        + judo inset remove <lock>[ID]</lock>
        + judo inset delete <lock>[ID]</lock>
        + judo inset del <lock>[ID]</lock>
        + judo inset kill <lock>[ID]</lock>

    1.3 List Items
        + judo inset list
    1.4 Add New Event Handler
        + judo event add [ID] <lock>[Action]</lock>
        + judo event new [ID] <lock>[Action]</lock>
        + judo event set [ID] <lock>[Action]</lock>
        + judo event setup [ID] <lock>[Action]</lock>

    1.5 Remove Event Handler
        + judo event remove [ID]
        + judo event delete [ID]
        + judo event del [ID]
        + judo event kill [ID]

    1.6 Delay Between Actions
        + judo sleep [timeout in ms]
        + judo timer [timeout in ms]

    1.7 List Items
        + judo event list

2. Mail
    2.1 Smtp Settings
        + judo smtp add [host] [username] [password] [port] [ssl]
        + judo smtp setup [host] [username] [password] [port] [ssl]
        + judo smtp set [host] [username] [password] [port] [ssl]
        + judo smtp settings

    2.2 Pop3 Settings
        + judo pop3 add [host] [username] [password] [port] [ssl]
        + judo pop3 setup [host] [username] [password] [port] [ssl]
        + judo pop3 set [host] [username] [password] [port] [ssl]
        + judo pop3 settings

    2.3 Gmail Settings
        + judo gmail add [username] [password]
        + judo gmail setup [username] [password]
        + judo gmail set [username] [password]
        + judo gmail settings

    2.4 Send
        + judo mail send [from address] [to address] `[subject]` `[message]`

3. SMS
    3.1 Settings
        + judo sms add [api id] [username] [password]
        + judo sms setup [api id] [username] [password]
        + judo sms set [api id] [username] [password]
        + judo sms setings

    3.2 Send
        + judo sms send [phone number] [message]

4. Scheduler
    4.1 New Schedule
        + judo schedule add [name] [{single day: e.g.Monday} {d/m/yyyy} {daily} {workdays} {weekend}] [hh:mm] [{instruction set} {verbal notification}]
        + judo schedule new [name] [{single day: e.g.Monday} {d/m/yyyy} {daily} {workdays} {weekend}] [hh:mm] [{instruction set} {verbal notification}]
        + judo schedule set [name] [{single day: e.g.Monday} {d/m/yyyy} {daily} {workdays} {weekend}] [hh:mm] [{instruction set} {verbal notification}]
        + judo schedule setup [name] [{single day: e.g.Monday} {d/m/yyyy} {daily} {workdays} {weekend}] [hh:mm] [{instruction set} {verbal notification}]
        + judo schedule add [name] [{repeat} {timer} {interval}] [interval in ms] [{instruction set} {verbal notification}]
        + judo schedule new [name] [{repeat} {timer} {interval}] [interval in ms] [instruction set} {verbal notification}]
        + judo schedule set [name] [{repeat} {timer} {interval}] [interval in ms] [instruction set} {verbal notification}]
        + judo schedule setup [name] [{repeat} {timer} {interval}] [interval in ms] [instruction set} {verbal notification}]

    4.2 Remove Schedule
        + judo schedule remove [name]
        + judo schedule delete [name]
        + judo schedule del [name]

    4.3 Disable Schedule
        + judo schedule disable [name]
        + judo schedule deactivate [name]
        + judo schedule stop [name]
        + judo schedule off [name]

    4.4 Enable Schedule
        + judo schedule enable [name]
        + judo schedule activate [name]
        + judo schedule start [name]
        + judo schedule on [name]

    4.5 Remove All Schedules
        + judo schedule remove-all
        + judo schedule delete-all
        + judo schedule del-all
        + judo schedule cleanup
        + judo schedule clear
        + judo schedule empty

    4.6 Disable All Schedules
        + judo schedule disable-all
        + judo schedule deactivate-all
        + judo schedule stop-all
        + judo schedule off-all

    4.7 Enable All Schedules
        + judo schedule enable-all
        + judo schedule activate-all
        + judo schedule start-all
        + judo schedule on-all

    4.8 List Actives [ Names ]
        + judo schedule active
        + judo schedule actives
        + judo schedule active-list
        + judo schedule active-ls
        + judo schedule list-actives
        + judo schedule ls-actives

    4.9 List Inactives [ Names ]
        + judo schedule inactive
        + judo schedule inactives
        + judo schedule inactive-list
        + judo schedule inactive-ls
        + judo schedule list-inactives
        + judo schedule ls-inactives

    4.10 List All [ Names ]
        + judo schedule names
        + judo schedule name-list
        + judo schedule name-ls
        + judo schedule list-names
        + judo schedule ls-names

    4.11 List Actives [ Details ]
        + judo schedule active-details
        + judo schedule actives-details
        + judo schedule active-list-details
        + judo schedule active-ls-details
        + judo schedule list-actives-details
        + judo schedule ls-actives-details

    4.12 List Inactives [ Details ]
        + judo schedule inactive-details
        + judo schedule inactives-details
        + judo schedule inactive-list-details
        + judo schedule inactive-ls-details
        + judo schedule list-inactives-details
        + judo schedule ls-inactives-details

    4.13 List All [ Details ]
        + judo schedule details [name (optional)]
        + judo schedule list [name (optional)]
        + judo schedule ls [name (optional)]
        + judo schedule status [name (optional)]
        + judo schedule state [name (optional)]

5. Socket Communication
    5.1 Start Service
        + judo socket start
        + judo socket enable
        + judo socket on
        + judo socket open
        + judo socket listen

    5.2 Stop Service
        + judo socket stop
        + judo socket disable
        + judo socket off
        + judo socket close

    5.3 Status
        + judo socket status
        + judo socket state

6. Web Server
    6.1 Start
        + judo server start
        + judo server enable
        + judo server on
        + judo server listen

    6.2 Stop
        + judo server stop
        + judo server disable
        + judo server off

    6.3 Create/Change Login
        + judo server login [username] [password]
        + judo server cred [username] [password]
        + judo server credentials [username] [password]

    6.4 Status
        + judo server status
        + judo server state

7. Serial Port
    7.1 Open
        + judo serial open [port (optional)]
    7.2 Close
        + judo serial close
    7.3 Send Command
        + judo serial send [command]
    7.4 Listen/Monitor
        + judo serial listen [timeout in ms (optional)]
        + judo serial monitor [timeout in ms (optional)]

8. Help
    8.1 Preview All
        + judo help
        + judo ?

    8.2 Preview Specific Category
        + judo help [help keyword]
        + judo ? [help keyword]

(*) Brackets are mandatory when place a sentence as one argument.
(**) <lock>parser protected document</lock> Lock tags used to bypass parser.
(***) Help Keywords: inset, event, mail, sms, schedule, socket, server, serial, help.