json in LUA?

Moderator: leecollings

Post Reply
manjh
Posts: 749
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

json in LUA?

Post by manjh »

I have a question that is embarrassingly simple, I think I should be able to figure this out by myself, but can't...

What I want to do is issue a json command from a LUA script. I have found the elaborate description in the Wiki, but cannot figure out how to issue such a command in a LUA script.
Can someone point me in the right direction?
Hans
User avatar
erem
Posts: 230
Joined: Tuesday 27 March 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Amsterdam/netherlands
Contact:

Re: json in LUA?

Post by erem »

Regards,

Rob
manjh
Posts: 749
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: json in LUA?

Post by manjh »

erem wrote: Thursday 17 June 2021 14:45 this thread may have what you need
viewtopic.php?f=59&t=36489&p=276325&hilit=http#p276325
That's dzvents, I'd like to merge into a pure LUA script...
Hans
User avatar
erem
Posts: 230
Joined: Tuesday 27 March 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Amsterdam/netherlands
Contact:

Re: json in LUA?

Post by erem »

Regards,

Rob
manjh
Posts: 749
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: json in LUA?

Post by manjh »

erem wrote: Friday 18 June 2021 15:10 does this fit the bil?

https://github.com/daurnimator/lua-http
Not sure, but I did discover that the install process is more than I expected.
Had to install Luarocks first in order to be able to install http.
Then installed http, but ran into errors: need to install crypto first. Not sure if I want to do this... it seems more than it is worth.
Hans
User avatar
erem
Posts: 230
Joined: Tuesday 27 March 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Amsterdam/netherlands
Contact:

Re: json in LUA?

Post by erem »

since it supports https as well, crypto is a mandatory install.
you may be be to uninstall it after if you only use http.

ymmv.
Regards,

Rob
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest