top of page

If there is some applications that could be precious inside an home automation installation, PAW SERVER, is one those application.

 

PAW SERVER, is more than a simple web application, that can be install on an ANDROID phone or else

 

PAW SERVER can be use for exemple to let your home automation installation speaking, and that what we will try to help you to do ..

 

I'll first suggest to use an ANDROID BOX TV, as a resident ANDROID installation

 

There is a lot of home automation application that could be install under ANDROID, as RM BRIDGE to send IR commands, or as tasker, and AUTOMATE ( my own choice )

 

So the first thing to do, is to download PAW SERVER, this fabulous Jochen RUEHL's creation application !

 

Here is the link

 

https://play.google.com/store/apps/details?id=de.fun2code.android.pawserver&hl=fr

 

It's a free application, but if you like it, and i am quite sure that you will, it's should be a great thing to make a donation ...

 

Normally, PAW SERVER, will be installed on your sdcard ( android sdcard), under PAW name directory (folder)

 

The first thing is to control that point ( the PAW directory lcation )

 

Then, take a look inside this PAW directory , you will find there some sub-directoties which are the server directories

 

One of those sub-directories is "html"

 

If you click on the "html" directory, you will access to level 2 sub-directories

 

One of those level 2 sub-directories is call "app".

 

All the remote commands that could be use under "PAW SERVER" are install in this "app" directory

 

Pay attention to the fact that the are xhtml command, and not html, or hml

 

So if we resume a little, the command are place in /sdcard/paw/html/app/  directory under the xhtml extension's form

 

To be able to let the ANDROID TV BOX speaking, with PAW SERVER you will have to create and install a new xhtml command, that is'nt nativly install inside /sdcard/paw/html/app/ directory

 

I'll suggest to call this xhtml command   "speak.xhtml"

 

Take care of the case, the case is important under android

Use the lower case ...

 

To create this "speak.xtml" command use a simple text editor for exemple wordpad under windows, an editor that don't add any code during the safe action

 

So here is the full speak.xtml, that you will ( don't forget) save with the .xhtml extension , it's a bsh script that will be recognise by "PAW SERVER"

 

 

<bsh>
text = parameters.get("text");
lang = parameters.get("lang");

if(text != null && lang != null) {
speak(text, new Locale(lang));
}
else {
request.sendError(500, "Invalid parameters!");
}

</bsh>

 

 

Copy this script and paste it inside your editor then save it as "speak.xhtml"

 

Let suppose that you did copy this new speak.xhtml command under your ANDROID BOX TV, and that the ip adress of this box  is 192.168.1.158 ( fix adress is better)

Let then suppose that that you did let the port adress as 8080 , or put it to 8080 during the PAW SERVER installation

 

Here is one domoticz command that will let your installation saying "test i am speaking

 

http://192.168.1.158:8080/app/speak.xhtml?text=test%20i%20am%20speaking&lang=en

 

Fisrt of all you did remark that all the word are separeted with %20, witch is the code for the space

 

not before the fisrt word and not after the last one

 

Then the =en is for english speaking and should be =fr for french, ans so on ...

 

the same sentence in french will be

 

http://192.168.1.158:8080/app/speak.xhtml?text=test%20je%20vais%20parler&lang=fr

 

 

We must thank a lot Jochen RUEHL for this fabulous application

 

 

Enjoy all !

 

 

 

 

 

 

 

 

 

 

bottom of page