Hello ,
I am using this http event url:
http://www.webcamwassenaar.nl/wxdata/re ... d]kn&gust=[wind0wind-max6=kn.0:--]kn&richting=[wind0dir]
With this php:
<?php
$U = $_GET['epoch'];
$wind = $_GET['wind'];
$gust = $_GET['gust'];
$richting = $_GET['richting'];
$values = array($U,$wind, $gust, $richting);
$result = json_encode($values);
file_put_contents("datawaswind.txt",$result);
?>
The response in the resulting txt file is :
[null,"[wind0wind]kn","1kn","[wind0dir]"]
What's wrong ? who knows?
HTTP event question **solved**
Moderator: Mattk
- ConligWX
- Platinum Boarder
- Posts: 329
- Joined: Wed Nov 14, 2018 12:48 pm
- Location: Conlig, Co. Down, UK
- Contact:
Re: HTTP event question
the correct way of calling a sensor is:
sensor-selector=converter.decimals:replacement
"converter", "decimals" and "replacement" can be omitted, "sensor" and "type"(selector) are mandatory.
While "sensor" tells what sensor and what piece of information of the sensor to use, "selector" decides data from what time period should be taken into account and "converter" does convert data into measurement units the user likes most. "Decimals" decides about precision the result should be shown in and "replacement" gives the string to be returned when there is no data for defined sensor available.
so
[wind0dir] should be something like: [wind0dir-act]
https://www.meteobridge.com/wiki/index.php/Templates
Look at "Selectors"
sensor-selector=converter.decimals:replacement
"converter", "decimals" and "replacement" can be omitted, "sensor" and "type"(selector) are mandatory.
While "sensor" tells what sensor and what piece of information of the sensor to use, "selector" decides data from what time period should be taken into account and "converter" does convert data into measurement units the user likes most. "Decimals" decides about precision the result should be shown in and "replacement" gives the string to be returned when there is no data for defined sensor available.
so
[wind0dir] should be something like: [wind0dir-act]
https://www.meteobridge.com/wiki/index.php/Templates
Look at "Selectors"
Regards Simon
https://www.conligwx.org/pws
https://www.conligwx.org/pws