Official website

Monday, April 15, 2013

Stylesheets

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)

Download

Droid

Download

Bronze

Download

Mustard

Download

Desert

Download

Hot Rod Red

Download

Brick

Download

Reddish

Download

Instructions

To change the stylesheet follow this post
or alternatively edit index.html and change the stylesheet name
<!DOCTYPE html>
<html>
    <head>
        <title>jubito</title>
        <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="http://code.jquery.com/mobile/1.3.1/jquery.mobile.structure-1.3.1.min.css" />
        <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
        <script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></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.
Or
Periodically
    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

This summary is not available. Please click here to view the post.

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.

Launcher
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 (").
Syntax:
./'program.exe' '<arguments> "<arguments with quotes>"'
Example:
./'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"'

Event

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. j.am.... 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

Evaluation
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
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