This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Tesla Powerwall Local Connection broken with New Release
#13
Try this, might need some adjustments to extract the JSON part from the response.
Code:
lines = res:trim():split('\r\n') -- remove header lines and chunk size repeat   line = table.remove(lines, 1)   if line == '' then     table.remove(lines, 1)     break   end until #lines == 0 -- remove last line lines[ #lines ] = nil data = table.concat(lines) data = require('json').pdecode(data) log(data.battery.instant_power) log(data.solar.instant_power) log(data.site.instant_power) log(data.load.instant_power)
Reply


Messages In This Thread
RE: Tesla Powerwall Local Connection broken with New Release - by admin - 05.07.2021, 14:40

Forum Jump: