Page 1 of 1
postData syntax
Posted: Friday 23 August 2019 17:22
by elmortero
Hi,
Could anyone help me with this?
postData = {
acState = {
on = true,
mode = COOL,
fanLevel = HIGH,
targetTemperature = 23,
swing = FULL
}
}
Gives me an error that { is missing to close the { after postdata
Re: postData syntax [Solved]
Posted: Friday 23 August 2019 19:05
by waaren
elmortero wrote: Friday 23 August 2019 17:22
Could anyone help me with postData
Gives me an error that { is missing to close the { after postdata
This code snippet is init self OK, so maybe if you could share more of the script and the logline with the error including the line number where it occurs it becomes more clear what the issue is.
Preparing the postData table before this code snippet and do a dz.utils.dumpTable(prepared postData table) might also give some insight.
Re: postData syntax
Posted: Saturday 24 August 2019 13:07
by elmortero
Thanks Waaren!
Your suggestion made it all clear.
The parameter (within acState) on has to be sent as a boolean and targetemperature as an integer (not strings), all other parameters must be strings.
With this info I made the script to control my AC via Sensibo directly from dzVents, no need for LUAs and python modules to be installed.
Sharing the script in
viewtopic.php?f=59&t=29149