Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mihini-dev] Mihini Milestone 0.9_M1 is available!

Hi Marcelo,

 

AS you found out there is not much doc (yet) on the REST APIs. So I can only point out to some initial discussion on the subject: http://wiki.eclipse.org/Mihini/REST_API, and of course the code itself

http://git.eclipse.org/c/mihini/org.eclipse.mihini.git/tree/agent/agent/rest.lua

 

However I should point out that when REST APIs for Mihini was developed it was thought more as a way to manage the agent (as you see the kind of API in the above doc) rather than an API to push data.

The Push Data API is documented in the racon module. You also ave dedicated APIs to access the device tree from within your application (devicetree module).

 

Then  Mihini will use M3DA to communicate with a server to push the data, but this is ‘transparent’ from your application.

 

 

So the use case you describe is totally valid: have the agent behave as your server that you can access it directly from your client. Unfortunately this is not implemented,  you might have to do some devs to make fit your needs.

 

As a starter you can have the sensor update the devicetree using the racon/devicetree API, and have your client access the devicetree using the current REST API (see above doc).

The next step could be to develop a small web site that actually provide a nice interface directly on the RPI. We do have a small web server that you can use to publish real html, it does even support some kind of AJAX. Have a look to the luafwk/web directory. The REST module also uses this webserver, have a look to agent/agent/rest.lua for an example.

 

I hope that’ll be helpful!

 

Thx,

Cuero

 

From: mihini-dev-bounces@xxxxxxxxxxx [mailto:mihini-dev-bounces@xxxxxxxxxxx] On Behalf Of mnerys@xxxxxxxxxx
Sent: Friday, August 02, 2013 8:39 PM
To: Mihini project developer discussions
Subject: Re: [mihini-dev] Mihini Milestone 0.9_M1 is available!

 

Nice to see these 0.9 new additions, including GPIO and REST. :)

Actually, as you might already know, I am trying to replicate the ideas behind the Greenhouse Demonstrator and still putting the pieces together (both in my mind and on the bench). So, I was wondering if I could use this 0.9 REST addition to communicate with Mihini and make my Lua application to respond with sensor data and also to control some actuators. I am still not sure about the role/need for the M3DA/m2m.eclipse.org server. Do I really need to have a server besides the R Pi? I mean, assuming I have a simple deployment with a single R Pi, I think it would make sense to mae the clients to communicate directly to this R Pi.

Looking at the docs, I was hoping to see a rest.html page under the Lua_User_API directory (like there is a gpio.html). However, I could not find one... So, could you please advise me on how to set up this "REST" api to my simplified "Greenhouse"?

Thanks,
Marcelo Nery dos Santos
Research Software Engineer

Phone: 55-21-2132-3663
E-mail: mnerys@xxxxxxxxxx

Av. Pasteur 146 & 138
Rio de Janeiro, RJ
22290-240 - Brazil




From:        Laurent Barthelemy <lbarthelemy@xxxxxxxxxxxxxxxxxx>
To:        "mihini-dev@xxxxxxxxxxx" <mihini-dev@xxxxxxxxxxx>
Date:        08/02/2013 01:32 PM
Subject:        [mihini-dev] Mihini Milestone 0.9_M1 is available!
Sent by:        mihini-dev-bounces@xxxxxxxxxxx





Hi all,
 
We are currently doing the validation of the upcoming Mihini 0.9 release.
The first milestone, the 0.9_M1 is now available.
 
For those who already got the source from Mihini Git, you can update the master branch, a tag 0.9_M1 is set.
 
There is also a milestone package containing the source code, the Lua execution environment for Koneki, and documentation (as html files).
You can find it here:
http://download.eclipse.org/mihini/org.eclipse.mihini-incubation-0.9_M1.zip
 
 
Feel free to report us any issue you may have encountered using Mihini.
This is true for the 0.9 new additions (REST, GPIO, etc) and other features!
Doing so, we can discuss, analyze and improve the product before the final 0.9 release and the beginning of a new feature development cycle.
 
We hope you’ll enjoy it! J
 
Laurent.
 
 _______________________________________________
mihini-dev mailing list
mihini-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mihini-dev


Back to the top