postData syntax  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
elmortero
Posts: 248
Joined: Sunday 29 November 2015 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9639
Location: Spain
Contact:

postData syntax

Post 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
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: postData syntax  [Solved]

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
elmortero
Posts: 248
Joined: Sunday 29 November 2015 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9639
Location: Spain
Contact:

Re: postData syntax

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest