Wget commands no longer working - even after enabling unsafe code

Hi,

I cannot get wget commands working in my scenes, ive confirmed the code works in my browser and also shows “sent” in the lua tester but they dont work. Ive tried 2 different examples, 1 being :hot_face:

local status, result = luup.inet.wget(“https://api.prowlapp.com/publicapi/add?apikey=b69cfdd2244ac40e5cbd5d2f8cd34e6524XXXXX& application=TEST&event=EVENT NAME&description=THE EVENT DESCRIPTION HERE&priority=1”,5).

Ive enabled unsafe code in the security settings and rebooted as others have suggested but they dont work. What else can I try? The log says:

FileUtils::ReadURL 0/resp:505 user: pass: size 1 https://api.prowlapp.com/publicapi/add?apikey=b69cfdd2244ac40e5cbd5d2f8cd34e6524952428& application=TEST&event=EVENT NAME&description=THE EVENT DESCRIPTION HERE&priority=1 response: <0x77a0f320>

John

Try

https://api.prowlapp.com/publicapi/add?apikey=b69cfdd2244ac40e5cbd5d2f8cd34e6524XXXXX&%20application=TEST&event=EVENT%20NAME&description=THE%20EVENT%20DESCRIPTION%20HERE&priority=1

Hi,

Ive established that I can get the lua code working in scenes and the lua test … it seems to be PLEG that is the issue which is where im running the lua from.

John

Shouldn’t the last double quote " be after the 5 before the close bracket?

Hi,

No i think the " is in the correct place. Anyway I finally resolved the issue:

  1. The encoded URL meant the prowl wget worked in both the simulator test and the traditional scene (thanks EICid).
  2. PLEG does not use the same lua WGET style as the vera hence why it simply woudnt work even with the encdoded URL.
  3. I realised I didnt need LUA for the multistring, PLEG could change the properties directly.

So now I have pleg working the mult-string directly and a command to run a scene as a PLEG action.

John