Page 1 of 1

error in log. Unable to find why

Posted: Tuesday 28 March 2017 11:33
by mcmikev
Hello,

I run dzvents 1.1.2 and that is working fine.

However i get an error in the log now and then.

Code: Select all

2017-03-28 11:30:01.646 LUA: error loading module 'devices' from file '/home/pi/domoticz/scripts/lua/devices.lua':
/home/pi/domoticz/scripts/lua/devices.lua:527: unfinished string near
2017-03-28 11:30:01.651 LUA: devices.lua cannot be loaded
2017-03-28 11:30:01.651 LUA: error loading module 'devices' from file '/home/pi/domoticz/scripts/lua/devices.lua':
/home/pi/domoticz/scripts/lua/devices.lua:927: '}' expected (to close '{' at line 922) near
2017-03-28 11:30:01.657 LUA: devices.lua cannot be loaded
2017-03-28 11:30:01.657 LUA: error loading module 'devices' from file '/home/pi/domoticz/scripts/lua/devices.lua':
/home/pi/domoticz/scripts/lua/devices.lua:1061: unfinished string near
Any hints where to look for the issue?

Re: error in log. Unable to find why

Posted: Tuesday 28 March 2017 14:02
by BakSeeDaa
I guess it has to do with one of your scripts. Can You isolate the problem to a single script, for example by turning them off, one by one temporary. Can You remember what script you were working with at the time that these errors started to show?

Re: error in log. Unable to find why

Posted: Tuesday 28 March 2017 14:16
by Siewert308SW
The error log already tell you what is going wrong:

Code: Select all

2017-03-28 11:30:01.651 LUA: error loading module 'devices' from file '/home/pi/domoticz/scripts/lua/devices.lua':
/home/pi/domoticz/scripts/lua/devices.lua:927: '}' expected (to close '{' at line 922) near
Line 922 is written wrong and there not working.

Re: error in log. Unable to find why

Posted: Tuesday 28 March 2017 15:30
by mcmikev
Yes but the file is generated automatic after deletion the file get rebuild/made again and then the error returns after a while.
I only run a heating script and also keeps turning the switch for heating constantly with every run off or on. Like the script cannot figure out the device state

Re: error in log. Unable to find why

Posted: Tuesday 28 March 2017 15:56
by Siewert308SW
Yep...
But without knowing what script and such you are running is like trying to find your way in the dark.
As such errors (non domoticz standard scripts) we need more info and can't blind guess what is going on.

Then take a look at you script at the part where the devices.lua is created and debug what is wrong and why it writes a false line.
And if it's dzvent related, maybe asking the dedicated dzvent thread could solve your issue ;-)

Re: error in log. Unable to find why

Posted: Tuesday 28 March 2017 17:07
by mcmikev
That is where I ask this question

Re: error in log. Unable to find why

Posted: Tuesday 28 March 2017 17:14
by Siewert308SW
mcmikev wrote:That is where I ask this question Image

oops...
My bad, never looked at the forum title.

Re: error in log. Unable to find why

Posted: Wednesday 29 March 2017 8:41
by dannybloe
mcmikev wrote:Yes but the file is generated automatic after deletion the file get rebuild/made again and then the error returns after a while.
I only run a heating script and also keeps turning the switch for heating constantly with every run off or on. Like the script cannot figure out the device state
Mmm, this is really a problem. I'm not sure how to fix this exactly. I'm doing an http request and turn the json into a Lua module that can be required by the dzVents code. Somehow, along the way, this conversion goes wrong. Maybe you can send me the devices.lua file when this happens.