Author Topic: realtime path...  (Read 568 times)

0 Members and 1 Guest are viewing this topic.

Offline pricey

  • Member
  • *
  • Posts: 24
realtime path...
« on: March 17, 2024, 07:55:45 AM »
Hi all. Using wifi logger. Trying to get the realtime .txt to feed the pws template. Wunderground api works but cannot get the wifi logger FTP current data export settings to work. Any idea what is the correct path i use is to put the realtime txt onto the server?
thanks

http://www.llanelliweather.kesug.com/pwsWD/index.php

ps using a free host to try to get it to work

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: realtime path...
« Reply #1 on: March 17, 2024, 12:08:25 PM »
Hi,
For my realtime http://www.komokaweather.com/wifi-console/realtime.txt and json files I have it as per attached.
I had it working with Brian's earlier PWS script but doesn't work anymore likely due to updated PHP version.
Hope this helps,

Paul
« Last Edit: March 17, 2024, 12:11:21 PM by PaulMy »

Offline pricey

  • Member
  • *
  • Posts: 24
Re: realtime path...
« Reply #2 on: March 17, 2024, 12:37:56 PM »
That sorted it. Thanks Paul. Top man
One more question if i can be cheeky

I can only see my site if i add /pwsWD after the .kesug.com. I think it's an index file issue so how can see my site without adding pwsWD at the end? I uploaded all the pws files into the htdocs (root) when i started. If i omit the pwsWD i get a forbidden error.
Thanks

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: realtime path...
« Reply #3 on: March 17, 2024, 01:39:34 PM »
Hi,
I am not very knowledgeable on those things, but likely because you have the script in a /pwsWD subfolder.  If it was in your site's root folder it likely would display with just http://www.llanelliweather.kesug.com
But I also believe you can do some settings at your hosting to have http://www.llanelliweather.kesug.com automatically load (redirect) http://www.llanelliweather.kesug.com/pwsWD/index.php

If available would you be so kind to share the download link on your script.  I've tried to find what is causing mine to fail and can only find this error in my error_log.
Code: [Select]
[03-Mar-2024 17:44:31 UTC] PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /home/psoykkrhjuz3/public_html/pws/eqlist.php on line 29
[17-Mar-2024 00:27:10 UTC] PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /home/psoykkrhjuz3/public_html/pws/eqlist.php on line 29[/quote]
and line 29 is
[code]   $magnitude[$i]=$parsed_json{$i}{'magnitude'};

Enjoy,
Paul
« Last Edit: March 30, 2024, 12:09:56 PM by PaulMy »

Offline pricey

  • Member
  • *
  • Posts: 24
Re: realtime path...
« Reply #4 on: March 17, 2024, 03:14:14 PM »
Yes no problem...where do i find the script you want Paul?

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: realtime path...
« Reply #5 on: March 17, 2024, 03:22:34 PM »
Hi,
Your pws; mine is the CU version initially working with Brian U in 2015 and likely not updated for current PHP.


Enjoy,
Paul

Offline pricey

  • Member
  • *
  • Posts: 24
Re: realtime path...
« Reply #6 on: March 17, 2024, 03:50:10 PM »
Sorry Paul don't understand. You need to give a newbie like me holding hands directions i'm afraid  :oops:

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: realtime path...
« Reply #7 on: March 17, 2024, 04:08:02 PM »
Hi,
No problem.  Just asking from where you downloaded the pwsWD template.  Presumably you downloaded it from somewhere in a zip format onto your computer, and then you unzipped it.


Enjoy,
Paul

Offline Vasco

  • Forecaster
  • *****
  • Posts: 342
    • PWS
Re: realtime path...
« Reply #8 on: March 17, 2024, 04:26:14 PM »
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline pricey

  • Member
  • *
  • Posts: 24
Re: realtime path...
« Reply #9 on: March 17, 2024, 04:35:09 PM »
Hi Paul...yes. Downloaded from pws dashboard and unzipped on my computer. Notuploaded zipped and then unzipped using hosts' file manager.
Steve

Offline WiFiLogger

  • Forecaster
  • *****
  • Posts: 733
Re: realtime path...
« Reply #10 on: March 28, 2024, 10:08:06 AM »
After changing some servers I and Steve were able to make it run.

What has been done is that we are sending the REALTIME.TXT file via an HTTP request to the server. The request is intercepted by a PHP script, which saves the file on the server in place of the previous one. So, it's like FTP, but safer, and faster. Steve has fresh data on the server every 3 seconds. You can see the wind updates.

In the next iteration of the software for the WiFiLogger, HTTP requests will also be sent as HTTPS, as nowadays the blocking of the open HTTP port by server administrators is starting. We need to keep up with the times.

I hope Steve won't mind if you take a look at his website. https://www.llanelliweather.info