Differences

This shows you the differences between two versions of the page.

Link to this comparison view

fr:calaos_tuto_station_meteo [2014/07/05 00:10]
azerty
fr:calaos_tuto_station_meteo [2016/01/13 20:28]
Line 1: Line 1:
-====== Station météo software à partir de openweathermap(utilisation des webanaloginput ) ====== 
  
-===== prérequis ===== 
-  * calaos 
- 
-===== Pour des inputs de temperature =====  
-Dans calaos_installer: 
- 
-choisir une pièce, clicker add item -> web -> temperature sensor 
- 
-dans la nouvelle fenetre "new web IO" 
- 
-Item Name : Temperature exterieure 
- 
-URL: http://api.openweathermap.org/data/2.5/weather?q=VOTRE_VILLE&lang=fr 
- 
-Type: JSON 
- 
-Path: main/temp  <<< se référer au fichier json affiché par l'url plus haut pour naviguer dans les différentes branches du json 
- 
-Frequency: par défaut 10000ms 
- 
-offset: -274,15 
- 
-unit: °c 
- 
-laisser les autres valeurs à défaut 
- 
- 
- 
- 
-===== Pour d'autres valeurs autres que température (pression, humidité) =====  
-Dans calaos_installer: 
- 
-Choisir une pièce, clicker add item -> web -> analog input 
- 
-dans la nouvelle fenetre "new web IO" 
- 
-Item Name : Temperature exterieure 
- 
-URL: http://api.openweathermap.org/data/2.5/weather?q=VOTRE_VILLE&lang=fr 
- 
-Type: JSON 
- 
- 
-Path: main/pressure <<< se référer au fichier json affiché par l'url plus haut pour naviguer dans les différentes branches du json 
- 
-Frequency: par défaut 10000ms 
- 
-unit: hPa 
- 
-coeff :0 (bug, theoriquement coeff=1) 
- 
- 
-offset: 1 (bug, theoriquement offset=0) 
- 
-laisser les autres valeurs à défaut  
- 
- 
- 
-===== io.xml=====  
-le fichier io.xml doit ressembler à ça 
-<code> 
-<calaos:input file_type="json" id="input_102" name="Température meteo extérieure" offset="-274.15" path="main/temp" period="10000" type="WebInputTemp" url="http://api.openweathermap.org/data/2.5/weather?q=Votre_ville&amp;lang=fr"/> 
- 
-<calaos:input coeff_a="0" coeff_b="1" file_type="json" id="input_105" name="Pression atmosphérique" path="main/pressure" period="10000" type="WebInputAnalog" unit="hPa" url="http://api.openweathermap.org/data/2.5/weather?q=Votre_ville&amp;lang=fr"/> 
- 
- <calaos:input coeff_a="0" coeff_b="1" file_type="json" id="input_106" name="Humidité" path="main/humidity" period="10000" type="WebInputAnalog" unit="%" url="http://api.openweathermap.org/data/2.5/weather?q=Votre_ville&amp;amp;lang=fr"/> 
- 
- <calaos:input file_type="json" id="input_107" name="Température Minimale" offset="-274.15" path="main/temp_min" period="10000" type="WebInputTemp" url="http://api.openweathermap.org/data/2.5/weather?q=Votre_ville&amp;amp;lang=fr"/> 
- 
-<calaos:input file_type="json" id="input_108" name="Température Maximale" offset="-274.15" path="main/temp_max" period="10000" type="WebInputTemp" url="http://api.openweathermap.org/data/2.5/weather?q=Votre_ville&amp;amp;lang=fr"/> 
-</code>