Page 1 of 1

error with domoticz.variables

Posted: Wednesday 18 October 2017 16:26
by bigpea
Hi all,
I have one problem with the instruction "domoticz.variables".

I take the value of one variable with the instrunction:

Code: Select all

allPromemoria = domoticz.variables('listaPromemoria').value
domoticz.log('allPromemoria: '..allPromemoria..'/', domoticz.LOG_DEBUG)
and the result is correct:
startTextmy NoteendTextstartData2017-10-18 16:14:00endData
after that, I execute the script and, at the end, I cancel the value in the user variable with this instruction:

Code: Select all

domoticz.variables('listaPromemoria').set('')
In the User Variable section of domoticz I can see that the value has been deleted:
Screenshot_1.png
Screenshot_1.png (9.37 KiB) Viewed 890 times
But at the next run of the script the log of the variable report the same value:
startTextmy NoteendTextstartData2017-10-18 16:14:00endData
In the user variable section the value is empty.
If I restart the raspberry all works fine until I insert new value in this variable.

Do you have any idea?
Thanks.

Re: error with domoticz.variables

Posted: Thursday 19 October 2017 13:50
by dannybloe
Ah, good catch. Indeed that's a bug.. Setting an empty string doesn't update the internal value caches. We'll fix it.

Re: error with domoticz.variables

Posted: Thursday 19 October 2017 15:49
by bigpea
Thanks. I solved, waiting the fix, setting it with a fake string.
Thanks!

Re: error with domoticz.variables

Posted: Thursday 19 October 2017 21:00
by bigpea
One question, the lenght of the text (string type) in the domoticz.variables, have a max number of char?
I have some problem when I try to insert one String.

Re: error with domoticz.variables

Posted: Tuesday 31 October 2017 12:20
by jvandenbroek
bigpea wrote: Thursday 19 October 2017 21:00 One question, the lenght of the text (string type) in the domoticz.variables, have a max number of char?
I have some problem when I try to insert one String.
The limit is set to max 200 chars. Fix for this one (empty value) is coming soon ;)

Re: error with domoticz.variables

Posted: Tuesday 31 October 2017 12:43
by bigpea
Ok thanks.