Plugin for Karotz released

Here is my first plugin for Vera. My plugin allows you to send commands to your Karotz to control it. Currently, only one function is supported which is the tts (text to speech). The other commands will be supported soon.

The plugin needs to have a virtual device created which represents your Karotz. Once done, you can send commands directly from Lua code in scenes or other plugins but also through http GET requests.

The files can be downloaded at [url=http://code.google.com/p/karotz-for-vera/]Google Code Archive - Long-term storage for Google Code Project Hosting.. Instructions on how to install and use are there too.

Your comments are welcome to improve it.

April 3, 2012: The plugin v1.0 is now directly available from the MiOS market for an easier installation

Why are you not releasing this great app in the app store? Then we will have an easier installation and mainly update…

Thank you!!!
Matteo

That’s in my TODO list. I’ll most probably do it today or during the week-end

That’s great! Thanks!!

Do you foreseen other functionality in the future for his plug in?

On my opinion what can be great is to play specific mp3 stored in the usb Katotz. In this way the karotz can run ad hoc signal or music.

Ciao
Matteo

Yes. The idea is to provide access to all methods available through the Web API of the Karotz. If the play mp3 is available via that API, I’ll add in next release.

nice job :slight_smile:
so this will work without their servers ?

No. That was my initial plan but Karotz is not keen on release their implementation of the communication with the Karotz. They use proto buff but don’t want to release the proto file. If they do, I’ll update the code to use it.

unlikely…

SHA-1 computation is pretty resource intensive. How long does it take to execute the hmac_sha1_binary function?

[tt]http://forum.micasaverde.com/index.php/topic,10088.0.html[/tt]
[tt]http://romotive.com/forum/discussion/15/control-signals-decoded[/tt]

I didn’t benchmark it or what so ever but it seems close to instantaneous. The best have been to have access to Lua crypto which relies on OpenSSL.

Hi,

very interesting lua SHA-1 coding to provide Karotz-API auth process.

I worked on a Karotz plugin too, i just released the first public beta release (V0.5) on my (french) blog : [url=http://www.antor.fr/2012/03/31/karotz-controller/]http://www.antor.fr/2012/03/31/karotz-controller/[/url] (sorry to none french speakers, i will translate this page soon).

my coding choice was to keep secret the “KAROTZ_SECRET_KEY” :stuck_out_tongue: so i use a very simple php proxy to get the interactive ID and the SHA-1 is use on it.

3 functions are supported :

  • TTS : Say a text
  • Play : Play a song (mp3)
  • Cam : use Karotz Cam as a Webcam

Plugin is release on apps.mios.com HERE (waiting for MCV approval)

Hi,
My initial thought was to do like you do but I didn’t want to rely on another server. The dependency on Karotz server is already an issue but there is no workaround.
However, my design choice prevents me to support any action which generates an eventas the webcam you mention.

The best would be that Karotz eventually opens a bit or improves the API.

I’ll have a look to your plugin anyway because it looks nice on pictures.

Hi,

I agreed, the best would be improve the karotz API… Maybe with using the Javascript SDK to do communicate vera and karotz on local network without using online API. But actualy, the Javascript SDK doesn’t support webcam (only taking pictures)

Thank for your return :slight_smile:

Personally, I’d really like to avoid any additional proxy servers…

Karotz is nice, already using it to monitor my post box (which is sensor-equipped now) - nice to hear “your mail is arrived” when postman inserts correspondence

I’m using pushing box now, but (for sure) direct plugin is more interesting

The deal would to adapt the wizz.cc PHP Class (available here - in french only, sorry) for the luup language to make a standalone plugin to access the web API for the Karotz.

Hey,
I don’t know what you mean by standalone plugin but what you suggest add an additional server to run the PHP class. The minimum is what I’ve done: 1 app on the Karotz to give access to the web api, the karotz servers and then the plugin on the Vera.
It seems there is an undocumented Java class which relays all commands from the Karotz VM to the Karotz via TCP without using the karotz servers. If it is possible to port that class to Lua, it might be a future improvement.

What I mean is to be able to reuse the php class done by wizz.cc and adapt it to the lua language to be able to do the same thing without any php proxy. Your plugin is able to make the karotz speaking, but it should be cool to make it moving ears, changing led color, everything this php class can do.

I’m working on adding all the other functions.
Regardions thé proxy on Vera, the issue comes with the the callback function of Karotz is built. I can’t add parameters in the callback URL. If I find a workaround, I’ll add it too.

Hi,
I also agree with the “no aditional server” solution.

Of course I prefere a diretc local connection between Vera and Kartoz but that’s not how Karotz is built.
Personally, I think you should keep focussing on implementing all the normal feature and then try to find workaround to crack the Karotz protocol.

Thanks for your work.