Posted By

Zebkha on 07/15/13


Tagged

Fibaro HC2


Versions (?)

Koubachi in Fibaro HC2 virtual module


 / Published in: Lua
 

Koubachi in Fibaro HC2 virtual module

  1. ------------------------------------------------------------------------
  2. -- NAME: koubachi-fibaro
  3. -- AUTHOR: Zebk
  4. -- DATE : 14/07/2013
  5. -- COMMENT: Collecter les donn������©es d'un capteur Koubachi
  6. ------------------------------------------------------------------------
  7.  
  8. HC2 = Net.FHttp("www.eb-home.eu")
  9. response = HC2:GET("/koubachi/koubachi.php")
  10. result = json.decode(response)
  11.  
  12. local light = result.device.recent_light_reading_value
  13. local temp = result.device.recent_temperature_reading_value
  14. local moisture = result.device.recent_soilmoisture_reading_value
  15.  
  16. i = 1
  17. while i <= 360 do
  18. fibaro:log("Lumi����¯�¿�½���¯���¿���½����¯�¿�½������¨re: "..light.." - Temp.: "..temp.." - Humidit����¯�¿�½���¯���¿���½����¯�¿�½������© du sol: "..moisture)
  19. fibaro:sleep(1000);
  20. i = i + 1
  21. end

Report this snippet  

You need to login to post a comment.