Page 1 of 1

Variable Logs

Posted: Wednesday 29 August 2018 13:08
by maximaxi
Goodmorning everyone
I'm a bit of a domoticz but I really like it I'm probably missing in a glass of water.
I would like to be able to display the value of some variables in the log window using a dzevent script
can you give me suggestions Thanks

Image

Image

Re: Variable Logs

Posted: Wednesday 29 August 2018 13:22
by snuiter
Hi maximaxi,

did you check the forum on DzVents - Variables ?
http://www.domoticz.com/wiki/DzVents:_n ... iables.29

As an example I use this command to set a variable with DzVents.

Code: Select all

domoticz.variables('XiaomiMP3').set(10004)
You could start with an example DzVent script from the editor built in domoticz and start from there and play with using dummy button or time script that start the script and as a result display your variable value.

Good luck

Re: Variable Logs

Posted: Wednesday 29 August 2018 13:45
by maximaxi
Thank you for your quick answer
writing to us in the variable is not a problem, but to visualize the state I did several tests without success.
I have to see an example otherwise I will not get there

Re: Variable Logs

Posted: Wednesday 29 August 2018 17:04
by snuiter
This is a simple script to print the value of one of my variables

Code: Select all

return {
	on = {
		timer = {'every minute'},
		},
	execute = function(domoticz, triggeredItem)
	    
	            print(domoticz.variables('XiaomiMP3').value)  
	end
}
output in the log : 2018-08-29 17:02:00.095 Status: dzVents: 10002

10002 is the value of my variable.

Try this and change the variable name XiaomiMP3 into your own variable name, it should then report every minute in your log

Re: Variable Logs

Posted: Wednesday 29 August 2018 20:00
by maximaxi
;) thank you very much
It is true that sometimes we lose a trivial thing