Hello community, Hello cicciocb
I have a problem and I don't know if I didn't understand something or there is a bug here.
The code works with
ANNEX 1.42 and Esp 8266
but unfortunately not with
ANNEX 32 and ESP 32
There were tested 2 boards each.
I hope someone understands what I write here
Kind regards
Michael S
---------Code----------
let result$=""
onwgetasync syncload
gosub refresh_price
timer0 60000,refresh_Price
wait
Refresh_Price:
wgetasync "creativecommons.tankerkoenig.de/json/detail.php?id=cd8ba6a6-xxxxxxxx-a3ae-d31280b2585f&apikey=ccd8c3ca-f8ae-a0ac-441a-
fb7aexxxxxxx",443,1
name$ = json$(result$, "name"):name$=left$(name$,4)
rem ONWGETASYNC OFF
return
' --------------------------------------------------------------------------------------------------
syncload:
wlog "jmp to sub"
result$=wgetresult$
return
WGET Annex
- cicciocb
- Site Admin
- Posts: 1966
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 422 times
- Been thanked: 1310 times
- Contact:
Re: WGET Annex
HI Michael,
what is exactly your problem ?
I tried your code and seems to work, even if I receive an invalid answer probably because the parameters are not correct.
However, copying and pasting your code I found that the line 8 is separated in 2 parts going on the next line; this is invalid !
This is the answer that I receive.
For info, typing the same url in the browser, I have exactly the same json answer
what is exactly your problem ?
I tried your code and seems to work, even if I receive an invalid answer probably because the parameters are not correct.
However, copying and pasting your code I found that the line 8 is separated in 2 parts going on the next line; this is invalid !
This is the answer that I receive.
Code: [Local Link Removed for Guests]
HTTP/1.1 200 OK
Server: nginx/1.10.3 (Ubuntu)
Date: Mon, 17 May 2021 20:15:18 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: origin, x-requested-with, content-type, accept
Access-Control-Allow-Methods: GET
{"status":"error","ok":false,"message":"parameter error"}
Re: WGET Annex
Halllo cicciocb
Maybe you can read the code better now.
The problem is that it works with ANNEX 1.42 on a 8266.
But not on a ESP32.
There it does not jump into the sub "syncload".
As said
ANNEX 32 does not work
Annex 1.42 works perfectly
Many greetings
Michael S
Maybe you can read the code better now.
The problem is that it works with ANNEX 1.42 on a 8266.
But not on a ESP32.
There it does not jump into the sub "syncload".
As said
ANNEX 32 does not work
Annex 1.42 works perfectly
Many greetings
Michael S
Code: [Local Link Removed for Guests]
let result$=""
onwgetasync syncload
gosub refresh_price
timer0 60000,refresh_Price
wait
Refresh_Price:
wgetasync "creativecommons.tankerkoenig.de/json/detail.php?id=cd8ba6a6-XXXX-1ed5-a3ae-d3XXXX2585f&apikey=ccd8c3ca-f8ae-a0ac-441a-fb7ae9bf2c91",443,1
name$ = json$(result$, "name"):name$=left$(name$,4)
' ONWGETASYNC OFF
return
' --------------------------------------------------------------------------------------------------
syncload:
wlog "jmp to sub"
result$=wgetresult$
return
Re: WGET Annex
...It works perfectly in the browser window.
I get the correct JSON file.
I had to make the ID unrecognizable, of course
I get the correct JSON file.
I had to make the ID unrecognizable, of course
- Fernando Perez
- Posts: 378
- Joined: Mon Feb 15, 2021 10:09 pm
- Location: Santander (Spain)
- Has thanked: 195 times
- Been thanked: 267 times
Re: WGET Annex
I am a bit lazy to give my email address to more companies to obtain a real API, but I have tried with the test API that they provide and, for me, your program works perfectly on an ESP32 loaded with "Annex32 Wifi 1.43 CAN BLE".
Code: [Local Link Removed for Guests]
onwgetasync syncload
gosub refresh_price
timer0 60000, refresh_Price
wait
Refresh_Price:
wgetasync "https://creativecommons.tankerkoenig.de/json/list.php?lat=52.521&lng=13.438&rad=1.5&sort=dist&type=all&apikey=00000000-0000-0000-0000-000000000002"
return
' --------------------------------------------------------------------------------------------------
syncload:
result$ = wgetresult$
wlog result$
wlog
name$ = json$(result$, "name")
wlog name$
return
- cicciocb
- Site Admin
- Posts: 1966
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 422 times
- Been thanked: 1310 times
- Contact:
Re: WGET Annex
I confirm what said by Fernando, it works well for me too.
What version of Annex32 are you using ?
What version of Annex32 are you using ?
Re: WGET Annex
Thank you both for the support
On the board is Annex32 Wifi 1.43 CAN BLE
I'll keep trying...
Many greetings
Michael S
On the board is Annex32 Wifi 1.43 CAN BLE
I'll keep trying...
Many greetings
Michael S
Re: WGET Annex
Nachtrag....Nach 3 Versuche die Firmware hochzuladen hat es jetzt auch gelappt.....Danke