Page 2 of 2

Re: Average outside temperature with Lua

Posted: Tuesday 20 November 2018 20:26
by jvdz
Knibor wrote: Tuesday 20 November 2018 20:19 Now I use the script for measure the "Gasverbruik per graaddag" in conjunction with the previous script "average temperature"

The following error is in the error log "

2018-11-20 20:17:00.475 Error: EventSystem: Lua script Gasverbuik per graaddag did not return a commandArray

What do I wrong?
This looks like a Dzevent script, not regular LUA script, which always needs the: "return commandArray" as it acts on the contents of that array.
Maybe some reading/studying is needed now to understand the different script options and how their basics work? ;)

Jos

Re: Average outside temperature with Lua

Posted: Tuesday 20 November 2018 20:44
by Knibor
Thanks for the info Jos, its works now.
Time to learn a little bit more about scripting Lua and Dzvents

Re: Average outside temperature with Lua

Posted: Tuesday 24 September 2024 12:48
by Hink
If you get this error:

[WebServer] Depricated RType (graph) for API request. Please use correct API Command!

I solved is by replacing:

Code: Select all

local sQuery = 'curl "http://127.0.0.1:8080/json.htm?type=graph&sensor=temp&idx='..tostring(uitlees_idx)..'&range=day"'
with

Code: Select all

local sQuery = 'curl "http://127.0.0.1:8080/json.htm?type=command&param=graph&sensor=temp&idx='..tostring(uitlees_idx)..'&range=day"'

Re: Average outside temperature with Lua

Posted: Tuesday 24 September 2024 13:57
by jvdz
Yep... things change after 6 years!