Page 1 of 1

dzVents.lua not found

Posted: Friday 28 July 2017 9:40
by bramski
I'm facing problems trying to get dzVents 2 up and running.

Running on Synology NAS with Domoticz 3.8143 beta and Python plugin.

The error is:
2017-07-27 22:40:19.984 Error: EventSystem: in /usr/local/domoticz/var/scripts/dzVents/runtime/dzVents.lua: cannot open /usr/local/domoticz/var/scripts/dzVents/runtime/dzVents.lua: No such file or directory

I don't have a dzVents folder in the scripts directory. Also searched my whole system for dzVents but didn't get any match.
Not sure how to proceed.

Re: dzVents.lua not found

Posted: Friday 28 July 2017 10:00
by dannybloe
That's an issue with the NAS package. More people have reported it.

Re: dzVents.lua not found

Posted: Friday 28 July 2017 10:08
by bramski
Thanks danny. I'll wait for a new build and a solution. Do you know if the maintainer of the NAS package is informed about this issue?

Re: dzVents.lua not found

Posted: Friday 28 July 2017 10:11
by dannybloe

Re: dzVents.lua not found

Posted: Tuesday 01 August 2017 11:43
by jumbotroll
bramski wrote:I'm facing problems trying to get dzVents 2 up and running.

Running on Synology NAS with Domoticz 3.8143 beta and Python plugin.

The error is:
2017-07-27 22:40:19.984 Error: EventSystem: in /usr/local/domoticz/var/scripts/dzVents/runtime/dzVents.lua: cannot open /usr/local/domoticz/var/scripts/dzVents/runtime/dzVents.lua: No such file or directory

I don't have a dzVents folder in the scripts directory. Also searched my whole system for dzVents but didn't get any match.
Not sure how to proceed.
You can try to reinstall the package.
Take backup of db and scripts, then remove the package from package center and reinstall.
Worked here...

@DS712:/usr/local/domoticz/var/scripts/dzVents/runtime$ ls
device-adapters EventHelpers.lua persistence.lua todo.md
Device.lua HistoricalStorage.lua tests Utils.lua
Domoticz.lua integration-tests TimedCommand.lua Variable.lua
dzVents.lua misc Time.lua

Re: dzVents.lua not found

Posted: Tuesday 01 August 2017 17:42
by bramski
@jumbotroll @dannybloe
Sorry to bother you guys again, but I'm still struggling with getting dzVents working in the Synology build.
I am one step further by following the suggestion of jumbotroll. I deinstalled the package and reinstalled it again and now I have the folder /usr/local/domoticz/scripts/var/dzVents.

However when starting domoticz I get a lot of errors related to dzVents:
Spoiler: show
2017-08-01 17:36:18.805 Error: dzVents: Error: error loading module 'dzVents' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/dzVents.lua':
/usr/local/domoticz/var/scripts/dzVents/runtime/dzVents.lua:8: too many C levels (limit is 200) in main function near 'currentPath'
2017-08-01 17:36:18.805 Error: dzVents: Error: error loading module 'airquality_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/airquality_device.lua':
...ts/dzVents/runtime/device-adapters/airquality_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.806 Error: dzVents: Error: error loading module 'alert_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/alert_device.lua':
...scripts/dzVents/runtime/device-adapters/alert_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.806 Error: dzVents: Error: error loading module 'ampere_1_phase_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/ampere_1_phase_device.lua':
...zVents/runtime/device-adapters/ampere_1_phase_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.807 Error: dzVents: Error: error loading module 'ampere_3_phase_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/ampere_3_phase_device.lua':
...zVents/runtime/device-adapters/ampere_3_phase_device.lua:5: too many C levels (limit is 200) in function at line 4 near 'local'
2017-08-01 17:36:18.807 Error: dzVents: Error: error loading module 'barometer_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/barometer_device.lua':
...pts/dzVents/runtime/device-adapters/barometer_device.lua:16: too many C levels (limit is 200) in function at line 15 near 'local'
2017-08-01 17:36:18.807 Error: dzVents: Error: error loading module 'counter_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/counter_device.lua':
...ripts/dzVents/runtime/device-adapters/counter_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.808 Error: dzVents: Error: error loading module 'custom_sensor_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/custom_sensor_device.lua':
...dzVents/runtime/device-adapters/custom_sensor_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.808 Error: dzVents: Error: error loading module 'distance_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/distance_device.lua':
...ipts/dzVents/runtime/device-adapters/distance_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.808 Error: dzVents: Error: error loading module 'electric_usage_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/electric_usage_device.lua':
...zVents/runtime/device-adapters/electric_usage_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.809 Error: dzVents: Error: error loading module 'evohome_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/evohome_device.lua':
...ripts/dzVents/runtime/device-adapters/evohome_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.809 Error: dzVents: Error: error loading module 'gas_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/gas_device.lua':
...r/scripts/dzVents/runtime/device-adapters/gas_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.809 Error: dzVents: Error: error loading module 'group_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/group_device.lua':
...scripts/dzVents/runtime/device-adapters/group_device.lua:10: too many C levels (limit is 200) in function at line 9 near 'local'
2017-08-01 17:36:18.810 Error: dzVents: Error: error loading module 'humidity_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/humidity_device.lua':
...ipts/dzVents/runtime/device-adapters/humidity_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.810 Error: dzVents: Error: error loading module 'kwh_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/kwh_device.lua':
...r/scripts/dzVents/runtime/device-adapters/kwh_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.810 Error: dzVents: Error: error loading module 'leafwetness_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/leafwetness_device.lua':
...s/dzVents/runtime/device-adapters/leafwetness_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.811 Error: dzVents: Error: error loading module 'lux_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/lux_device.lua':
...r/scripts/dzVents/runtime/device-adapters/lux_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.811 Error: dzVents: Error: error loading module 'opentherm_gateway_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/opentherm_gateway_device.lua':
...nts/runtime/device-adapters/opentherm_gateway_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.811 Error: dzVents: Error: error loading module 'p1_smartmeter_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/p1_smartmeter_device.lua':
...dzVents/runtime/device-adapters/p1_smartmeter_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.812 Error: dzVents: Error: error loading module 'percentage_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/percentage_device.lua':
...ts/dzVents/runtime/device-adapters/percentage_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.812 Error: dzVents: Error: error loading module 'pressure_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/pressure_device.lua':
...ipts/dzVents/runtime/device-adapters/pressure_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.813 Error: dzVents: Error: error loading module 'rain_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/rain_device.lua':
.../scripts/dzVents/runtime/device-adapters/rain_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.813 Error: dzVents: Error: error loading module 'rgbw_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/rgbw_device.lua':
.../scripts/dzVents/runtime/device-adapters/rgbw_device.lua:10: too many C levels (limit is 200) in function at line 9 near 'return'
2017-08-01 17:36:18.813 Error: dzVents: Error: error loading module 'scaleweight_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/scaleweight_device.lua':
...s/dzVents/runtime/device-adapters/scaleweight_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.814 Error: dzVents: Error: error loading module 'scene_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/scene_device.lua':
...scripts/dzVents/runtime/device-adapters/scene_device.lua:10: too many C levels (limit is 200) in function at line 9 near 'local'
2017-08-01 17:36:18.814 Error: dzVents: Error: error loading module 'security_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/security_device.lua':
...ipts/dzVents/runtime/device-adapters/security_device.lua:10: too many C levels (limit is 200) in function at line 9 near 'local'
2017-08-01 17:36:18.814 Error: dzVents: Error: error loading module 'solar_radiation_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/solar_radiation_device.lua':
...Vents/runtime/device-adapters/solar_radiation_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.815 Error: dzVents: Error: error loading module 'soilmoisture_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/soilmoisture_device.lua':
.../dzVents/runtime/device-adapters/soilmoisture_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.815 Error: dzVents: Error: error loading module 'soundlevel_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/soundlevel_device.lua':
...ts/dzVents/runtime/device-adapters/soundlevel_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.815 Error: dzVents: Error: error loading module 'switch_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/switch_device.lua':
...cripts/dzVents/runtime/device-adapters/switch_device.lua:10: too many C levels (limit is 200) in function at line 9 near 'local'
2017-08-01 17:36:18.816 Error: dzVents: Error: error loading module 'thermostat_setpoint_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/thermostat_setpoint_device.lua':
...s/runtime/device-adapters/thermostat_setpoint_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.816 Error: dzVents: Error: error loading module 'temperature_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/temperature_device.lua':
...s/dzVents/runtime/device-adapters/temperature_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.816 Error: dzVents: Error: error loading module 'temperature_humidity_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/temperature_humidity_device.lua':
.../runtime/device-adapters/temperature_humidity_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.817 Error: dzVents: Error: error loading module 'temperature_humidity_barometer_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/temperature_humidity_barometer_device.lua':
...evice-adapters/temperature_humidity_barometer_device.lua:16: too many C levels (limit is 200) in function at line 15 near 'local'
2017-08-01 17:36:18.817 Error: dzVents: Error: error loading module 'text_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/text_device.lua':
.../scripts/dzVents/runtime/device-adapters/text_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.817 Error: dzVents: Error: error loading module 'uv_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/uv_device.lua':
...ar/scripts/dzVents/runtime/device-adapters/uv_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.818 Error: dzVents: Error: error loading module 'visibility_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/visibility_device.lua':
...ts/dzVents/runtime/device-adapters/visibility_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.818 Error: dzVents: Error: error loading module 'voltage_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/voltage_device.lua':
...ripts/dzVents/runtime/device-adapters/voltage_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.818 Error: dzVents: Error: error loading module 'waterflow_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/waterflow_device.lua':
...pts/dzVents/runtime/device-adapters/waterflow_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.819 Error: dzVents: Error: error loading module 'wind_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/wind_device.lua':
.../scripts/dzVents/runtime/device-adapters/wind_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.819 Error: dzVents: Error: error loading module 'zone_heating_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/zone_heating_device.lua':
.../dzVents/runtime/device-adapters/zone_heating_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'return'
2017-08-01 17:36:18.819 Error: dzVents: Error: error loading module 'zwave_thermostat_mode_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/zwave_thermostat_mode_device.lua':
...runtime/device-adapters/zwave_thermostat_mode_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.820 Error: dzVents: Error: error loading module 'kodi_device' from file '/usr/local/domoticz/var/scripts/dzVents/runtime/device-adapters/kodi_device.lua':
.../scripts/dzVents/runtime/device-adapters/kodi_device.lua:8: too many C levels (limit is 200) in function at line 7 near 'local'
2017-08-01 17:36:18.820 Error: dzVents: Error: Internal script dzVents.lua has no "on" and/or "execute" section. Skipping
2017-08-01 17:36:18.820 Error: dzVents: Error: Internal script dzVents.lua has no "on" and/or "execute" section. Skipping
2017-08-01 17:36:18.820 Error: dzVents: Error: Internal script dzVents.lua has no "on" and/or "execute" section. Skipping
2017-08-01 17:36:18.820 Error: dzVents: Error: Internal script dzVents.lua has no "on" and/or "execute" section. Skipping
2017-08-01 17:36:18.820 Error: dzVents: Error: Internal script dzVents.lua has no "on" and/or "execute" section. Skipping
2017-08-01 17:36:18.820 Error: dzVents: Error: Internal script dzVents.lua has no "on" and/or "execute" section. Skipping
2017-08-01 17:36:18.821 Error: dzVents: Error: Internal script dzVents.lua has no "on" and/or "execute" section. Skipping
2017-08-01 17:36:18.821 Error: dzVents: Error: Internal script dzVents.lua has no "on" and/or "execute" section. Skipping
2017-08-01 17:36:18.821 Error: dzVents: Error: Internal script dzVents.lua has no "on" and/or "execute" section. Skipping
2017-08-01 17:36:18.821 Error: dzVents: Error: Internal script dzVents.lua has no "on" and/or "execute" section. Skipping
2017-08-01 17:36:18.821 Error: dzVents: Error: Internal script dzVents.lua has no "on" and/or "execute" section. Skipping
Also the Python event system won't get started anymore. This was working correctly on my Synology with the latest beta build:
Spoiler: show
2017-08-01 17:36:01.834 Error: (Buienradar) failed to load 'plugin.py', Python Path used was ':/volume1/@appstore/py3k/usr/local/lib/python35.zip:/volume1/@appstore/py3k/usr/local/lib/python3.5/:/volume1/@appstore/py3k/usr/local/lib/python3.5/plat-linux:/volume1/@appstore/py3k/usr/local/lib/python3.5/lib-dynload'.
2017-08-01 17:36:01.851 Error: (Buienradar) Module Import failed, exception: 'ImportError'
2017-08-01 17:36:01.851 Error: (Buienradar) Module Import failed: ' Name: plugin'
2017-08-01 17:36:01.929 Incoming connection from: 192.168.178.39
2017-08-01 17:36:01.994 Python EventSystem: Module not found - Trying to initialize.
2017-08-01 17:36:01.996 Python EventSystem: Initalizing event module.
Hope you guys can give me some pointers to resolve these issues.

Re: dzVents.lua not found

Posted: Wednesday 02 August 2017 10:12
by dannybloe
Not exactly sure what is happening here. So, what I would do is remove the scripts folder from your install (make a copy if you have custom scripts). Then get a copy of that folder from github (master/stable) and put it in place. Start Domoticz and see if you still get those errors. If you do than I have no idea what is causing this. But, if you don't get those errors then move you event scripts back to the proper location. But be sure that dzVents scripts (if you have any) should only be in scripts/dzVents/scripts. Carefully check this. Make sure NOT to put non-dzVents lua scripts in there as it will break stuff. Classic Lua should be placed in scripts/lua.

Re: dzVents.lua not found

Posted: Wednesday 02 August 2017 10:30
by bramski
Thanks dannybloe. Exactly what you descibed is also what I tried yesterday, however this makes no difference. Just to be sure I tried again. Removed dzVents directory. Made sure I was on the master branch. Did a git pull to get fresh changes and moved that directory to the domoticz installation directory. Still have all those errors with "too many C levels".
I am curious if somebody has dzVents running on Synology at all. Maybe it is some issue with the C compiler in Synology architecture.

Re: dzVents.lua not found

Posted: Wednesday 02 August 2017 10:36
by dannybloe
I'd try it with the entire script folder. Not just the dzVents folder.

