Getting weather information using "weather" and "get"

Begonnen von homer, 08 Mai 2013, 09:50:42

Vorheriges Thema - Nächstes Thema

homer

Hello All,

This is a very basic question but I don't know the syntax to get weather details from the "weather" function. I have:

define Forecast Weather 26429775 1800

I would like to extract values such as current temp (temp_c) and humidity (humidity) from Weather and show them as dummy variables on my webpage. How do I use the "get" format? For example, I tried this:

define WeatherCheck at +*00:01:00 {\
my CurrentTemp=ReadingsVal("Forecast", "temperature", 0)");;\
}

Which didn't work. I'm sure I'm making it more difficult than it needs to be!

Thanks
Homer

MisterEltako


define Temperature dummy

define WeatherCheck at +*00:01:00 {\
my $CurrentTemp=ReadingsVal("Forecast", "temperature", 0)");;\
fhem("set Temperature $CurrentTemp");;\
}

MfG, MisterEltako.
HMLAN-Konfigurations-Adapter, HM-Funkjalousieaktor/HM-Dimmaktor/HM-Schaltaktor f. Markenschalter, Jalousie-/Schaltaktor von Eltako, FT4 v. Eltako, TCM310

homer