dzVents Error

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

Moderator: leecollings

Post Reply
dpcreel
Posts: 44
Joined: Friday 25 November 2016 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

dzVents Error

Post by dpcreel »

I am seeing this in the log, it may have been there for awhile but I just noticed it several weeks ago, - "Error: EventSystem: Warning!, lua script /home/pi/domoticz/scripts/dzVents/runtime/dzVents.lua has been running for more than 10 seconds". I've been running dzvents scripts for several months. After several weeks of trying to nail down the offending script I've narrowed it down to 3 of the scripts (I currently have 7). Whenever any one of these scripts or combination of the three scripts is on, I get the error. The offending scripts are very innocuous is code. Here is one of them:

Code: Select all

return {
	active = true  ,
	on = {
		devices = {'Gas Flow'}
	},
	execute = function(domoticz)
	    
	    local therm = domoticz.devices('Gas Flow').flow * 0.0353146667

        domoticz.log(tostring(therm),domoticz.LOG_INFO)
        domoticz.log(domoticz.time.secondsSinceMidnight/60,domoticz.LOG_INFO) --for testing the secondsSinceMdnight function

		-- update the dummy sensor
	domoticz.devices('cuFt Flow').updateCustomSensor(therm)
	end
}
As far as I can tell what the other two scripts have in common with this one and each other, is they do some math and update a dummy sensor of some type. If I disable all of these scripts the errors go away. What I want to do next is disable the dummy sensor update function to see if the errors go away. But first I wanted to check to see if I am on the right path. The device "cuFt Flow" was created as a custom sensor. Any suggestions?

Also I'm running the latest beta version of Domoticz on a rpi3 with some zwave and MySensors devices.
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents Error

Post by dannybloe »

Mm, that's interesting indeed. Normally you will have this error if the script tries to execute an http call and wait for the results. If there's no response from the call, then you might pass the 10s boundary. But in your example nothing special happens. Please dig a bit deeper indeed.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
dpcreel
Posts: 44
Joined: Friday 25 November 2016 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dzVents Error

Post by dpcreel »

Thanks, I'm going to start by changing the update of a custom sensor to a domoticz variable. For each try (turned one on at a time) to find the offending sketch I saved individual domoticz logs (logLevel 3) if you want for review, but I'm guessing it's just something simple that I'm doing wrong.

Also just to let you know the error doesn't happen every minute or device change. It is very random and may only happen two to three times in a 12 hour period.
dpcreel
Posts: 44
Joined: Friday 25 November 2016 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dzVents Error

Post by dpcreel »

Danny, I installed what you asked for on a separate sd card for the pi. Domoticz version looks to be 3.5876 (per the browser) and the log says I'm running dvZents 2.3.0. Are these correct? Should I update Domoticz?

Also good news thus far, when I enabled the first offending sketch, no errors. Now I'm running the second one that caused errors. I'll keep you updated. The errors usually occurred two to three times in a six hour period.
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents Error

Post by dannybloe »

It should show that version in the About of Domoticz. I'm curious about these scripts actually.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
dpcreel
Posts: 44
Joined: Friday 25 November 2016 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dzVents Error

Post by dpcreel »

It is showing that version in that location. What do you need to know about the scripts and which ones? Also it just reported two errors and all scripts were on. I will need to do some more research to find which one is causing it.
dpcreel
Posts: 44
Joined: Friday 25 November 2016 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dzVents Error

Post by dpcreel »

Just a quick update on this issue. To resolve the error issue I did a fresh install of domoticz, upgraded to beta, then instead of importing the existing database I created everything new from scratch (wow). All new zwave devices and all new mysensor devices. I kept the existing dzvent scripts in a text file and just copied and pasted them into domoticz, so the scripts were the exact same as they were in the past. Everything has been running for several weeks without a problem, no errors. I think the problem was somewhere in the database, not a dzvents issue. I am using a rpi3, domoticz beta and a fresh sd card.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest