New WS40 v2 api push adding "api.php" to url incorrectly

This section covers the Meteobridge PRO, PRO2, NANO SD, Raspberry Pi and VM platforms exclusively

Moderator: Mattk

Post Reply
User avatar
staze
Gold Boarder
Gold Boarder
Posts: 199
Joined: Fri Jan 18, 2019 2:56 am
Contact:

New WS40 v2 api push adding "api.php" to url incorrectly

Post by staze »

Seems like the new WS40 push weather net is adding "api.php" to the URL and that's causing wordpress to return an error 500.

So it should be

Code: Select all

https://www.example.com/wp-json/ws40/v2/mt/1?<api-call>
but instead meteobridge is doing

Code: Select all

https://www.example.com/wp-json/ws40/v2/mt/1/api.php?<api-call>
Which results in wordpress/php throwing "500 Internal Server Error"

Maybe I could fix this with some .htaccess rules, but seems like it's just a bug with the new weather net.

Also, some of these values seem completely wrong...

Code: Select all

SW=meteobridge&amp;T=7.2&amp;TDMAX=8.0&amp;TDMAXT=1793571494&amp;TDMIN=4.2&amp;TDMINT=1793548934&amp;H=92&amp;HDMAX=96.0&amp;HDMAXT=1793561290&amp;HDMIN=88.0&amp;HDMINT=1793571960&amp;P=1020.3&amp;PDMAX=1020.3&amp;PDMAXT=1793587595&amp;PDMIN=1013.1&amp;PDMINT=1793516796&amp;W=0.0&amp;WDMAX=4.7&amp;WDMAXT=1793575741&amp;G=0.0&amp;GDMAX=14.5&amp;GDMAXT=1793574831&amp;B=300&amp;GDMAXB=340&amp;R=0.2&amp;RLMON=42.7&amp;RLYEAR=799.9&amp;RR=0.0&amp;RRDMAX=0.0&amp;RRDMAXT=1793587607&amp;TIN=22.9&amp;HIN=34&amp;R1H=2702.7&amp;RMON=0.2&amp;RYEAR=510.8&amp;BAT_IN=0&amp;BAT_T=0&amp;BAT_W=0&amp;BAT_R=0: 
R1H is rain in last 60 minutes (according to WS40 spec here: https://www.weatherstation40.live/developers/). It definitely has not rained 2.7 meters in the last 60 minutes. =P

Thanks!
Davis Vantage Vue, Weather Envoy, Meteobridge Nano SD
Post Reply