WeatherFlow Weather Station (Tempest) integration into Homematic
Moderator: Co-Administratoren
-
- Beiträge: 219
- Registriert: 31.07.2011, 17:37
- System: CCU
- Wohnort: Czech Rep.
- Hat sich bedankt: 83 Mal
- Danksagung erhalten: 14 Mal
WeatherFlow Weather Station (Tempest) integration into Homematic
I own a great weather station Tempest (first generation WeatherFlow, https://tempestwx.com/station/2867) and I would like to integrate it into Homematic.
According to the map (https://tempestwx.com/map/49.7549/10.4229/8) there are a lot of these stations in German-speaking countries, also elsewhere in Europe (where the Homematic system is sold), maybe there would be someone handy who would proved such integration into CCU2 / 3.
Today, I obtain data from the WeatherFlow (Tempest) station to Homematic by detour via the Weather Underground service (for which there is a script for obtaining data from W.U.), but it is slow, and important changes such as wind and rain arrive in CCU2 with a delay.
However, WeatherFlow (Tempest) has an excellent API of its own, and the station sends important weather data very quickly - so it should not be for someone familiar with Homematic scripting to obtain data this way directly, using a clever script.
Thank you very much for any help.
According to the map (https://tempestwx.com/map/49.7549/10.4229/8) there are a lot of these stations in German-speaking countries, also elsewhere in Europe (where the Homematic system is sold), maybe there would be someone handy who would proved such integration into CCU2 / 3.
Today, I obtain data from the WeatherFlow (Tempest) station to Homematic by detour via the Weather Underground service (for which there is a script for obtaining data from W.U.), but it is slow, and important changes such as wind and rain arrive in CCU2 with a delay.
However, WeatherFlow (Tempest) has an excellent API of its own, and the station sends important weather data very quickly - so it should not be for someone familiar with Homematic scripting to obtain data this way directly, using a clever script.
Thank you very much for any help.
Zuletzt geändert von omicronCZ am 18.05.2021, 16:58, insgesamt 3-mal geändert.
-
- Beiträge: 33
- Registriert: 25.09.2015, 14:02
- Wohnort: Schweiz - Zürich
- Danksagung erhalten: 2 Mal
Re: WeatherFlow - Tempest
Hi
As you, I always track in the forum (mainly the German part) if there is someone who has managed to integrate a Tempest weather station (https://weatherflow.com/tempest-weather-system/) in Homematic. Tempest offers all the possibilities I expect from a modern weather station, especially the ultrasonic wind sensor and the haptic rain sensor are very convincing to me, because they do not have any moving parts. I also saw that the query via API should work. However, I am not able to write an appropriate script myself.
There is another problem, the station is not yet officially available in Europe.
We need a source to order the station (with European power supply 230V and approval) and someone to write a script or CUxD integration.
If somebody can help or find a solution, I would be extremely interested, too.
BR
Beat (neoCH)
As you, I always track in the forum (mainly the German part) if there is someone who has managed to integrate a Tempest weather station (https://weatherflow.com/tempest-weather-system/) in Homematic. Tempest offers all the possibilities I expect from a modern weather station, especially the ultrasonic wind sensor and the haptic rain sensor are very convincing to me, because they do not have any moving parts. I also saw that the query via API should work. However, I am not able to write an appropriate script myself.
There is another problem, the station is not yet officially available in Europe.
We need a source to order the station (with European power supply 230V and approval) and someone to write a script or CUxD integration.
If somebody can help or find a solution, I would be extremely interested, too.
BR
Beat (neoCH)
-----
Ort: Schweiz
2x CCU3 mit total ca. 32 Sensoren/Akoren für Heizung, Licht und Lamellenstoren (Jalousien) und Sonnenstoren (Markisen), Türen und Tor. ¦ CUx-Daemon ¦ XML-API ¦ CCU2 mit PioTec EnOcean Zusatzplatine und Antenne RP-SMA 868 MHz in CCU2 mit CUxD - Gateway Software für EnOcean Wettersensor (Eltako-MS)
Ort: Schweiz
2x CCU3 mit total ca. 32 Sensoren/Akoren für Heizung, Licht und Lamellenstoren (Jalousien) und Sonnenstoren (Markisen), Türen und Tor. ¦ CUx-Daemon ¦ XML-API ¦ CCU2 mit PioTec EnOcean Zusatzplatine und Antenne RP-SMA 868 MHz in CCU2 mit CUxD - Gateway Software für EnOcean Wettersensor (Eltako-MS)
-
- Beiträge: 9676
- Registriert: 27.04.2020, 10:34
- System: CCU
- Hat sich bedankt: 698 Mal
- Danksagung erhalten: 1625 Mal
Re: WeatherFlow - Tempest
Have a look at my Accuweather Script in the signature. If the output of your API is not too complex it should be able to use by adapt the parameter.
LG, Michael.
Wenn du eine App zur Bedienung brauchst, dann hast du kein Smarthome.
Wettervorhersage über AccuWeather oder OpenWeatherMap+++ Rollladensteuerung 2.0 +++ JSON-API-Ausgaben auswerten +++ undokumentierte Skript-Befehle und Debugging-Tipps +++
Wenn du eine App zur Bedienung brauchst, dann hast du kein Smarthome.
Wettervorhersage über AccuWeather oder OpenWeatherMap+++ Rollladensteuerung 2.0 +++ JSON-API-Ausgaben auswerten +++ undokumentierte Skript-Befehle und Debugging-Tipps +++
-
- Beiträge: 219
- Registriert: 31.07.2011, 17:37
- System: CCU
- Wohnort: Czech Rep.
- Hat sich bedankt: 83 Mal
- Danksagung erhalten: 14 Mal
Re: WeatherFlow - Tempest
Hi Michael,
thank you for your response.
Here is a description of the WeatherFlow API, I personally do not know Homematic scripts, so I would definitely welcome the help of someone else experienced.
thank you for your response.
Here is a description of the WeatherFlow API, I personally do not know Homematic scripts, so I would definitely welcome the help of someone else experienced.
-
- Beiträge: 219
- Registriert: 31.07.2011, 17:37
- System: CCU
- Wohnort: Czech Rep.
- Hat sich bedankt: 83 Mal
- Danksagung erhalten: 14 Mal
Re: WeatherFlow - Tempest
I tried to play with the WeatherFlow API a bit, this is what the command for
"Get the latest most recent observation for your station."
Looks like, which returns the required data:
And this is what the returned result looks like:
Could someone please process this into a Homematic script, which would write the selected returned data into Homematic variables?
"Get the latest most recent observation for your station."
Looks like, which returns the required data:
Code: Alles auswählen
https://swd.weatherflow.com/swd/rest/observations/?device_id=[your_device_id]&token=[your_access_token]
Code: Alles auswählen
{"station_id":1234,"station_name":"Bleiberg Tempest","public_name":"Bleiberg Tempest","latitude":xx.xxxxx,"longitude":xx.xxxxx,"timezone":"Europe/Prague","elevation":700.0,"is_public":true,"status":{"status_code":0,"status_message":"SUCCESS"},"station_units":{"units_temp":"c","units_wind":"kph","units_precip":"mm","units_pressure":"mb","units_distance":"km","units_direction":"degrees","units_other":"metric"},"outdoor_keys":["timestamp","air_temperature","barometric_pressure","station_pressure","pressure_trend","sea_level_pressure","relative_humidity","precip","precip_accum_last_1hr","precip_accum_local_day","precip_accum_local_yesterday","precip_minutes_local_day","precip_minutes_local_yesterday","wind_avg","wind_direction","wind_gust","wind_lull","solar_radiation","uv","brightness","lightning_strike_last_epoch","lightning_strike_last_distance","lightning_strike_count","lightning_strike_count_last_1hr","lightning_strike_count_last_3hr","feels_like","heat_index","wind_chill","dew_point","wet_bulb_temperature","delta_t","air_density"],"obs":[{"timestamp":1608395185,"air_temperature":-0.5,"barometric_pressure":939.0,"station_pressure":939.0,"sea_level_pressure":1021.4,"relative_humidity":99,"precip":0.0,"precip_accum_last_1hr":0.0,"precip_accum_local_day":0.0,"precip_accum_local_yesterday":0.0,"precip_minutes_local_day":0,"precip_minutes_local_yesterday":0,"wind_avg":0.0,"wind_direction":0,"wind_gust":0.0,"wind_lull":0.0,"solar_radiation":0,"uv":0.0,"brightness":0,"lightning_strike_last_epoch":1599316508,"lightning_strike_last_distance":14,"lightning_strike_count":0,"lightning_strike_count_last_1hr":0,"lightning_strike_count_last_3hr":0,"feels_like":-0.5,"heat_index":-0.5,"wind_chill":-0.5,"dew_point":-0.6,"wet_bulb_temperature":-0.6,"delta_t":0.1,"air_density":1.19975,"pressure_trend":"steady"}]}
-
- Beiträge: 9676
- Registriert: 27.04.2020, 10:34
- System: CCU
- Hat sich bedankt: 698 Mal
- Danksagung erhalten: 1625 Mal
Re: WeatherFlow - Tempest
Perhaps I could have a look on it tomorrow.
LG, Michael.
Wenn du eine App zur Bedienung brauchst, dann hast du kein Smarthome.
Wettervorhersage über AccuWeather oder OpenWeatherMap+++ Rollladensteuerung 2.0 +++ JSON-API-Ausgaben auswerten +++ undokumentierte Skript-Befehle und Debugging-Tipps +++
Wenn du eine App zur Bedienung brauchst, dann hast du kein Smarthome.
Wettervorhersage über AccuWeather oder OpenWeatherMap+++ Rollladensteuerung 2.0 +++ JSON-API-Ausgaben auswerten +++ undokumentierte Skript-Befehle und Debugging-Tipps +++
-
- Beiträge: 9676
- Registriert: 27.04.2020, 10:34
- System: CCU
- Hat sich bedankt: 698 Mal
- Danksagung erhalten: 1625 Mal
Re: WeatherFlow - Tempest
OK, it not as easy as I thought, because it's not XML but JSON. So I need a complete new script.
You could check a first try:
You have to edit the URL and put in the code in "Script testing" area of Programm section in the WebUI.
Then you should get an output like this:
If this works the next step will be to define an prefix for the systemvariables. Perhaps prefex="WF_"
And if you create a systemvariable like "WF_wind_gust" the script will put the wind_gust value in this systemvariable at the next run.
Is this what you expect? Then I will go forward.
You could check a first try:
Code: Alles auswählen
!WeatherFlow - Tempest auslesen
!V1.0 MichaelN https://homematic-forum.de/forum/viewtopic.php?f=49&t=63711
string url = "https://swd.weatherflow.com/swd/rest/observations/?device_id=[your_device_id]&token=[your_access_token]";
string rueck;
string error;
system.Exec("wget --no-check-certificate -O --timeout=10 - '"#url#"'" , &rueck, &error);
if (!rueck== "")
{
WriteLine("HTTPRequest OK");
rueck = rueck.Replace('"','');
string Part; string Part1; string Part2;
foreach (Part, rueck.Split(",") ){
if (Part.Contains(":"))
{
WriteLine (Part);
}
}
} else {
WriteLine("Error at HHTP Request");
}
Then you should get an output like this:
Code: Alles auswählen
HTTPRequest OK
{station_id:1234
station_name:Bleiberg Tempest
public_name:Bleiberg Tempest
latitude:xx.xxxxx
longitude:xx.xxxxx
timezone:Europe/Prague
elevation:700.0
is_public:true
status:{status_code:0
status_message:SUCCESS}
station_units:{units_temp:c
units_wind:kph
units_precip:mm
units_pressure:mb
units_distance:km
units_direction:degrees
units_other:metric}
outdoor_keys:[timestamp
obs:[{timestamp:1608395185
air_temperature:-0.5
barometric_pressure:939.0
station_pressure:939.0
sea_level_pressure:1021.4
relative_humidity:99
precip:0.0
precip_accum_last_1hr:0.0
precip_accum_local_day:0.0
precip_accum_local_yesterday:0.0
precip_minutes_local_day:0
precip_minutes_local_yesterday:0
wind_avg:0.0
wind_direction:0
wind_gust:0.0
wind_lull:0.0
solar_radiation:0
uv:0.0
brightness:0
lightning_strike_last_epoch:1599316508
lightning_strike_last_distance:14
lightning_strike_count:0
lightning_strike_count_last_1hr:0
lightning_strike_count_last_3hr:0
feels_like:-0.5
heat_index:-0.5
wind_chill:-0.5
dew_point:-0.6
wet_bulb_temperature:-0.6
delta_t:0.1
air_density:1.19975
pressure_trend:steady}]}
And if you create a systemvariable like "WF_wind_gust" the script will put the wind_gust value in this systemvariable at the next run.
Is this what you expect? Then I will go forward.
LG, Michael.
Wenn du eine App zur Bedienung brauchst, dann hast du kein Smarthome.
Wettervorhersage über AccuWeather oder OpenWeatherMap+++ Rollladensteuerung 2.0 +++ JSON-API-Ausgaben auswerten +++ undokumentierte Skript-Befehle und Debugging-Tipps +++
Wenn du eine App zur Bedienung brauchst, dann hast du kein Smarthome.
Wettervorhersage über AccuWeather oder OpenWeatherMap+++ Rollladensteuerung 2.0 +++ JSON-API-Ausgaben auswerten +++ undokumentierte Skript-Befehle und Debugging-Tipps +++
-
- Beiträge: 219
- Registriert: 31.07.2011, 17:37
- System: CCU
- Wohnort: Czech Rep.
- Hat sich bedankt: 83 Mal
- Danksagung erhalten: 14 Mal
Re: WeatherFlow - Tempest
Hi Michael,
sorry, it returns :
Im sorry, but before that I made a mistake in the correct command to request data, it should be correct (including my station code and test token):
You can try it yourself as a URL command in a browser, this works 100%
sorry, it returns :
Code: Alles auswählen
Error at HHTP Request
Code: Alles auswählen
https://swd.weatherflow.com/swd/rest/observations/station/2867?token=2fdf9a5b-19a0-46e6-99b3-28d67f8cab44
-
- Beiträge: 219
- Registriert: 31.07.2011, 17:37
- System: CCU
- Wohnort: Czech Rep.
- Hat sich bedankt: 83 Mal
- Danksagung erhalten: 14 Mal
Re: WeatherFlow - Tempest
Yes, I agree, that's ideal.
MichaelN hat geschrieben: ↑20.12.2020, 13:06If this works the next step will be to define an prefix for the systemvariables. Perhaps prefex="WF_"
And if you create a systemvariable like "WF_wind_gust" the script will put the wind_gust value in this systemvariable at the next run.
Is this what you expect? Then I will go forward.