Smart Home, made easy
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Meet
VeraSecure
: Your Home's New 24/7 Security Guar
d
Home
Help
Search
Login
Register
Vera - Smarter Home Control Forum
»
Advanced
»
Programming
»
Scene Scripting
»
body into variable
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: body into variable (Read 134 times)
Django
Sr. Newbie
Posts: 40
Karma: +0/-0
body into variable
«
on:
December 09, 2018, 03:14:31 pm »
Is there a way to fetch the body of a http request into a variable via lua?
I want to get the windspeed out of darksky.
Thanks in advance,
Herman
Logged
rigpapa
Beta Testers
Hero Member
Posts: 1047
Karma: +168/-1
Re: body into variable
«
Reply #1 on:
December 09, 2018, 03:19:15 pm »
The SiteSensor plugin will parse the JSON response directly if you don't want to do the work yourself (as response.currently.windSpeed)
Logged
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3, Lite. Hassio, Slapdash.
Print
Pages: [
1
]
Go Up
« previous
next »
Vera - Smarter Home Control Forum
»
Advanced
»
Programming
»
Scene Scripting
»
body into variable