no websocket ,it uses a GET request capture data is sent to the url and dumped into mysql and text file simultaneously the simple explode the text file
$file_live = file_get_contents(āMBrealtimeupload.txtā);
$meteobridgeapi = explode(" ", $file_live);
thats it then simply assign
$temp = $meteobridgeapi[2];
$barometer = $meteobridgeapi[10];
$raintoday = $meteobridgeapi[9];
$uv = $weatherflow['uv'];
$windgust = $meteobridgeapi[6];
$windspeed = $meteobridgeapi[5];
$solar = $weatherflow['solar'];
$dewpoint = $meteobridgeapi[4];
$rainrate = $meteobridgeapi[8];
$direction =$meteobridgeapi[7];
for mysql
mysqli_query($conn,āINSERT INTO weather34station(time,outsideTemp,barometer,raintoday,UV,windgustmph,windSpeed,radiation,dewpoint,rainrate,direction,date,lightning)
VALUES(ā$updatedā, ā$tempā, ā$barometerā,ā$raintodayā,ā$uvā,ā$windgustā,ā$windspeedā,ā$solarā,ā$dewpointā,ā$rainrateā,ā$directionā,ā$dateā,ā$lightningā)ā);}
else if (mysqli_connect_errno()) {
printf(āConnect failed: %s\nā, mysqli_connect_error());
exit();}
all this is in the same file so each time the meteobridge pings the url file all this happens every ten seconds.
for weather flow data I only insert the uv/solar into the template and mysql
$file1 = āā¦/jsondata/weatherflow.txtā;
$url = $file1;
$content = file_get_contents($url);
$json = json_decode($content, true);
foreach($json[āobsā] as $item)
//foreach($json[āstation_unitsā] as $item2)
{
$weatherflow[āsolarā] = $item[āsolar_radiationā];
$weatherflow[āuvā] = $item[āuvā];
}
hope that helps bottom line its all automated no hands or manually doing things last reboot of meteobridge was October for a firmware upgrade and if erroneous(bad) data is received or sent the mysql ignores it with some basic php IF{} code .
Confused 