EventHelpers.lua attempt to concatenate field 'state

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

Moderator: leecollings

Post Reply
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

EventHelpers.lua attempt to concatenate field 'state

Post by waaren »

Every once in a while I get this Error in the Domoticz log:

Error: EventSystem: in /opt/domoticz/dzVents/runtime/dzVents.lua: ...z/scripts/dzVents/../../dzVents/runtime/EventHelpers.lua:700: attempt to concatenate field 'state' (a nil value)

My workaround is to modify EventHelpers.lua (line 700) from:

Code: Select all

utils.log('Device-event for: ' .. device.name .. ' value: ' .. device.state, utils.LOG_DEBUG ) 
to

Code: Select all

 
 if ( device.state == nil ) then
               utils.log('Device-event for: ' .. device.name .. ' value:  nil ', utils.LOG_DEBUG)
 else
             utils.log('Device-event for: ' .. device.name .. ' value: ' .. device.state, utils.LOG_DEBUG)
 end
 


but I don't think this is a real solution and I have to do this again after every Domoticz update because this file gets overwritten.

Is this a bug of a feature ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: EventHelpers.lua attempt to concatenate field 'state

Post by dannybloe »

It is a bug that will be fixed in the next update.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest