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.
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.
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.
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” so i use a very simple php proxy to get the interactive ID and the SHA-1 is use on it.
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.
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)
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.