This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Scrit HTTP request timeout
#1
Hi,

Got a LM5 i.MX6 with most recent fw (20210510) and I?m experiencing a wired issue

IP configuration is correct.. I can ping 8.8.8.8 and traceroute www.google.com correctly, but.. all lua script that uses socket.http library goes in timeout error.
luasocket library is version 2.0.2-20210217

This of course will prevent any script to run as they are intended.

Is is an issue someone else has faced and fixed?
thanks
Regards

P.S.

this is the script:

Code:
require('json')
local http = require('socket.http')
http.TIMEOUT = 30

local OWMLINK    = 'https://api.openweathermap.org/data/2.5/onecall?'
local OWMAPIKEY  = ''
local OWMUNIT    = 'metric'
local OWMLAT     =
local OWMLON     =
local OWMLANG    = 'it'
local OWMEXCLUDE = 'minutely,hourly'
OWMLINK = OWMLINK..'lat='..OWMLAT..'&lon='..OWMLON..'&appid='..OWMAPIKEY..'&units='..OWMUNIT..'&exclude='..OWMEXCLUDE
log(OWMLINK)
local OWMResponse, code, headers, status= http.request(OWMLINK)
log(code, status, headers)
if not OWMResponse then
  alert('Previsioni OpenWeather: Impossibile recuperare dati')
  return
end

local data = json.pdecode(OWMResponse)
if not data then
  alert('Previsioni OpenWeather: Impossibile convertire dati')
  return
end

variable "code" result timeut
...it is not a timeout parameter issue Wink
this is an example.. I do have the telegram notification script that doesn't work either
Reply


Messages In This Thread
Scrit HTTP request timeout - by emme - 28.07.2021, 08:18
RE: Scrit HTTP request timeout - by emme - 30.07.2021, 08:28

Forum Jump: