dzVents adding a new user variable from script
Posted: Monday 30 August 2021 23:05
Hi folks,
I'm pretty new to Domoticz, installed it 2 days ago, and experimenting with event scripts.
I baked my own led driver hardware where I can plug on a atmega328p, or now also an esp01 controlling the light with an enable and a pwm pin.
Works pretty good using ESPeasy self compiled on the esp01 and a quite static script in Domoticz.
I want my lights to dim up and down when turning them on/off and can achieve this already.
To properly calculate the dim time (fixed parameter to curl call for ESPeasy) I need also the old value of the dimmer setting and thought I store that in user variables.
Where I'm failing is to create a non existing user variable from the dzVent LUA script.
I tried to call the json command from the script using os.execute and openURL, but no effect.
Can somebody give me a hint how to achieve creation of a new user variable from a dzVents event script, please?
Cheers,
Klaus
I'm pretty new to Domoticz, installed it 2 days ago, and experimenting with event scripts.
I baked my own led driver hardware where I can plug on a atmega328p, or now also an esp01 controlling the light with an enable and a pwm pin.
Works pretty good using ESPeasy self compiled on the esp01 and a quite static script in Domoticz.
I want my lights to dim up and down when turning them on/off and can achieve this already.
To properly calculate the dim time (fixed parameter to curl call for ESPeasy) I need also the old value of the dimmer setting and thought I store that in user variables.
Where I'm failing is to create a non existing user variable from the dzVent LUA script.
I tried to call the json command from the script using os.execute and openURL, but no effect.
Can somebody give me a hint how to achieve creation of a new user variable from a dzVents event script, please?
Cheers,
Klaus