Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mihini-dev] Mihini API Usage

Hi

 Following is my code
 
        ---Initialize
     assert(airvantage.init())
     
     --Creates and returns a new airvantage.asset#asset instance.
      asset = airvantage.newasset("house")
   
     --Starts a newly created #asset.
      assert(asset:start())
   
     --Creates and returns a #table instance
     --local tab1 = asset:newTable("bedroom", {"temperature", "humidity", "timestamp"}, "ram", "everyminute")
   
     
     --Adds a row of data to the table.
     tab1 :pushRow{ temperature=29.2, humidity=109.34, timestamp=os.time() }



    Please Guide me how do i use the following api's and if any
examples share me.   

1. asset:sendUpdateResult(componentName, updateResult)

2. asset:setUpdateHook(hook)

3. asset.tree

Back to the top