
Search found 4 matches
- Saturday 17 June 2017 9:53
- Forum: LUA
- Topic: LUA json API what is wrong ? Help.
- Replies: 8
- Views: 2047
Re: LUA json API what is wrong ? Help.
Thank you very much for help. The script works great. 

- Friday 16 June 2017 8:30
- Forum: LUA
- Topic: LUA json API what is wrong ? Help.
- Replies: 8
- Views: 2047
Re: LUA json API what is wrong ? Help.
Hello I tested json = (loadfile "/home/pi/domoticz/scripts/lua/JSON.lua")() -- For Linux local config=assert(io.popen('curl http://powietrze.malopolska.pl/_powietrzeapi/api/dane?act=danemiasta&ci_id=21')) local location = config:read('*all') config:close() local jsonLocation = json:decode(location ...
- Thursday 15 June 2017 20:19
- Forum: LUA
- Topic: LUA json API what is wrong ? Help.
- Replies: 8
- Views: 2047
Re: LUA json API what is wrong ? Help.
Hello so this is my start in lua. Try
d1 = jsonLocation.dane.forecast.dzisiaj.details[0].fo_nazwa
Unfortunately it does not work
lua: 1.lua:8: attempt to index field 'dane' (a nil value)
stack traceback:
1.lua:8: in main chunk
[C]: ?
what is wrong?
please help.
d1 = jsonLocation.dane.forecast.dzisiaj.details[0].fo_nazwa
Unfortunately it does not work
lua: 1.lua:8: attempt to index field 'dane' (a nil value)
stack traceback:
1.lua:8: in main chunk
[C]: ?
what is wrong?
please help.
- Sunday 14 May 2017 19:53
- Forum: LUA
- Topic: LUA json API what is wrong ? Help.
- Replies: 8
- Views: 2047
LUA json API what is wrong ? Help.
Hello I'm just starting with LUA I have a problem with the API and script. Address to API http://powietrze.malopolska.pl/_powietrzeapi/api/dane?act=danemiasta&ci_id=23 My script that will not process data json = (loadfile "/home/pi/domoticz/scripts/lua/JSON.lua")() -- For Linux local config=assert ...