dzVents wont work

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
feliw124
Posts: 10
Joined: Saturday 26 February 2022 20:42
Target OS: Windows
Domoticz version:
Contact:

dzVents wont work

Post 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?
User avatar
waltervl
Posts: 5853
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: dzVents wont work

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
feliw124
Posts: 10
Joined: Saturday 26 February 2022 20:42
Target OS: Windows
Domoticz version:
Contact:

Re: dzVents wont work

Post 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
}
User avatar
waltervl
Posts: 5853
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: dzVents wont work

Post by waltervl »

And what is not working? What logging do you get and what logging that you expected is not showing?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
feliw124
Posts: 10
Joined: Saturday 26 February 2022 20:42
Target OS: Windows
Domoticz version:
Contact:

Re: dzVents wont work

Post 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)
feliw124
Posts: 10
Joined: Saturday 26 February 2022 20:42
Target OS: Windows
Domoticz version:
Contact:

Re: dzVents wont work

Post 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
User avatar
waltervl
Posts: 5853
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: dzVents wont work

Post 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 ....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5853
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: dzVents wont work

Post by waltervl »

Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
feliw124
Posts: 10
Joined: Saturday 26 February 2022 20:42
Target OS: Windows
Domoticz version:
Contact:

Re: dzVents wont work

Post 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?
PeterM
Posts: 6
Joined: Wednesday 18 October 2017 16:52
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: dzVents wont work

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest