History Data From Web Server Not Working? #140
Replies: 9 comments 3 replies
-
I can’t reproduce your problem. When I use |
Beta Was this translation helpful? Give feedback.
-
I have written a test script, could you run this and see if it works
properly on your system?
////////////////////////////////////////////////////
#
IPADDR="192.168.248.6"
START=`date "+%s"`
echo "START=$START"
URL="http://$IPADDR:17580/x/history"
echo "$URL"
LINES=`curl $URL -s | tail -n 1`
echo $LINES
set -- junk $LINES
shift
echo "LAST SAMPLE TIME=$3"
LAST_SAMPLE="$3"
###un comment next line, and it works
###let "LAST_SAMPLE=LAST_SAMPLE-3600"
CMD="curl -s $URL?starttime=$LAST_SAMPLE"
echo "CMD=$CMD"
$CMD
C=0
while true
do
sleep 60
CMD="curl -s $URL?starttime=$LAST_SAMPLE"
echo "$CMD"
RES=`$CMD`
echo "$C $TIME -> $RES"
let "C=C+1"
done
////////////////////////////////////////////////////
Basically I call 'x/history' with no arguments
I get the last line of the output, and then
I get the time associated with the last line of output.
This gives me the last sample time that the web server has.
I then call 'x/history?starttime=<time>'
I expect to get a one line response with the last record
of the history. I get a blank page!
To further test I go into an infinite loop where
I delay for one minute, then re-execute 'x/history?starttime=<time>'.
For a while I get blank pages, but after a while I start getting history
data. I have run this script 4 times. The time it takes to get
data are:
29 seconds
57 seconds
82 seconds (NOTE: For A while I was out of bluetooth range)
81 seconds (NOTE: For A while I was out of bluetooth range)
Does it work on your side?
…On Wed, Mar 20, 2024 at 1:26 AM Jaap Korthals Altes < ***@***.***> wrote:
I can’t reproduce your problem. When I use
http://127.0.0.1:17580/x/history?days=0.5&starttime=1710919791
whatever unixtime out of the results I copy and past after starttime=, it
gives all the results after that time.
You could as well leave out “interval=60”, because it doesn’t have any
effect on Juggluco’s export server. You timezone will have no influence and
I also don’t expect that it was different in the older version of Juggluco
you use.
I think that somewhere you made a mistake. Try it again more carefully.
—
Reply to this email directly, view it on GitHub
<#140 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHIRDRTI2XLC6S5IGSC4FCTYZFB2DAVCNFSM6AAAAABE63O426VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DQNBZG44DK>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I can't find a bug in your script. It works as it should when I run it on my computer or my tablet: 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
LAST SAMPLE TIME=1711013507
CMD=curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
0 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
1 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
2 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
3 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
4 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
5 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
6 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
7 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
8 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
3MH00U5QGL8 488 1711014408 2024-03-21-10:46:48 1 7320 6.0
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
9 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
3MH00U5QGL8 488 1711014408 2024-03-21-10:46:48 1 7320 6.0
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
10 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
3MH00U5QGL8 488 1711014408 2024-03-21-10:46:48 1 7320 6.0
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
11 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
3MH00U5QGL8 488 1711014408 2024-03-21-10:46:48 1 7320 6.0
Did you try already with an unmodified version of Juggluco? |
Beta Was this translation helpful? Give feedback.
-
I was running Juggluco version 7.4.3 that I downloaded from web site.
02/08/2024 11:05 PM 46,703,146 Juggluco-7.4.3.apk
No modifications
Today I downloaded and installed version 7.6.3
03/21/2024 07:43 AM 47,245,950 Juggluco-7.6.3.apk
No change, still doesnt respond with latest sample.
I tried a different phone, same problem.
I guess I can work around this problem by writing
a script and ignoring all data before start time.
I recognize you probably have
more important things to work on. So If we want to
"drop" this issue, I am fine with that.
If you want to explore this issue further, I have mapped
my Juggluco device on my router. If you access:
http://76.158.17.193:17580/x/history
You should get data from my phone.
Run browser test or my test script.
…On Thu, Mar 21, 2024 at 3:10 AM Jaap Korthals Altes < ***@***.***> wrote:
I can't find a bug in your script. It works as it should when I run it on
my computer or my tablet:
3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
LAST SAMPLE TIME=1711013507
CMD=curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
3MH00U5QGL8 <http://127.0.0.1:17580/x/history?starttime=17110135073MH00U5QGL8> 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
0 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
1 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
2 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
3 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
4 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
5 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
6 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
7 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
8 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
3MH00U5QGL8 488 1711014408 2024-03-21-10:46:48 1 7320 6.0
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
9 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
3MH00U5QGL8 488 1711014408 2024-03-21-10:46:48 1 7320 6.0
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
10 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
3MH00U5QGL8 488 1711014408 2024-03-21-10:46:48 1 7320 6.0
curl -s http://127.0.0.1:17580/x/history?starttime=1711013507
11 -> 3MH00U5QGL8 487 1711013507 2024-03-21-10:31:47 1 7305 5.3
3MH00U5QGL8 488 1711014408 2024-03-21-10:46:48 1 7320 6.0
Did you try already with an unmodified version of Juggluco?
—
Reply to this email directly, view it on GitHub
<#140 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHIRDRSSBJVHSWQQGXDEXZDYZKW27AVCNFSM6AAAAABE63O426VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DQNRTGU4DQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
1)
http://192.168.0.74:17580/x/history
last line:
3MH00T3N4ED 1200 1711133313 2024-03-22-11:48:33 -7 18000 112
2)
Data point IS on Juggluco plot
3)
Left middle menu->Export->History
3MH00T3N4ED 1199 1711132466 2024-03-22-11:34:26 -7 17985 115
3MH00T3N4ED 1200 1711133313 2024-03-22-11:48:33 -7 18000 112
4)
http://192.168.0.74:17580/x/history?starttime=1711133313
returns blank
So everything looks OK, except x/history with a start time.
I can send you any data you need.
…On Fri, Mar 22, 2024 at 2:27 AM Jaap Korthals Altes < ***@***.***> wrote:
Yes, with your URL I have the same problem.
Do you also have the problem when using Left middle menu->Export->History?
We could arrange (by e-mail) for you to send your data to a device of me,
to see if I have the same problem with your data. If so I could easier look
for the cause.
—
Reply to this email directly, view it on GitHub
<#140 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHIRDRTMKGGKXGT4HE2OCU3YZP2PDAVCNFSM6AAAAABE63O426VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DQNZVG4ZTE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Some Data:
http://192.168.0.74:17580/x/history
3MH00T3N4ED 1200 1711133313 2024-03-22-11:48:33 -7 18000 112
3MH00T3N4ED 1201 1711134306 2024-03-22-12:05:06 -7 18015 117
3MH00T3N4ED 1202 1711135206 2024-03-22-12:20:06 -7 18030 135
3MH00T3N4ED 1203 1711136106 2024-03-22-12:35:06 -7 18045 159
3MH00T3N4ED 1204 1711137006 2024-03-22-12:50:06 -7 18060 181
3MH00T3N4ED 1205 1711137906 2024-03-22-13:05:06 -7 18075 199
3MH00T3N4ED 1206 1711138806 2024-03-22-13:20:06 -7 18090 216
3MH00T3N4ED 1207 1711139706 2024-03-22-13:35:06 -7 18105 227
3MH00T3N4ED 1208 1711140606 2024-03-22-13:50:06 -7 18120 244
3MH00T3N4ED 1209 1711141459 2024-03-22-14:04:19 -7 18135 254
3MH00T3N4ED 1210 1711142360 2024-03-22-14:19:20 -7 18150 266
3MH00T3N4ED 1211 1711143264 2024-03-22-14:34:24 -7 18165 266
3MH00T3N4ED 1212 1711144206 2024-03-22-14:50:06 -7 18180 282
3MH00T3N4ED 1213 1711145106 2024-03-22-15:05:06 -7 18195 290
3MH00T3N4ED 1214 1711145981 2024-03-22-15:19:41 -7 18210 289
3MH00T3N4ED 1215 1711146885 2024-03-22-15:34:45 -7 18225 291
3MH00T3N4ED 1217 1711148691 2024-03-22-16:04:51 -7 18255 267
3MH00T3N4ED 1218 1711149597 2024-03-22-16:19:57 -7 18270 254
left-menu export history days = .025
No Data
left-menu export history days = .041 = 1 hour
no data
left-menu export history days = .1 = 2.4 hour
Sensorid nr UnixTime YYYY-mm-dd-HH:MM:SS TZ Min mg/dL
3MH00T3N4ED 1211 1711143264 2024-03-22-14:34:24 -7 18165 266
3MH00T3N4ED 1212 1711144206 2024-03-22-14:50:06 -7 18180 282
3MH00T3N4ED 1213 1711145106 2024-03-22-15:05:06 -7 18195 290
3MH00T3N4ED 1214 1711145981 2024-03-22-15:19:41 -7 18210 289
3MH00T3N4ED 1215 1711146885 2024-03-22-15:34:45 -7 18225 291
3MH00T3N4ED 1217 1711148691 2024-03-22-16:04:51 -7 18255 267
3MH00T3N4ED 1218 1711149597 2024-03-22-16:19:57 -7 18270 254
Export commands were issued within 1 hour of last data point
…------
So it looks like left-menu export has the same issue.
On Fri, Mar 22, 2024 at 2:57 PM Jaap Korthals Altes < ***@***.***> wrote:
In Left middle menu->Export->History you naturally also need to try to get
only the last element by using for *Days*
(unixtimeNow-UnixTimeData)/(24*60*60). Something like 0.024
—
Reply to this email directly, view it on GitHub
<#140 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHIRDRRIF35V7BRFT3XC3YDYZSSNDAVCNFSM6AAAAABE63O426VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DQOBSHE2TS>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
You can e-mail a log file to jaapkorthalsaltes@gmail.com or ask for me to give information to setup a mirror connection. |
Beta Was this translation helpful? Give feedback.
-
where is the log file?
…On Sat, Mar 23, 2024 at 12:54 AM Jaap Korthals Altes < ***@***.***> wrote:
You can e-mail a log file to ***@***.*** or ask for me to
give information to setup a mirror connection.
—
Reply to this email directly, view it on GitHub
<#140 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHIRDRTJQWZNC4YQOQLOLPDYZUYL3AVCNFSM6AAAAABE63O426VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DQOBVGIYDE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I think the bug is solved in Juggluco 7.6.5. Thanks for your patients in helping me solve this bug. |
Beta Was this translation helpful? Give feedback.
-
I am trying to get history data from the juggluco web server.
I am using the chrome browser.
'coll' is the dns name of my Juggluco android machine
In Chrome, If I navigate to:
http://coll:17580/x/history?days=3.0?interval=60&starttime=1710900000
I get the following result:
3MH00T3N4ED 943 1710900796 2024-03-19-19:13:16 -7 14145 194
3MH00T3N4ED 944 1710901701 2024-03-19-19:28:21 -7 14160 186
3MH00T3N4ED 945 1710902610 2024-03-19-19:43:30 -7 14175 188
3MH00T3N4ED 946 1710903512 2024-03-19-19:58:32 -7 14190 202
3MH00T3N4ED 947 1710904415 2024-03-19-20:13:35 -7 14205 206
3MH00T3N4ED 948 1710905319 2024-03-19-20:28:39 -7 14220 207
3MH00T3N4ED 949 1710906224 2024-03-19-20:43:44 -7 14235 224
3MH00T3N4ED 950 1710907135 2024-03-19-20:58:55 -7 14250 245
3MH00T3N4ED 951 1710908033 2024-03-19-21:13:53 -7 14265 244
3MH00T3N4ED 952 1710908938 2024-03-19-21:28:58 -7 14280 245
Note that there is data at time: 1710906224, and three other points after
If I Issue the following:
http://coll:17580/x/history?days=3.0&interval=60&starttime=1710906224
I get an empty page?
If I issue the following:
http://coll:17580/x/history?starttime=1710906224
I get an empty page also
At this point, I took a break for about 30 minutes and re-issued:
http://coll:17580/x/history?days=3.0&interval=60&starttime=1710906224
And got:
3MH00T3N4ED 949 1710906224 2024-03-19-20:43:44 -7 14235 224
3MH00T3N4ED 950 1710907135 2024-03-19-20:58:55 -7 14250 245
3MH00T3N4ED 951 1710908033 2024-03-19-21:13:53 -7 14265 244
3MH00T3N4ED 952 1710908938 2024-03-19-21:28:58 -7 14280 245
3MH00T3N4ED 954 1710910750 2024-03-19-21:59:10 -7 14310 260
3MH00T3N4ED 955 1710911654 2024-03-19-22:14:14 -7 14325 264
Now it works?
Now I Issued the following request:
http://coll:17580/x/history?days=3.0&interval=60&starttime=1710908938
and get empty page.
my time: 22:52:00 approximately
In summary, It appears (to me) that the web server does not
work properly if the starttime parameter is too close to
the current time?
I am located in the United States, time zone=(UTC-08:00) Pacific Time (US & Canada), in Daylight Savings Time.
I am running Juggluco version code 451, version name: 7.4.3
Beta Was this translation helpful? Give feedback.
All reactions