Page 1 of 1
dzVents wont work
Posted: Saturday 26 February 2022 20:56
by feliw124
Hello everyone, I am new at all these and I am having some problems. I what to automate some tempeture sensors so I started learning dzVents with this:
https://www.domoticz.com/wiki/DzVents:_ ... ug_logging . the problem came when I tried the quickstart code and change the default name to my switch's one (written exactly like the switch name), it didn't work. I added a active = true just in case and nothing, the logs dont show my message. So I looked at the
https://www.domoticz.com/wiki/DzVents:_ ... leshooting page and it is telling me to Turn on debug logging in command line but I dont know how. How can I turn on debug logging? how can I get my logs in a command line and most important how can I fix this problem?
Re: dzVents wont work
Posted: Saturday 26 February 2022 21:04
by waltervl
Dzvents debug logging you can switch on in menu setup-settings, tab Others.
But normally dzvents will give some hints already in the log file that can be read in menu setup - Log.
Else paste the code here and also tell what is not working.
Re: dzVents wont work
Posted: Saturday 26 February 2022 21:44
by feliw124
return {
active = true
on = {
devices = {
'switch1'
}
},
execute = function(domoticz, switch)
domoticz.log('Is this working?')
if (switch.state == 'On') then
domoticz.log('Hey! I am on!')
else
domoticz.log('Hey! I am off!')
end
end
}
Re: dzVents wont work
Posted: Saturday 26 February 2022 23:28
by waltervl
And what is not working? What logging do you get and what logging that you expected is not showing?
Re: dzVents wont work
Posted: Saturday 26 February 2022 23:52
by feliw124
Shouldn't logs say 'Is this working?' and 'Hey! I am on!' when my switch is on? The only inforamtion I am getting is 'initated a switch command (2/switch1/on)' and the same when off. (the switch is a dummy one)
Re: dzVents wont work
Posted: Sunday 27 February 2022 0:06
by feliw124
and now that I pay more attencion I see in log when I try to save it it says: EventSystem: problem writing file: C:\Program Files (x86)\Domoticz\scripts\dzVents\generated_scripts\Script #1.lua
Re: dzVents wont work
Posted: Sunday 27 February 2022 11:51
by waltervl
So you are on a windows environment and you do not have write access on the given folder. Did you run Domoticz as a service? What kind of rights has the user that runs Domoticz?
I personally have no experience in running Domoticz on windows but likely others have ....
Re: dzVents wont work
Posted: Sunday 27 February 2022 12:15
by waltervl
Re: dzVents wont work
Posted: Sunday 27 February 2022 12:27
by feliw124
Domoticz is running as an application, I have the admin of the computer so I should be able to do this. It is very wierd, I tired in another computer and the same problem. It won't let me write a file, when I go to generated_scripts folder nothing appears. Am I doing something wrong? I just installed domoticz in all default settings, then go to the events section and click on the plus and choose dzVents and choose minimal and save. Am I missing something? because is very weird that the same problem happens in two computers, don't you think?
Re: dzVents wont work
Posted: Thursday 04 August 2022 14:46
by PeterM
Domoticz -> "run as Administrator" This in not the same as a user who has administrator rights. What exact the difference is I don't know.