Domotique:Virtual Weather
Un article de MacodaWiki.
Sommaire |
[modifier]
Présentation
Virtual Weather Station est un logiciel permettant de regrouper sur un même écran différents capteur météorologique (température, vent, humidité, ....).
Dans mon cas, je lui fait afficher des informations en provenance des capteurs de températures 1wire (couplés à Homeseer).
Pour télécharger une version d'essai du logiciel : http://www.ambientweather.com/Products/Descriptions/vws.asp
[modifier]
Installation
- Installation par défaut de Virtual Weather Station (vws) v 12.07
[modifier]
Configuration
- Communication - Weather Station : Stationless (on passe par un fichier texte)
- Communication - Communication rate : 600s
- Cliquer sur "Stationless Settings", sélectionner le répertoire contenant le fichier .csv
- Menu "Modify Display" => General Display Settings
- Time and Date : 24 Hours - dd/mm/yy
- Menu "Setting" => Program Settings
- Cocher "Start program Hidden"
- Menu "Setting" => Conversion : Mettre tout en Français
- Menu "Modify Display" => Icon : Décocher "Display panel"
- Menu "Modify Display" => Broadcast : Décocher "Display panel"
- Menu "Modify Display" => Color Spectrum, High/low display, Wind direction, Thermometer, Graph, Tank, Alphanumeric, Strip chart : Tout décocher
- Menu "Modify Display" => Distribution - Cocker "Outdoor Temp"
- Menu "Modify Display" => Gauge : Cocher
- Outside Humidity
- Inside Temperature
- Outside Temperature
- Channel 1 Temperature
- Channel 1 Humidity
- Channel 2 Temperature
- Channel 2 Humidity
- Channel 3 Temperature
- Pour chaque graphique, faire un click droit et :
- Plot previous 24 hours
- Décocher "autoscale plot"
- Mettre 'precision' à 1
- Mettre 'y gridline' à 10
- Changer le titre du graphique avec
- Salon pour Inside Temperature
- Chambre nous pour Ch 1 Temp
- Chambre Marion pour Ch 2 Temp
- Chambre Florian pour Ch 3 Temp
- Salle_bain pour In Humidity
- Entree pour Humidity
- Exterieur pour Outside Temperature
- Garage pour Ch 1 Humidity
- Eau froide pour Ch 2 Humidity (et mettre comme second titre, mettre "Eau chaude" et associer "Ch 2 humidity")
- Mettre 'Lower limit' à -10 et 'Upper Limit' à 40 pour Exterieur
- Mettre 'Lower limit' à 10 et 'Upper Limit' à 30 pour Eau froide
- Mettre 'Lower limit' à 40 et 'Upper Limit' à 60 pour Eau froide
- Mettre 'Lower limit' à 10 et 'Upper Limit' à 40 pour les autres
[modifier]
Génération de pages web
- Menu Internet => Ftp Login Setting - ftp : 127.0.0.1
- Menu Internet => JPEG Ftp Settings - FTP Automated Scheduled : 10 Minutes
[modifier]
Couplage Homeseer
Le principe est simple, on écrit dans un fichier .csv (texte) les valeurs, séparées par des ;
Après, il suffit de faire le correspondance entre les valeurs du .csv et les capteurs à l'écran.
DEVICE_Bureau = "Bureau"
DEVICE_Cave = "Cave"
DEVICE_Garage = "Garage"
DEVICE_Salon = "Salon"
DEVICE_Exterieur = "Exterieur_terrasse"
DEVICE_Grenier = "Grenier"
DEVICE_Florian = "Florian"
DEVICE_Entree = "Entree"
DEVICE_Nous = "Nous"
DEVICE_Salle_bain = "Salle_bain"
DEVICE_Marion = "Marion"
'**************************************************************************
function Get_temp(sNom_device)
GetTemp = 999
' Met device 1wire s'appele tous "xxxx Thermometre"
set dv = hs.GetDeviceEx(sNom_device&" Thermometre")
if dv is nothing then
hs.writelog "THERMOSTAT" , "Get_temp => Trouve pas "&sNom_device&" Thermometre"
else
' access device object here
sLocalisation = dv.location
Get_temp = (hs.DeviceValue(dv.hc&dv.dc)/1000)
end if
end function
Sub Main()
Set libFolder = CreateObject("Scripting.FileSystemObject")
Set hTexte_vsw = libFolder.CreateTextFile("d:\z_partage\domotique\virtual_station_weather.csv", True)
' La ligne exacte => 1.00,2001,10,28,0,6,59,0,0,48,42,100,77,32,30,30.14,0.76,0.00,0,0,0,0,0,0,0,0.00,0,0,55,77,60,80,0.000,52,0,0,0
sChamp_1 = "1.00" ' Csv File Version ID (XX.XX) Floating Point
sChamp_2 = cstr(Year(now)) ' Year (yyyy format) Integer
sChamp_3 = cstr(Month(now)) ' Month Integer
sChamp_4 = cstr(Day(now)) ' Day Integer
sChamp_5 = cstr(Hour(now)) ' Hour (24-hour format) Integer
sChamp_6 = cstr(Minute(now)) ' Minute Integer
sChamp_7 = "0" ' Second Integer
sChamp_8 = "0" ' Wind speed (mph) Floating Point
sChamp_9 = "0" ' Wind Gust (mph) Floating Point
sChamp_10 = "0" ' Wind Direction (degrees) Floating Point
sChamp_11 = "0" ' Inside Humidity (%) Floating Point
sChamp_12 = "0" ' Outside Humidity (%) Floating Point
sChamp_13 = cstr(Get_temp (DEVICE_Salon)) ' Inside Temperature (°F) Floating Point
sChamp_14 = cstr(Get_temp (DEVICE_Exterieur)) ' Outside Temperature (°F) Floating Point
sChamp_15 = "0" ' Barometer (in) Floating Point
sChamp_16 = "0" ' Total Rain (in) Floating Point
sChamp_17 = "0" ' Daily Rain (in) Floating Point
sChamp_18 = "0" ' Hourly Rain (in) Floating Point
sChamp_19 = "0" ' Weather Condition, Integer
'where:
'0 = clear, 1 = few clouds, 2 = scattered clouds, 3 = broken clouds, 4 = overcast, 5 = drizzle
'6 = rain, 7 = frozen rain, 8 = showers, 9 = mist, 10 = tornado, 11= fog,12 = smoke, 13 = hail, 14 = haze
'15 = ice crystals, 16 = sand, 17 = snow grains, 18 = snow, 19 = snow showers, 20 = lightning, 21 = thundershowers
sChamp_20 = cstr(Get_temp (DEVICE_Nous)) ' Channel 1 Temperature (WMR- 968/WMR-918, Davis Vantage Pro) Floating Point
sChamp_21 = "0" ' Channel 1 Humidity (WMR-968/WMR-918 only) Floating Point
sChamp_22 = cstr(Get_temp (DEVICE_Marion)) ' Channel 2 Temperature (WMR- 968/WMR-918, Davis Vantage Pro) Floating Point
sChamp_23 = "0" ' Channel 2 Humidity (WMR-968/WMR- 918, Davis Vantage Pro) Floating Point
sChamp_24 = cstr(Get_temp (DEVICE_Florian)) ' Channel 3 Temperature (WMRFloating Point Temperature (WMR-968/WMR-918, Davis Vantage Pro)
sChamp_25 = "0" ' Channel 3 Humidity (WMR-968/WMR- 918, Davis Vantage Pro) Floating Point
sChamp_26 = "0" ' Evapotranspiration (Vantage Pro Plus, WeatherHawk) Leaf Wetness (Columbia Weather Systems only) Floating Point
sChamp_27 = "0" ' UV Index (Vantage Pro Plus) Battery Voltage (WeatherHawk) Floating Point
sChamp_28 = "0" ' Solar Radiation (Vantage Pro Plus, WeatherHawk) Floating Point
sChamp_29 = "0" ' Wind Chill (°F) Floating Point
sChamp_30 = "0" ' Indoor Heat Index (°F) Floating Point
sChamp_31 = "0" ' Outdoor Heat Index (°F) Floating Point
sChamp_32 = "0" ' Dew Point (°F) Floating Point
sChamp_33 = "0" ' Rain Rate (in/hour) Floating Point
sChamp_34 = "0" ' Outdoor Temp Rate (°F/hr) Floating Point
sChamp_35 = "0" ' Indoor temp Rate (°F/hr) Floating Point
sChamp_36 = "0" ' Barometer Rate (in/hr) Floating Point
sChamp_37 = "0" ' Channel 1 Temp Rate (°F/hr) Floating Point
sChamp_38 = "0" ' Channel 2 Temp Rate (°F/hr) Floating Point
sChamp_39 = "0" ' Channel 3 Temp Rate (°F/hr) Floating Point
sMessage = sChamp_1 + "," + sChamp_2 + "," + sChamp_3 + "," + sChamp_4 + "," + sChamp_5 + "," + sChamp_6 + "," + sChamp_7 + "," + sChamp_8 + "," + sChamp_9 + "," + sChamp_10 + "," + sChamp_11 + "," + sChamp_12 + "," + sChamp_13 + "," + sChamp_14 + "," + sChamp_15 + "," + sChamp_16 + "," + sChamp_17 + "," + sChamp_18 + "," + sChamp_19 + "," + sChamp_20 + "," + sChamp_21 + "," + sChamp_22 + "," + sChamp_23 + "," + sChamp_24 + "," + sChamp_25 + "," + sChamp_26 + "," + sChamp_27 + "," + sChamp_28 + "," + sChamp_29 + "," + sChamp_30 + "," + sChamp_31 + "," + sChamp_32 + "," + sChamp_33 + "," + sChamp_34 + "," + sChamp_35 + "," + sChamp_36 + "," + sChamp_37 + "," + sChamp_38 + "," + sChamp_39
hTexte_vsw.WriteLine(sMessage)
hs.writelog "ATD DEBUG ", "sMessage >"&sMessage&"<"
hTexte_vsw.Close()
Set libFolder = Nothing
Set hTexte_vsw = Nothing
End Sub
