We have moved at community.getvera.com

Author Topic: body into variable  (Read 210 times)

Offline 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,

Offline rigpapa

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1121
  • Karma: +187/-3
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)
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.