Re: dzVents.lua not found

Posted: Wednesday 02 August 2017 13:17
by bramski
Still the same error Danny unfortunately. Seems some endless recursion somewhere, but I don't know that much about LUA and C internal workings.

Re: dzVents.lua not found

Posted: Wednesday 02 August 2017 13:21
by bramski
Could it be that those paths are symlinks?
For example the whole domoticz installation is symlinked from /volume1/@appstore/domoticz to /usr/local/domoticz
All LUA files are included from /usr/local/domoticz, maybe it keeps searching for the files this way until it hits 200 iterations and crashes.

Re: dzVents.lua not found

Posted: Friday 04 August 2017 20:20
by EdwinK
After removing Domoticz and restarting my Synology before reinstalling Domoticz again, I found that the script dzVents.lua is now present.

Re: dzVents.lua not found

Posted: Saturday 05 August 2017 22:29
by bramski
@EdKo66, @dannybloe, Yes it was also in place for me after reinstalling. However I got all those errors "too many C levels (limit is 200)", so it still wasn't working.

But I have good news. Finally got it resolved.
I bought a Raspberry PI 3 to eliminate Synology as the root of the problem.
Installed domoticz on the device and copied the domoticz.db from my Synology.
Enabled dzVents and immediately got similar errors with the "too many C levels", which is an indication of endless resursion.
Turned out that I named the script in the inline editor "dzVents". This file is copied to "generated_scripts", but when it is initialized it gets the same name as the already existing dzVents.lua in the runtime folder, and causes a recursion loop this way.
Renamed the event to "test" and magically all my issues disappeared :-).

Now I have domoticz running on the PI, not really sure if I leave it this way or migrate it back to synology.
I think I prefer to leave domoticz on the PI and don't pollute the NAS with all kind of packages which are not really related to NAS functionality.

Re: dzVents.lua not found

Posted: Saturday 05 August 2017 22:36
by dannybloe
Ah. Haha yeah we didn't anticipate this one!

Re: dzVents.lua not found

Posted: Saturday 05 August 2017 22:59
by bramski
Haha, yeah part of a developers live ;-).
Now I can finally rewrite some of my ugly unmaintainable LUA scripts to a much nicer syntax.