Write in description Case
Posted: Monday 18 September 2017 22:58
Hi there,
Got some smal skills with LUA and domoticz API, and i don't found how to do what i need, so i'm looking in dz events for this, mayb e away to convert me...let's try.
Working on a script for a esp8266 based module, his goal is to drive french electrique heating using pilot wire.
this module is cloud base, APi is quiete clear and easy to parse :
Get : to retrive Token, Device ID, and actual status
Post : to drive it
Retrive token, stroe it on a uservariable, refresh it every 5 day as asken : no problemo
Get device ID = one per module, no problemo, to be more easy to use i want to store this Device Id on Switch description, then with a device script, when switch is trigger, parsing json, get Device ID, and use it with parsed token from uservariable, will make easier to use for people : just wirte device IDX on script variable, and enjoy.
But how to write on description case ?, using mysql ? ggrr don't like this idea.
Does dz event allow to do this ?
Got some smal skills with LUA and domoticz API, and i don't found how to do what i need, so i'm looking in dz events for this, mayb e away to convert me...let's try.
Working on a script for a esp8266 based module, his goal is to drive french electrique heating using pilot wire.
this module is cloud base, APi is quiete clear and easy to parse :
Get : to retrive Token, Device ID, and actual status
Post : to drive it
Retrive token, stroe it on a uservariable, refresh it every 5 day as asken : no problemo
Get device ID = one per module, no problemo, to be more easy to use i want to store this Device Id on Switch description, then with a device script, when switch is trigger, parsing json, get Device ID, and use it with parsed token from uservariable, will make easier to use for people : just wirte device IDX on script variable, and enjoy.
But how to write on description case ?, using mysql ? ggrr don't like this idea.
Does dz event allow to do this ?