Author |
Topic |
|
ccds
Georgia
16 Posts |
|
Reply #1
EmfDev
2250 Posts |
Posted - 02/02/2022 : 13:06:04
|
Hi ccds, thank you for letting us know about this issue. We will check and fix this. |
|
|
Reply #2
ccds
Georgia
16 Posts |
Posted - 02/02/2022 : 15:43:00
|
Thank you very much! Looking forward for your response! |
|
|
Reply #3
EmfDev
2250 Posts |
Posted - 02/02/2022 : 17:10:57
|
We checked and looks like the database has been recently updated. But you should be able to see new data. |
|
|
Reply #4
ccds
Georgia
16 Posts |
|
Reply #5
ccds
Georgia
16 Posts |
|
Reply #6
EmfDev
2250 Posts |
Posted - 02/02/2023 : 14:57:43
|
hello, our devs were investigating why our website crashes too much and is basically inoperable this past few weeks and said they had temporarily fixed the issue. Maybe this is the reason why some features disappeared. May I ask how much data do you need from the map and how often do you make your calls? |
|
|
Reply #7
ccds
Georgia
16 Posts |
|
Reply #8
Marco de Chaligny
France
4 Posts |
|
Reply #9
EmfDev
2250 Posts |
Posted - 02/06/2023 : 11:13:12
|
Can you guys check it? The devs changed the time to MST and removed the timezone parameter. |
|
|
Reply #10
EmfDev
2250 Posts |
|
Reply #11
tinwhisker
3 Posts |
Posted - 02/06/2023 : 17:07:40
|
To the devs,
Your JSON is broken, the link:
https://www.gmcmap.com/historyData-plain.asp?Param_ID=65115959476
gives:
{"time":"2023-02-06 17:58:44 MST"",CPM":"21"",ACPM":"19.81"",uSv":"0.14"}
The commas are misplaced, the correct output should be:
{"time":"2023-02-06 17:58:44 MST","CPM":"21","ACPM":"19.81","uSv":"0.14"}
Anyone trying to parse data as it is currently given will get errors. |
|
|
Reply #12
ccds
Georgia
16 Posts |
|
Reply #13
EmfDev
2250 Posts |
Posted - 02/07/2023 : 10:44:52
|
Im not sure what you mean but as long as you know the Param_ID, you can get those last data readings. User can also convert the MST to their own timezone. You dont need to pull the history everytime, you can just store those data in your own database and pull from those.
This is to reduce the server load as the server keeps crashing or becomes very busy when there are too many requests. |
|
|
Reply #14
ccds
Georgia
16 Posts |
Posted - 02/08/2023 : 20:03:47
|
Yes, I understand the server overload when increased requests. We want to get our site up and running again in terms of collecting historical data from your gmcmap.com site. Converting MST to our time zone is easy and not our problem. From our correspondence, as I understand it, the option with gmc-plain-data.asp will no longer working. He gave us 500 records for the latest historical data in JSON. After changes on your site, a new link www.gmcmap.com/historyData-plain.asp?Param_ID=xxxxxx was suggested, which gives one last JSON record for historical data ({"time":"2023-02-08 18:33: 30 MST","CPM":"19","ACPM":"22.53","uSv":"0.06"}). Is it possible to increase the number of recent entries, let's say at least up to 20?. The reason why one entry is not enough for us is that we take data from your site every 20 minutes and when this one we get only the last one and do not see what happened during the previous 20 minutes for our GMCs that are registered on your site.
To solve our problem (if it is not possible to give us 20 or more records in JSON format by reference), I think about 2 options: 1. take data from www.gmcmap.com/historyData-plain.asp?Param_ID=xxxxxxxx , hence rebuild cron for 1 minute (if host allows) instead of 20 minutes. 2. take data from https://www.gmcmap.com/historyData.asp?Param_ID=xxxxxxxx&systemTimeZone=4 which now gives 500 data, but rather slowly. By the way, instead of this option, it was proposed by you (hero) gmc-plain-data.asp JSON version.
If you offer another version, we will be very happy. |
|
|
Reply #15
EmfDev
2250 Posts |
|
Reply #16
ccds
Georgia
16 Posts |
|
Reply #17
tinwhisker
3 Posts |
Posted - 02/10/2023 : 08:23:09
|
Another error for the devs.
Currently the link:
https://www.gmcmap.com/historyData-plain.asp?Param_ID=65115959476
gives:
{"time":"2023-02-10 09:12:00 MST","CPM":"16","ACPM":"19.81","uSv":"0.10"}<br>
The HTML line break at the end is not defined by JSON and while it will not show up when viewed in a web browser, it will cause JSON parsers to break. You can "view page source" to verify that the HTML line break exists.
Parse error on line 1:
...19.81","uSv":"0.19"}<br>
-----------------------^
Expecting 'EOF', '}', ',', ']', got 'undefined' |
Edited by - tinwhisker on 02/10/2023 08:33:04 |
|
|
Reply #18
ccds
Georgia
16 Posts |
Posted - 02/10/2023 : 12:28:30
|
Agree with tinwhisker
www.gmcmap.com/historyData-plain.asp?Param_ID=xxxxxxxx&n=xxx doesn't give correct JSON (there is <br> between records). From the proposed, too, I can extract the data. It would be nice if there were corrections.
I'm waiting for an answer, because I can't fix our script until I finally know in what form I will receive the data. |
|
|
Reply #19
EmfDev
2250 Posts |
Posted - 02/13/2023 : 11:35:09
|
Just removed the <br> is this the correct way? |
|
|
Reply #20
ccds
Georgia
16 Posts |
Posted - 02/13/2023 : 15:07:20
|
This version can also be used to collect data. Previous version (with <br>) was also acceptable. For me, the key was the "&n=xxx" parameter. json_decode($json) PHP function gets an error with suggested versions, so there was a question with <br>.
More specifically JSON in the form: [{"time":"2023-02-13 13:59:08 MST","CPM":"16","ACPM":"22.55","uSv":"0.05"},{"time":"2023-02-13 13:53:03 MST","CPM":"22","ACPM":"22.55","uSv":"0.07"}, .... ,{ "time":"2023-02-13 13:53:03 MST","CPM":"22","ACPM":"22.55","uSv":"0.07"}] is processed correctly.
tinwhisker do you think the above proposed JSON is acceptable for you?
I need to know in what final form I will receive the data. From it depends how I correct the data collection script that was written earlier according for gmc-plain-data.asp. |
|
|
Reply #21
EmfDev
2250 Posts |
Posted - 02/13/2023 : 16:42:40
|
for n=1, [{"time":"2023-02-13 13:59:08 MST","CPM":"16","ACPM":"22.55","uSv":"0.05"},] does this work with comma "," before the closing bracket?
Same with n > 1? Is it ok to have comma before the closing bracket? [{"time":"2023-02-13 13:59:08 MST","CPM":"16","ACPM":"22.55","uSv":"0.05"},{"time":"2023-02-13 13:53:03 MST","CPM":"22","ACPM":"22.55","uSv":"0.07"}, .... ,{ "time":"2023-02-13 13:53:03 MST","CPM":"22","ACPM":"22.55","uSv":"0.07"},] |
|
|
Reply #22
ccds
Georgia
16 Posts |
Posted - 02/13/2023 : 17:02:57
|
if n=1 last comma "," is wrong, correct is [{"time":"2023-02-13 13:59:08 MST","CPM":"16","ACPM":"22.55","uSv":"0.05"}] comma must be only between records [{"time":"2023-02-13 13:59:08 MST","CPM":"16","ACPM":"22.55","uSv":"0.05"},{"time":"2023-02-13 13:53:03 MST","CPM":"22","ACPM":"22.55","uSv":"0.07"}] last comma also wrong before closed last bracket "]" |
|
|
Reply #23
EmfDev
2250 Posts |
Posted - 02/13/2023 : 17:48:01
|
ok now can you test it and see if this is the correct format? |
|
|
Reply #24
ccds
Georgia
16 Posts |
Posted - 02/14/2023 : 09:45:45
|
I tested and now the format is correct.
If this format remains so, I will adjust my script for this.
Thank you very much. |
|
|
Reply #25
balkis
2 Posts |
Posted - 02/20/2023 : 14:57:46
|
Hey there, what about the timezone parameter? Does it still work? It seems it is currently ignored and all values are provided in MST timezone |
|
|
Reply #26
EmfDev
2250 Posts |
Posted - 02/21/2023 : 14:17:09
|
Hello you will need to convert MST to your timezone. |
|
|
Reply #27
balkis
2 Posts |
Posted - 02/21/2023 : 22:37:23
|
Hey EmfDev, you mean i need to do the processing locally and that API no longer supports timezones? |
|
|
Reply #28
EmfDev
2250 Posts |
Posted - 02/22/2023 : 10:18:21
|
That is right. It helps to reduce server load. |
|
|
|
Topic |
|