Hi everybody,
it is possible to reviece a Http-Post and parse the incoming JSON with some lua code?
I’m using a VERA Edge unit (UI7)
Besr regards
Hi everybody,
it is possible to reviece a Http-Post and parse the incoming JSON with some lua code?
I’m using a VERA Edge unit (UI7)
Besr regards
Hi,
Yes you can. You will have to use the socket.http library. You can look here for an example [url=https://github.com/reneboer/openLuup-CarNet/blob/master/src/L_CarNet1.lua]https://github.com/reneboer/openLuup-CarNet/blob/master/src/L_CarNet1.lua[/url]. Look at lines 279 - 342.
Cheers Rene
Hi Rene,
thanks a lot for answering.
So far I understand your code you will send something via POST.
But I need to recieve something.
You mean a post command to the Vera to get data of it? The wiki.mios.com documents requests but they are all get requests. I have not seen anything for posts. Do you have control over the call application? Then you can change it to a GET request.
Cheers Rene
Best Home Automation shopping experience. Shop at Ezlo!
© 2024 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules